The god of blacksmiths, craftsmen, artisans, sculptors, metals, metallurgy, "FHIR", and volcanoes, representing the creation and forging of new technologies.
MIT License
This MVP sample project is an orchestration process for ingesting large volumes of FHIR bundles (ndjson) into an Azure Health Data Services FHIR Api using the $import endpoint. Following the documented Performance Considerations, this project aims to achieve maximum scaling efficiency by batching files according to these specifications:
The orchestration process is implemented using a Durable Azure Function app written in Java.
FHIR_STORAGE_CONN_STR
and FHIR_STORAGE_CONTAINER
.FHIR_STORAGE_QUEUE
.{ "filename": "2024-07-22.ndjson", "lineCount": 1059, "isLastFileInRequest": true}
MAX_BATCH_SIZE
is achieved.MAX_BATCH_SIZE
has been exceeded, or the incoming Queue message contains "isLastFileInRequest": true
, the batch is submitted to the $import endpoint of the FHIR API FHIR_SERVER_URL
.All batches and files are tracked in an Azure Storage Table FHIR_STORAGE_TABLE
. When a job is complete, the status is updated in the table along with basic statistics about the job.
Application Insights and Log Analytics are used to feed an Azure Dashboard page that provides visibility into the running orchestration process and FHIR Import jobs.
Log files emitted from the FHIR $import process are automatically loaded to a storage container fhirlogs
of the Storage Account defined by FHIR_STORAGE_CONN_STR
. These logs can be consumed by Azure Fabric and PowerBI, or any other data/reporting/analysis tools, for the purpose of detailed status reporting. The setup and configuration of a Fabric workspace and PowerBI report are outside the scope of this repository.
az login
AND azd auth login
to authenticate with your Azure Subscription.azd up
OR azd provision
to deploy the necessary Azure resources to your subscription.local.settings.json
.F5
in VSCode.Azure Function Environment Variables
"FHIR_STORAGE_CONN_STR": "<fhir storage>",
"FHIR_STORAGE_CONTAINER": "data",
"FHIR_STORAGE_TABLE": "batchtable",
"FHIR_STORAGE_QUEUE": "fhir-hose",
"FHIR_SERVER_URL": "https://<fhirWorkspace>-<fhirApi>.fhir.azurehealthcareapis.com",
"FHIR_IMPORT_MODE": "IncrementalLoad",
"MAX_BATCH_SIZE": 100000000,
"SUGGESTED_MIN_FILE_SIZE": 20000
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.