This repository contains code for setting up a HAPI FHIR server and loading synthetic patient data using Synthea.
Make sure the following Python libraries are installed on your system before running the data loading script:
glob
os
requests
You can install these libraries using the following command:
pip install glob2 json5 os subprocess32 requests
Note: Make sure to replace glob2 with glob if you are using Python 3.5 and above.
-
Clone this repository:
git clone https://github.com/suriyan3/hapi-fhir-server.git
-
Navigate to the project directory:
cd hapi-fhir-server
-
Run the HAPI FHIR server using Docker Compose:
docker-compose up
-
Wait for the Synthea service to generate JSON files. The service will automatically stop after generating the files.
-
Once the service is stopped, run the Python script to upload the generated JSON files to the FHIR server:
python3 fhir_data_loader.py
This script will handle the data loading process.
- Ensure that Docker and Docker Compose are installed on your system.
- The Synthea service generates synthetic patient data in JSON format.
- The
fhir_data_loader.py
script uploads the generated JSON files to the HAPI FHIR server.