As part of edit of recurring appointments we are planning to create a new PUT API as below:
<HOST>/openmrs/ws/rest/v1/appointment?applyForAll=true/false
In the above API,
- applyForAll = true means that the change should be applied to all the pending occurrences of recurring appointment.
- applyForAll = false means that the change should be applied to that particular appointment.
Below is the sample request and response:
Request: (same as existing AppointmentRequest)
{
"uuid": "5eebc88b-3ad5-4fd8-8a6b-ac1601a4c3d3",
"patientUuid": "7023ee46-e2ec-40c4-8f55-15673209dbf0",
"serviceUuid": "2b87edcf-39ac-4dec-94c9-713b932e847c",
"serviceTypeUuid": "e7912578-bb5b-4617-ba45-28dd178b46de",
"startDateTime": "2019-06-12T04:30:00.000Z",
"endDateTime": "2019-06-12T05:00:00.000Z",
"providers": [
{
"uuid": "8e482ebc-20e0-11e7-a53f-000c29e530d2",
"response": "ACCEPTED",
"comments": null
}
],
"locationUuid": "8de35e75-20e0-11e7-a53f-000c29e530d2",
"appointmentKind": "Scheduled",
"recurringPattern": {
"frequency": 10,
"period": 2,
"type": "Day"
}
}
Response: (edited appointments)
[
{
"uuid": "5eebc88b-3ad5-4fd8-8a6b-ac1601a4c3d3",
"appointmentNumber": "0000",
"patient": {
"identifier": "IQ1230",
"name": "CFE4BD7C CFE4BD80",
"uuid": "7023ee46-e2ec-40c4-8f55-15673209dbf0"
},
"service": {
"appointmentServiceId": 1,
"name": "Physiotherapy OPD",
"description": null,
"speciality": {},
"startTime": "",
"endTime": "",
"maxAppointmentsLimit": null,
"durationMins": null,
"location": {
"name": "Physiotherapy",
"uuid": "8de35e75-20e0-11e7-a53f-000c29e530d2"
},
"uuid": "2b87edcf-39ac-4dec-94c9-713b932e847c",
"color": "#00CED1",
"creatorName": null
},
"serviceType": {
"duration": 30,
"name": "1x session",
"uuid": "e7912578-bb5b-4617-ba45-28dd178b46de"
},
"provider": null,
"location": {
"name": "Physiotherapy",
"uuid": "8de35e75-20e0-11e7-a53f-000c29e530d2"
},
"startDateTime": 1560313800000,
"endDateTime": 1560315600000,
"appointmentKind": "Scheduled",
"status": "Scheduled",
"comments": null,
"additionalInfo": null,
"providers": [
{
"uuid": "8e482ebc-20e0-11e7-a53f-000c29e530d2",
"comments": null,
"response": "ACCEPTED",
"name": "Ahmad Alrosan"
}
]
},
{...................................
}]```