Goal
The goal of this project is to provide a service that allows the execution of data extraction queries on a FHIR-server.
The tool will take an DEQ, Whitelists and KDSCDS Profiles to extract defined Patient ressources from a FHIR Server and then apply the data extraction with the Filters defined in the DEQ. Additionally Whitelists can be applied.
The tool internally uses the HAPI implementation for handling FHIR Resources.
Environment Variables
Name | Default | Description |
---|---|---|
SERVER_PORT | 8080 | The Port of the server to use |
FHIR_SERVER | http://localhost:8082/fhir | The base URL of the FHIR server to use. |
FLARE_FHIR_SERVER | http://localhost:8084 | The base URL of the FHIR server to use. |
Name | Default | Description |
---|---|---|
SERVER_PORT | 8080 | The Port of the server to use |
TORCH_FHIR_URL | http://localhost:8082/fhir | The base URL of the FHIR server to use. |
TORCH_FLARE_URL | http://localhost:8084 | The base URL of the FLARE server to use. |
TORCH_PROFILE_DIR | src/test/resources/StructureDefinitions | The directory for profile definitions. |
TORCH_RESULTS_DIR | bundles/ | The directory for storing results. |
TORCH_RESULTS_PERSISTENCE | PT12H30M5S | Time Block for result persistence in ISO 8601 format. |
LOG_LEVEL_de_medizininformatikinitiative_torch_util | info | Log level for torch utility. |
LOG_LEVEL_de_medizininformatikinitiative_torch | info | Log level for torch core functionality. |
LOG_LEVEL_de_medizininformatikinitiative_torch_rest | info | Log level for torch REST services. |
LOG_LEVEL_org_springframework | info | Log level for Spring Framework. |
Examples of Using Torch
Below, you will find examples for typical use cases. To demonstrate the simplicity of the RESTful API, the command line tool curl is used in the following examples for direct HTTP communication.
$Extract-Data
The $Extract-Data-Endpoint implements the Kick-off Request in the Async Bulk Pattern. It receives a FHIR bundle with a measure and a libraryparameters ressource with a crtdl parameter containing a valueBase64Binary.
curl -s http://localhost:8080/fhir/$extract-data -H "Content-Type: application/fhir+json" -d '<query>'
An example <query>
can be found herewould look like this
''' { "resourceType" : "Parameters", "id" : "example", "parameter" : [{ "name" : "crtdl", "valueBase64Binary" : "Base64encodedcrdl""} ] } '''
Response - Error (e.g. unsupported search parameter)
- HTTP Status Code of 4XX or 5XX
the result is a looks something like this:
{ "resourceType": "Bundle", "type": "batch-response", "entry": [ { "resource": { "resourceType": "Bundle", "id": "2", "type": "collection", "entry": [ { ... } ] } }, { "resource": { "resourceType": "Bundle", "id": "4", "type": "collection", "entry": [ { ... } ] }"entry": [ {"resource": {"resourceType": "Bundle","id": "2","type": "collection","entry": [ {...} ]} ]}, {"resource": {"resourceType": "Bundle","id": "4","type": "collection","entry": [ {...} ]}} ]}
Metadata
Response -Success
- HTTP status of 200 OK
- Content-Type header of application/fhir+json
- A body containing a Bundle Resource with a type of batch-response.
Whitelists
TBD
KDSCDS Profiles
TBD
Supported Features
- Loading of KDS StructureMaps
- Testing if found Extensions generally legal in Ressource
- Multiple Profiles per Resource (greedy tales first CDS conforming one)
- Loading of CDS StructureDefinitions
- Redacting and Copying of Ressources
- Parsing CRTDL
- Interaction with a Flare and FHIR Server
to
Outstanding Features
- Loading of Whitelists
- Handling of Backbone Elements in Redaction
- CQL functionalities
- Loading of Whitelists- Testing if found Extensions generally legal in Ressource
- Handling nested Lists?
- Handling of Backbone Elements in Factory
- Handling of Extension Slicing at an element Level
- Verifiyng against the
KDSCDS Profiles - Multiple Profiles per Resource
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at