A Recurring Event Object contains a schedule that describes appointment slots recurrences. Recurrence is defined by specific start date, end date, and day-of-week (DOW). All appointment slots in the group must have the same time, duration, reason, physician, and practice.
How changes are handled
When a Recurring Event Group is created, we pre-create all appointment slots according to the schedule defined for the group. When a change is made to group, we delete all "unreserved" (i.e. without patient) appointment slots and re-create new ones. We then convert all the "reserved" (i.e. with patient) appointment slots into appointments and disassociate them from the Recurring Event Group.
When a Recurring Event Group is deleted, all "unreserved" appointment slots will be deleted and all "reserved" appointment slots are converted to appointments.
Object Definition (JSON Schema)
{
"id": "http://elationhealth.com/schemas/api/v2.0/recurring_event_group",
"$schema": "http://json-schema.org/draft-04/schema#",
"appointment": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"physician": {
"type": "integer"
},
"series_start": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"series_end": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
},
"event_time": {
"type": "string",
"pattern": "^[0-9]{2}:[0-9]{2}:[0-9]{2}$"
},
"duration": {
"type": "integer"
},
"repeats": {
"type": "string",
"enum": [
"Weekly",
"Monthly"
]
},
"dow_monday": {
"type": "boolean"
},
"dow_tuesday": {
"type": "boolean"
},
"dow_wednesday": {
"type": "boolean"
},
"dow_thursday": {
"type": "boolean"
},
"dow_friday": {
"type": "boolean"
},
"dow_saturday": {
"type": "boolean"
},
"dow_sunday": {
"type": "boolean"
},
"description": {
"type": "string",
"maxLength": 300
},
"created_date": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
}
}
},
"maxItems": 1
},
"time_slot_type": {
"type": "string",
"enum": [
"appointment_slot"
]
},
"description": {
"type": "string",
"maxLength": 300
},
"practice": {
"type": "integer"
},
"reason": {
"type": "string",
"maxLength": 50
},
"created_date": {
"type": "string",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
}
},
"additionalProperties": false
}
}
Fields requirements for Creation and Update
Field Name | Required for Create | Updatable |
---|---|---|
schedules | yes | yes |
time_slot_type | yes | |
reason | yes | yes |
practice | yes |
Sample object
{
"id": 27590741,
"practice": 65534,
"reason": "followup",
"time_slot_type": "appointment_slot",
"schedules": [
{
"id": 27656278,
"series_start": "2017-01-01",
"series_stop": "2017-02-01",
"event_time": "10:30:00",
"physician": 343234,
"duration": 15,
"repeats": "Weekly",
"dow_monday": true,
"dow_tuesday": false,
"dow_wednesday": false,
"dow_thursday": false,
"dow_friday": false,
"dow_saturday": false,
"dow_sunday": false,
"description": "test description",
"created_date": "2017-02-21T02:16:22.031207Z"
}
],
"created_date": "2017-02-21T02:16:22.026120Z"
}