Prerequisites
Local FHIR Server with Patientdatatest data and a Flare server with a cohort Endpoint Torch interacts with these components for the data extraction.
Build
mvn clean install
Flare REST API
Torch implements the FHIR [http://hl7.org/fhir/R5/async-bundle.html)
Torch implements the FHIR Asynchronous Bulk Data Request Pattern.
$Extract-Dextract-data
The $Extract-Dextract-data- Eendpoint implements the Kkick-off Rrequest in the Async Bulk Pattern. It receives a FHIR parameters ressourceresource with a crtdlCRTDL parameter containing a valueBase64Binary.
curl -s http://localhost:8080/fhir/$extract-data -H "Content-Type: application/fhir+json" -d '<query>'
An example <query>
would look like this
''' { "resourceType" : "Parameters", "id" : "example", "parameter" : [{ "name" : "crtdl", "valueBase64Binary" : "Base64encodedcrdl""} ] } '''
scripts/create-parameters.sh src/test/resources/CRTDL/CRTDL_observation.json | curl -s 'http://localhost:8086/fhir/$extract-data' -H "Content-Type: application/fhir+json" -d @- -v
The Parameters resource created by scripts/create-parameters.sh
look like this:
{
"resourceType": "Parameters",
"parameter": [
{
"name": "crtdl",
"valueBase64Binary": "<Base64 encoded CRTDL>"
}
]
}
Response - Error (e.g. unsupported search parameter)
- HTTP Status Code of 4XX or 5XX
Response - Complete
- HTTP status of 200 OK
- Content-Type header of application/fhir+json
- A body containing a JSON
Ffile describing the file links to the batchted transformation results.
curl -s 'http://localhost:8080/fhir/$extract-data' -H "Content-Type: application/fhir+json" -d '<query>'curl -s http://localhost:8080/fhir/$extract-data -H "Content-Type: application/fhir+json" -d '<query>'
the result is a looks something like this: