/hapi-fhir-server

Primary LanguageJavaApache License 2.0Apache-2.0

HAPI FHIR Server Setup

This repository contains code for setting up a HAPI FHIR server and loading synthetic patient data using Synthea.

Required Python Libraries

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.

Setup Instructions

  1. Clone this repository:

    git clone https://github.com/suriyan3/hapi-fhir-server.git
    
  2. Navigate to the project directory:

    cd hapi-fhir-server
    
  3. Run the HAPI FHIR server using Docker Compose:

    docker-compose up
    
  4. Wait for the Synthea service to generate JSON files. The service will automatically stop after generating the files.

  5. 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.

Notes

  • 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.