Skip to content

Fhir Cohort Generation is a command-line tool that reads an Excel file in FHIR cohort format and generates FHIR bundle JSON files from it. Each row in the template Excel file is used to create an individual JSON file, outputting them to a specified folder.

License

Notifications You must be signed in to change notification settings

nusifoh/Fhir_Cohort_Generation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fhir Python Cohort Generation

Fhir Python Cohort Generation is a command-line tool that reads an Excel file in FHIR cohort format and generates FHIR bundle JSON files from it. Each row in the template Excel file is used to create an individual JSON file, outputting them to a specified folder.

Table of Contents

Features

  • Reads an Excel file following the FHIR cohort import template.
  • Converts each row in the Excel file to a FHIR bundle JSON file.
  • Exports generated JSON files to a specified output folder.

Requirements

  • Python 3.x
  • Required Python packages (see requirements.txt)

Installation

  1. Clone this repository:
    git clone https://github.com/your-repo/fhir-python-cohort-generation.git
    cd fhir-python-cohort-generation
  2. Install the required packages:
    pip install -r requirements.txt

Usage

  1. Fill Out the Template:

    • Open the template file src/resources/Fhir_Cohort_Import_Template.xlsx.
    • Fill out each row with the relevant data.
  2. Run the Tool:

    • Use the main.py script with the required arguments:
      • --input: The path to the input Excel file.
      • --output: The path to the output folder where the JSON files will be saved.
    python main.py --input src/resources/Fhir_Cohort_Import_Template.xlsx --output /path/to/output/folder
  3. The tool will generate one FHIR bundle JSON file for each row defined in the template.

Example

python main.py --input src/resources/Fhir_Cohort_Import_Template.xlsx --output ./output_bundles
In this example, each row in the `Fhir_Cohort_Import_Template.xlsx` file will be processed, and a corresponding JSON file will be generated in the `output_bundles` folder.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

Fhir Cohort Generation is a command-line tool that reads an Excel file in FHIR cohort format and generates FHIR bundle JSON files from it. Each row in the template Excel file is used to create an individual JSON file, outputting them to a specified folder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%