Create Appointment
- Health Cloud makes a Get Slot Status REST call.
An error is displayed to the call center agent if the slot is no longer available.
- Health Cloud creates a Service Appointment record and a Healthcare Practitioner Facility Appointment junction between the Service Appointment and Healthcare Practitioner Facility.
- Health Cloud makes a Create (Book) Appointment REST call.
- Service Appointment is updated with the response.
- An error is displayed to the call center agent if the booking is rejected.
- Type: Resource
- Verb: POST
- Default URL Path: [base]/Appointment/[sourceSystem]
Your Base URL is configured in Setup > Appointment Scheduling.
All communications with the external system use the FHIR R4 standard.
Request Body
The resourceType, identifier, cancelationReason, serviceType, appointmentType, slot, comment, and status are the minimum required fields in the request that Health Cloud sends.
1{
2 "resourceType" : "Appointment",
3 "identifier" : [{ Identifier }], //See Note below
4 "cancelationReason" : { CodeableConcept },
5 "serviceType" : [{ CodeableConcept }], // From WorkType --> AppointmentType
6 "appointmentType" : { CodeableConcept }, // From WorkType --> serviceType
7 "slot" : [{ Reference(Slot) }], //Health Cloud sends the slot ID received from the Find Slots API response.
8 "comment" : "<string>",
9 "participant" : [{"type" : [{ CodeableConcept }], //Health Cloud sends sourcePatientId
10 "actor" : { Reference(Patient|Practitioner|PractitionerRole|RelatedPerson
11 | Device|HealthcareService|Location) }, //Health Cloud sends the source practitioner id
12 "status" : "<code>",
13 ]
14}Response Codes
- 200: Success
- 400: Bad request
- 401: Unauthorized
- 404: Slot or patient not found
- 5xx: Server error
Response Body
To map slots, resourceType, id, identifier, serviceType, appointmentType, slot, participant, actor, and status are required in the FHIR response.
1{
2 "resourceType" : "Appointment",
3 "id" : "<string>"
4 "identifier" : [{ Identifier }], //Source system identifier mandatory in the response if there are multiple source systems
5 "cancelationReason" : { CodeableConcept },
6 "serviceCategory" : [{ CodeableConcept }],
7 "serviceType" : [{ CodeableConcept }],
8 "specialty" : [{ CodeableConcept }],
9 "appointmentType" : { CodeableConcept },
10 "reasonCode" : [{ CodeableConcept }],
11 "reasonReference" : [{ Reference(Condition|Procedure|Observation|ImmunizationRecommendation) }],
12 "priority" : "<unsignedInt>",
13 "description" : "<string>",
14 "supportingInformation" : [{ Reference(Any) }],
15 "start" : "<instant>",// start of the appointment - ISO 8601 format
16 "end" : "<instant>",// end of the appointment - ISO 8601 format
17 "minutesDuration" : "<positiveInt>",
18 "slot" : [{ Reference(Slot) }],
19 "created" : "<dateTime>",
20 "comment" : "<string>",
21 "patientInstruction" : "<string>",
22 "basedOn" : [{ Reference(ServiceRequest) }],
23 "participant" : [{"type" : [{ CodeableConcept }],//Patient EHR id
24 "actor" : { Reference(Patient|Practitioner|PractitionerRole|RelatedPerson | Device|HealthcareService|Location) }, //Practitioner EHR id
25 "required" : "<code>",
26 "status" : "<code>", // Mandatory in the response
27 "period" : { Period }}],
28 "requestedPeriod" : [{ Period }
29 ]
30}The valid values for status are:
- proposed
- pending
- booked
- arrived
- fulfilled
- cancelled
- noshow
- entered-in-error
- checked-in
- waitlist
If the request cannot be processed for any reason (e.g. it’s unsupported, there’s a timeout, etc.) status is returned as proposed.