As per the discussion with Angshu on the model and api, we have come to the following agreements:
1. The current technical model is good, with the following changes:
- Rename ‘appointment_recurrence_map’ table to ‘patient_appointment_occurrence’.
- Rename ‘appointment_recurrence_pattern’ table to ‘patient_appointment_timings’ ', hence the primary key will be now called ‘patient_appointment_timings_id’
- Pass the type of recurrence as enum values (eg. 1 for DAY, 3 for MONTH & 2 for WEEK), handled in code. No need of an additional table called ‘appointment_recurring_type’.
- If we have needs to encode date in data (e.g MONDAY) etc - use String (MONDAY, TUESDAY) instead of using 1, 2 etc.
2. Have API to return just one instance of that recurring appointment and another API to return the series of all recurring appointment.
3. The above API request body looks good. The final request body would look like below eg:
{
"appointmentDetail": {
"patientUuid": "f0d06506-8071-4ec4-a528-31cad0dff9dd",
"serviceUuid": "7b200662-e21a-488c-8274-4eff81117608",
"startDateTime": "2019-05-14T05:30:00.000Z",
"endDateTime": "2019-05-14T06:30:00.000Z",
"locationUuid": "8d6c993e-c2cc-11de-8d13-0010c6dffd0f",
"appointmentKind": "Recurring"
},
"recurringPattern": {
"frequency": "5",
"period": "1",
"daysOfWeek": [],
"endDate": "",
"type": "DAY"
}
}
@angshuonline @vmalini @shivarachakonda @vvinay @sowmika @binduak @sravya @ramses @abhinavpc @megkmcguire @mohitd @jinal