4a Provider Appointments Route

This route is designed to perform two main operations: create a new appointment and retrieve information on an existing appointment from the Provider's FHIR Server. In the first scenario, the route receives a POST request with the slot ID and patient ID to create a new appointment on the FHIR Server. The corresponding route component checks to see if the incoming request contains all of the mandatory parameters. Before creating a new appointment, the route gets the practitioner ID using the slot ID value, and then creates and submits a FHIR resource of Appointment type to the Provider's FHIR server. The appointment resource contains practitioner ID, slot ID, and patient ID that you extracted in the previous steps. If the route has successfully created the appointment, the corresponding route component returns a good response message. In the second scenario, the patient wants to verify that the appointment has been created successfully by passing the patient ID and the appointment date to the Payer. The route receives a GET request with patient ID and appointment date passed as query parameters, searches for the appointment with the matching patient ID on the FHIR server, and then returns JSON data with information on the newly scheduled appointment.

Route Structure

Da Vinci Profile Scheduling Generic Practitioner Route

Route Components Description

Component Name Component Type Description
Request Appointments RESTful Web Service Inbound Receives a request from the Member's Portal.
HTTP Router Checks the request type.
405 Method Not Allowed RESTful Web Service Outbound Sends back an error message that the request type used is invalid.
Required Params Router Checks for the parameters to look up an appointment.
GET Appointments FHIR System Action Extracts the corresponding data from the FHIR Server in the form of a FHIR Bundle.
OK? Router Checks to see if any information has been extracted from the FHIR Server.
500 Internal Server Error RESTful Web Service Outbound Sends out an internal server error message.
Any Error Error Channel Inbound Triggers the 500 Internal Server Error to send out an internal server error HTTP response when there are processing errors.
Parse JSON JSON Value Extractor Extracts the requested data from the FHIR Bundle and saves the data in the form of the message properties.
Size > 0 Router Checks to see if any appointments have been retrieved.
200 OK RESTful Web Service Outbound Send out a response that no appointments have been found.
For Each Appointment Groovy Groups the incoming data by appointment ID.
Build JSON Velocity Restructures the incoming data according to the Velocity template that is available.
Aggregate Aggregation Batches all the incoming data into a single file.
200 OK RESTful Web Service Outbound Sends out the resulting data.
Parse JSON JSON Value Extractor Extracts the patient's ID and the slot ID from the incoming request.
Required Params Router Checks to see if both of the required parameters have been extracted from the request.
400 Bad Request RESTful Web Service Outbound Sends back an error message that the request is missing a required parameter.
5 Get Practitioner ID Subroute Retrieves the practitioner ID from the FHIR Server.
500 Internal Server Error_1 RESTful Web Service Outbound Sends back an internal server error message.
Velocity Velocity Compiles all the information required to create a new appointment.
Create Appointment FHIR Resources Creates a FHIR Resource with information on the new appointment.
If Debug Mode_1 Router Checks to see if the debug mode is enabled. By default, the value of the DebugMode property in the profile environment is set to false.
Log Response File System Outbound Saves the response to the file system if the debug mode is enabled.
If Debug Mode Router Checks to see if the debug mode is enabled.
Log Request File System Outbound Saves the request to the file system if the debug mode is enabled.
Created? Router Checks to see if the new FHIR Resource for the appointment has been created successfully.
500 Internal Server Error RESTful Web Service Outbound Sends out an internal server error message.
GetPatch Velocity Restructures the data based on the Velocity template that is available.
Extract appointment id Groovy Extracts the appointment id from the incoming data.
201 Created RESTful Web Service Outbound Send out a response that the appointment has been successfully created. The response header Location has a reference to the newly created appointment.
Update Selected Slot FHIR System Action Updates the slot selected for the appointment.
FS Outbound File System Outbound saves the resulting data to the file system.
If Debug Mode_2 Router Checks to see if the debug mode is enabled.
Log Response_1 File System Outbound Saves the response to the file system if the debug mode is enabled.
If Debug Mode_3 Router Checks to see if the debug mode is enabled.
Log Request_1 File System Outbound Saves the request to the file system if the debug mode is enabled.