How to Rapidly Test FHIR Implementations in Microsoft Azure and Microsoft Fabric

Joey Brakefield
4 min readJul 9, 2024

--

A FHIR Landing Zone for Synthetic Data and Automated Infrastructure

FHIR (Fast Healthcare Interoperability Resources) is a standard for exchanging health information electronically. FHIR enables interoperability between different systems and applications that use health data. FHIR is widely adopted by the healthcare industry and supported by major cloud providers like Microsoft Azure. So, as part of the Health and Life Sciences division of Microsoft, I oftentimes find myself needing a FHIR sandbox to test out new and exciting analytics features of our cloud like the Microsoft Fabric — Healthcare Data Services solution set.

However, testing FHIR implementations can be challenging, especially when you need to work with multiple environments, data sources, and tools. You may encounter issues such as:

· Lack of realistic and diverse data sets for testing FHIR scenarios

· Complexity and cost of setting up and managing FHIR servers and infrastructure

· Difficulty of integrating FHIR data with other non-API driven analytics platforms

That’s why I decided to create a FHIR Landing Zone GitHub repository, a solution that automates the creation of a FHIR test environment in Microsoft Azure, using synthetic data and best practices. The FHIR Landing Zone allows you to rapidly test FHIR implementations in Microsoft Azure and Microsoft Fabric, without worrying about the data, the infrastructure, or the credentials.

Deployment

The FHIR Landing Zone consists of the following components:

· Synthetic FHIR patient Data from MITRE’s Synthea product, a tool that generates realistic and diverse synthetic patient records in FHIR format

· Azure Infrastructure, including a FHIR Server, a storage account, a machine-learning cognitive service, a key vault, and an Azure function

· Automated credentials and security groups to build, query, upload, and extract FHIR documents from the Azure-based FHIR Server using the fhir-loader GitHub repository.

· Automated ingestion of Synthetic Synthea records to the Azure FHIR Server, using PowerShell scripts and Azure Bicep templates

The FHIR Landing Zone can be deployed in minutes, using a single PowerShell script. The FHIR Landing Zone is also compatible with Microsoft Fabric’s Health Data Solution (HDS), a platform that enables data ingestion, transformation, and analysis of health data. The FHIR Landing Zone provides a ready-to-use FHIR data source for Microsoft Fabric’s Healthcare Data Solutions (video), allowing you to explore and visualize FHIR data in Power BI, Azure Synapse Analytics, or Azure Data Factory. Also, keep in mind that HDS also opens a flat synthetic data dataset for you to use out of the box, too, if you don’t need to customize the source data.

Using the Solution

Data and security infrastructure

After deploying the solution, you will have the following infrastructure:

Deployment

First, the deploy.ps1 script deploys the foundational Azure service principals, Entra ID security groups, and primary infrastructure: Azure Key Vault, Azure Health Data Services workspace, FHIR service, and Azure Cognitive Language Service. It also sets appropriate permissions automatically.

Then, the script checks to ensure Docker is present and then generates Synthea bundles and deposits them on your filesystem.

Next, the script builds out the services needed to automatically load and extract data from your FHIR service endpoint deployed in the first step. After that script is completed, a new Function App and Storage Account are available for loading FHIR bundles.

The next step is moving the generated Synthea FHIR bundles to the Storage Account. The script uses “azcopy”, a supported copy tool from Microsoft, to move the files inside the local Synthea directory to the Azure Storage Account. From there, the Azure Function checks the “bundles” container every minute to check for new FHIR .json bundles. If it detects a new bundle, it then sends that bundle to the FHIR service and moves the .json file to the “bundles processed” container.

Lastly, the script exports the integrated synthetic .json files to an export storage account in the .ndjson format needed for the start of the Microsoft Fabric HDS pipeline. The next article will be starting from this point and moving through the HDS setup process.

Data Flow Diagram

Benefits

The FHIR Landing Zone offers several benefits for testing FHIR implementations, such as:

· Reducing the time and effort required to set up and configure a FHIR test environment

· Increasing the quality and diversity of the data sets available for testing FHIR scenarios

· Enhancing the security and governance of the FHIR data and infrastructure

· Enabling the integration and interoperability of FHIR data with other solutions and platforms, such as Microsoft Fabric

If you are interested in learning more about the FHIR Landing Zone, you can find the code and the documentation on GitHub: https://github.com/kfprugger/hds-e2e. I hope you find this solution useful, and I welcome your feedback and suggestions.

Thank you for reading and happy kindle up those FHIRs and let’s see what we can create!

--

--

Joey Brakefield

Cloud Data Scientist in-training, former rugger, all-around geek. @kfprugger for my personal ramblins