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
fhir-moldef is available on PyPI: https://pypi.org/project/fhir-moldef/
For users who want to work directly with the source code, local development setup instructions are also provided below.
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).
Installation Steps
1. Install fhir-moldef with pip
fhir-moldef is available on PyPI.
pip install fhir-moldef
2. Optional: install additional dependencies
Additional dependency groups are available for translator functionality, example notebooks, and development tools. You can choose the dependency groups that best fit your use case.
To install all optional dependency groups:
pip install "fhir-moldef[translators,notebooks,dev]"
Local Development Setup
Clone the repository and create a local development environment if you want to work directly with the source code.
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.
Metadata
Release files for fhir-moldef 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fhir_moldef-0.7.1.tar.gz | 48.4 kB | Without provenance | Details for fhir_moldef-0.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fhir_moldef-0.7.1-py3-none-any.whl | Python 3 | none | any | Details for fhir_moldef-0.7.1-py3-none-any.whl |
Total release size: 104.7 kB
Release files / fhir_moldef-0.7.1.tar.gz
| Download URL | fhir_moldef-0.7.1.tar.gz |
|---|---|
| Size | 48.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c9bea1e4d7e97d34e074ada04d0c1ea4f7159849ad973b96588f4b344725bdb
|
|
BLAKE2b-256 checksum How to use checksums |
03e14d2d0790816f8f153c369fe6449a4811fa9a303421b57c059ee681dcde64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Release files / fhir_moldef-0.7.1-py3-none-any.whl
| Download URL | fhir_moldef-0.7.1-py3-none-any.whl |
|---|---|
| Size | 56.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25d122377a5f60f6fd429720abdcc8942447e6463c7c33aeadb804b21f4f9fc8
|
|
BLAKE2b-256 checksum How to use checksums |
aeef690f472bcbff0c12941042723c01defcec541b7fcdf1ae53a4a6ba931782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.12
|
Security for fhir-moldef 0.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.