Appointment Scheduling Process API - Implementation Template

(0 reviews)

Developer guide

The criteria for invoking either or both of the system APIs is defined by each resource implemented:

  1. Slot
    • GET by ID – Requests must be passed to /Appointment/{sourceSystem}/{id}, where sourceSystem is either "Epic" or "Cerner" to fetch appointment by Id.
    • Search – Requests with parameters such as location, service-type, appointment_type, and date ranges can be sent as parameters to the URL /Slot or /Slot/_search for fetching available slots in both EMRs.
    • POST method – Requires parameters to be passed as a URL-encoded payload to /Slot or /Slot/_search to filter responses on downstream system APIs.
  2. Appointment
    • GET By ID (Multiple EMR) – If a A URI parameter is passed to /Appointment/{sourceSystem}/{id}, the system API corresponding to sourceSystem will be invoked to get Appointment by ID.
    • GET By ID (Single EMR) – If a URI parameter is passed to /Appointment/{id}, the request is routed to the primary system API as defined in the config-{env}.yaml file.
    • POST method – Requests with "Appointment Create/Cancel" body to /Appointment/{sourceSystem} are routed to system API based on sourceSystem.

Following DataWeave modules to be used in Appointment Scheduling(Search,Get,Create,Cancel) and Slot(Get and Search)

ModuleDescription
cerner-error-mappingGenerate error message for Cerner Include the request URL and the value cerner
epic-error-mappingGenerate error message for Epic Include the request URL and the value epic
filter_slot_search_formGenerate Slot Search Post Body with updated parameters Parameters include:
noSourceMatchGenerate error response when primary is not configured and request is routed to /Resource without sourceSystem

cerner-error-mapping

Generate error message for Cerner
Include the request URL and the value cerner

epic-error-mapping

Generate error message for Epic
Include the request URL and the value epic

filter_slot_search_form

Generate Slot Search Post Body with updated parameters
Parameters include:

Functions

fun filterBySource ( value, filterBy, sourceList)

param value string to be filtered
param filterBy string to be used for filtering
param sourceList is list of sources defined in config-{env}.yaml

Filters string to return only matched values Calls helper functions checkSourceinValue and removeString Assumes input string is a comma separated string with multiple values

fun checkSourceinValue ( value, sourceList)

param value string to be checked for sources
param sourceList is list of sources defined in config-{env}.yaml

Function to check if input string contains one of the sources identified in config-{env}.yaml's defined sources

fun mapStartDates ( startArray)

Generates start dates for Slot Search using payload.start, which is a repeating element

noSourceMatch

Generate error response when primary is not configured
and request is routed to /Resource without sourceSystem


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onJan 28, 2022
Asset overview

Asset versions for 1.0.x

Asset versions
StatusVersionActions
1.0.2
1.0.1
1.0.0