| RESTful Web Service Inbound
|
RESTful Web Service Inbound |
The RESTful entry point to initiate the data export process. The profile processing starts with an HTTP request to this endpoint. |
| Method
|
Router |
Checks the HTTP method of the initial request and passes only GET requests further down the route for processing. |
| Forbidden
|
RESTful Web Service Outbound |
Returns the response 400 Bad Request to the caller if the initial request method is other than GET. |
| Log File Received
|
Groovy |
Logs an event to indicate that a data export request has arrived. |
| FHIR System Action
|
FHIR System Action |
Initiates the export procedure on the FHIR server. The response from the FHIR server contains the header Content-Location that carries a special "status" URL similar to the following:
https://{host}:{port}/api/v1/fhir/Job/{jobID}/$status
Typically, it takes some time for a FHIR server to prepare a data package for export. The route periodically checks the data readiness status by making a request to this URL. The component extracts this "status" URL from the response header and passes the URL further down the route as a property.
|
| Log check URL
|
Groovy |
Logs an event with the "status" URL. |
| Timer Activation
|
Timer Activation |
Activates the route timer. Once activated, the component Timer Reporting triggers the data readiness check every 30 seconds. |
| Get JOB ID
|
Groovy |
Extracts the export job ID from the "status" URL. |
| Store URL
|
Data Storage Outbound |
Stores the job ID and the "status" URL in data storage. |
| Timer Reporting, Get URL |
Timer Reporting, Data Storage Inbound |
If the data is not ready, the route picks up the URL from the data storage and runs another data readiness check every 30 seconds. |
| Check Export
|
REST Client |
Makes a request to the "status" URL. |
| Log status
|
Groovy |
Logs an event with the data readiness status. |
| Complete?
|
Router |
Checks the HTTP response status code returned by the FHIR server. The code 200 indicates that the server has returned a data package to the route. If the response code is different, the route waits for the next data readiness check. |
| Timer Deactivation
|
Timer Deactivation |
If a data package has been retrieved, stops the route timer to cancel the data readiness checks. |
| Log Export Preparation Complete
|
Groovy |
Logs an event to indicate that the exported data is ready for download. Stores the current XEServer message in the log. |
| Remove URL
|
Data Storage Inbound |
Removes the "status" URL from data storage. |
| GET data URLs
|
Groovy |
Extracts the URLs of data packages that have to be downloaded. |
| Log Request Data
|
Groovy |
Logs an event to indicate that the data download has started. |
| Get Data
|
FHIR Action |
For each URL extracted, makes a request to the FHIR server to retrieve a package with data. |
| Aggregation
|
Aggregation |
Aggregates NDJSON packages into a single message separated by new lines. |
| Zip
|
Zip |
Archives all the exported packages. |
| Dump
|
File System Outbound |
Stores the .zip archive on the file system. |
| Log Data Ready
|
Groovy |
Logs an event indicating that the data export is complete. |