Skip to content

madgik/fhir-to-mip-schema-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FHIR to MIP Schema Conversion

This repository provides a tool to convert FHIR data into MIP schema data models, transforming features and outcomes, adjusting field names, and ensuring proper handling of categorical and numerical variables.

Features

  • Converts FHIR JSON data to MIP schema format.
  • Transforms boolean fields and handles numeric min/max values.
  • Logs rejected features and outcomes based on validation.
  • Dynamically set input/output file paths using argparse.

Usage

  1. Install dependencies using Poetry:

    poetry install
  2. Run the conversion script:

    poetry run python converter/fhir2mip.py <input_path> <output_path> <rejected_file_path>

    Example:

    poetry run python converter/fhir2mip.py data/minimal_fhir.json  transformed_data.json rejected_codes.txt

Testing

Run the tests using pytest:

poetry run pytest

Files

  • converter.py: Main script to handle the transformation from FHIR to MIP schema.
  • tests/: Contains unit tests for validation of the transformation logic.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages