Skip to main content

A Python implementation of the HL7 FHIR MolecularDefinition resource that supports associated profiles and enables bidirectional translation between MolecularDefinition profiles and genomic representations, including VRS, HGVS, and SPDI.

Project description

fhir-moldef

Overview

Welcome to the fhir-moldef repository. This project provides a Python implementation of the HL7 (Health Level Seven) Fast Healthcare Interoperability Resources (FHIR) Molecular Definition standard. It enables users to create instances of the MolecularDefinition resource and currently supports three profiles: Sequence, Allele, and Variant.

Additionally, this repository supports seamless, bidirectional translation between Global Alliance for Genomics and Health (GA4GH) Variant Representation Specification (VRS) Alleles (v2.0) and the FHIR Allele Profile, enabling interoperability between the two standards.

Disclaimer

This project uses the MolecularDefinition schema from the latest in-progress development version: Work in Progress Schema. This page may occasionally be unavailable due to active development.

It does not match the schema in the HL7 FHIR 6.0.0 Ballot 2 release: FHIR Ballot 2 Schema.

Core Functionality

Category Currently Supported
Resource Generation of HL7 FHIR MolecularDefinition resources
Profiles Sequence, Allele, and Variant profiles
Translation Bidirectional translation between VRS 2.0 and FHIR (full + minimal)
Notebooks Interactive Jupyter notebooks with examples (see the Notebooks README for details)
Pipeline Extraction of VRS Allele objects from ClinVar variation files and translation into the FHIR Allele Profile

Installation Status

This package is not currently published on PyPI but will be available soon.
In the meantime, clone the repository and follow the instructions below to work with the code locally.

Prerequisites

  • Python 3.11–3.13
  • Virtual environment (uv recommended): used to manage project dependencies

Dependencies & Infrastructure

The following infrastructure is required only for the VRS ↔ FHIR translation functionality:

  • PostgreSQL 14
  • SeqRepo (biocommons.seqrepo)

These dependencies are not required if you only plan to instantiate MolecularDefinition profiles.

For instructions on installing and configuring SeqRepo, see the VRS-Python SeqRepo installation guide.

Containerized setup instructions using Podman are planned, including configuration for running SeqRepo (and future UTA support).

Local Setup

Clone the repository and install the package in editable mode based on the parts of the project you want to work with.

git clone https://github.com/InformaticsGenomicMedicine/fhir-moldef.git
cd fhir-moldef

uv venv
source .venv/bin/activate

# Optional extras: dev, notebooks, translators
# Install all extras with: uv sync --all-extras
# Install multiple extras with: uv sync --extra dev --extra notebooks
uv sync --extra dev

Contributing

Contributions are welcome! Please feel free to fork the repository and submit a pull request.
You can also report bugs or suggest improvements by opening an issue.

Acknowledgments

This project builds upon the following community standards and open-source implementations.

Standards

Software

We gratefully acknowledge the communities and contributors who develop and maintain these standards and software projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fhir_moldef-0.7.0.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fhir_moldef-0.7.0-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file fhir_moldef-0.7.0.tar.gz.

File metadata

  • Download URL: fhir_moldef-0.7.0.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for fhir_moldef-0.7.0.tar.gz
Algorithm Hash digest
SHA256 bba95e15913db2aa9b01a63fc0fa6ab35469f1ff4cdf38977bd86428fa2b6501
MD5 218e5e88f30fef98edbe185b1d6e7adf
BLAKE2b-256 ecbb2f6b6a993cb2a94c1d107eb9850cd378a4e64b4fc527dd95297c2cb30ccb

See more details on using hashes here.

File details

Details for the file fhir_moldef-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: fhir_moldef-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for fhir_moldef-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b345c35b702768bc4c5e9df681b8a449be8e1b325d7ae49f7f5e40fc5587fb8
MD5 49b495fdf1e8b2654e0230dcc5c76c9a
BLAKE2b-256 daa45a3f7d3e321f034f46ef8e80bba869b74c0faff2b47ea2cf1ee558e57ce3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page