Prepare Bundle Route

This subroute picks up a bundle with the patient's information from the parent route Upload to Provider and extracts the medicationReferences from the incoming data. The route component Groovy extracts all the medication IDs from the medicationReferences, and if no such data is available, the route forms a FHIR Bundle and submits it to the parent route. If the incoming data contains any medication IDs, the route pulls the corresponding medication resources from the Payer's FHIR Server, aggregates the original incomming data and the medication data into a single multi-message exchange, and updates the resource MedicationStatement in the resulting file. Then the route restructures the data to form a new FHIR Bundle for further submission to the Provider's FHIR Server and sends the resulting data back to the parent route.

Route Structure

Route Components Description

Component Name Component Type Description
Parent Route Input Parent Route Input Picks up data from the parent route.
JSON Value Extractor JSON Value Extractor Extracts the medicationReferences from the incoming data.
Get Medication IDs Groovy Extracts the medication IDs from the resource medicationReferences.
Medications found? Router Checks to see if any medication IDs have been extracted.
Load Medications FHIR System Action Pulls the information on the corresponding medication from the Payer's FHIR Server.
Original + Medications Aggregation Aggregates all the data (original data and medication) into a single multi-message exchange.
Update MedicationStatements Groovy Updates the resources MedicationStatement.
Create new POST Bundle_1 Groovy Restructures the data for further submission to the Provider's FHIR Server.
Parent Route Output Parent Route Output Sends the uploaded resources for further processing to the parent route.