RareLink - A REDCap-based Python framework linking international registries to HL7 FHIR and GA4GH Phenopackets
Project description
Framework
Packages & Compatibility
A novel REDCap-based framework for rare disease interoperability linking international registries to HL7 FHIR and GA4GH Phenopackets. The corresponding paper was recently published in npj Genomic Medicine! You can read it here: https://www.nature.com/articles/s41525-025-00534-z
-> This way to the RareLink documentation
-> This way to the RareLink FHIR Implementation Guide
Table of Contents
Project Description
RareLink is a novel rare disease framework based on REDCap that connects international registries, FHIR, and Phenopackets. It provides comprehensive documentation and user guides to enable sustainable data management for your local rare disease REDCap project.
Built on the RD-CDM,
all RareLink-CDM pipelines are preconfigured to generate FHIR resources compliant
with the HL7 International Patient Summary
, HL7 Genomics Reporting profiles
or validated GA4GH Phenopackets. For disease-specific extensions, detailed guides
are available to help you develop sheets that integrate seamlessly with the
RareLink framework.
If you are familiar with REDCap but lack coding experience, you can still set up your local RareLink REDCap project and begin capturing data. However, some coding experience is recommended for accessing advanced functionalities.
Features
REDCap is a widely-used clinical electronic data capture system, licensed by institutions worldwide. RareLink enhances REDCap by providing detailed guidelines for structuring and encoding data to ensure seamless integration with its preconfigured FHIR and Phenopacket pipelines. Built on the Rare Disease Common Data Model v2.0 (RD-CDM) RareLink is ready-to-use and extensible for disease-specific requirements.
RareLink integrates the following features for rare disease data management in REDCap:
- RareLink CLI: Set up and manage your project via the Command Line Interface, including API setup, instrument configuration, and running FHIR or Phenopacket pipelines.
- Native REDCap Usage: Downloadable REDCap forms for all RD-CDM sections, complete with installation guides and manuals for manual data capture and BioPortal connection.
- Semi-Automated Data Capture: Use a template script to map your tabular data to the RareLink-CDM, which is in LinkML. This process includes syntactic mapping, local semantic encoding, validation, and data upload to REDCap for FHIR or Phenopacket export.
- RareLink-Phenopacket Engine: Predefined configurations enable seamless export of the RD-CDM data and extensions to validated Phenopackets -> User Guide.
- HL7 FHIR Export: RareLink uses the open-source toFHIR Engine to export data to any FHIR server, supporting profiles based on the HL7 International Patient Summary v2.0.0, the HL7 GenomicsReporting v3.0.0 and FHIR Base Resources (v4.0.1).
- Customising RareLink & RD-CDM Extensions: Guidelines for modeling and encoding custom data extensions ensure compatibility with the RareLink framework and its pipelines.
Getting Started
Begin by exploring the RareLink Background section to understand the framework's scope and components.
To start using RareLink, ensure you have access to a local REDCap license and a running REDCap server. For more information, visit the official REDCap site: https://projectredcap.org/partners/join/. If your institution already provides a REDCap instance, proceed to the RareLink Documentation on Setting Up a REDCap Project.
Installation
RareLink requires Python ≥3.10 and <3.13.
python3.12 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
Core install
pip install rarelink
This installs everything needed for REDCap interaction, Phenopacket export, and the RareLink CLI. It does not install Docker, numpy/pandas, or documentation/testing tools.
Optional extras
| Extra | Install command | What it adds |
|---|---|---|
fhir |
pip install rarelink[fhir] |
Docker SDK for the toFHIR FHIR export pipeline |
data |
pip install rarelink[data] |
numpy + pandas for tabular data processing |
test |
pip install rarelink[test] |
pytest and pytest-mock |
docs |
pip install rarelink[docs] |
Sphinx and documentation themes |
dev |
pip install rarelink[dev] |
All of the above plus build/twine/jupyter |
For development:
git clone https://github.com/BIH-CEI/rarelink.git
cd rarelink
pip install -e .[dev]
pytest
Setting Up the .env File
Create a .env file in the project root directory to store your BioPortal API
token securely. Add the following line:
BIOPORTAL_API_TOKEN=your_api_token_here
You can create your free BioPortal account here: https://bioportal.bioontology.org/ Then replace
your_api_token_herewith your actual BioPortal API token.
Running Tests
To ensure everything is set up correctly, run the test suite using pytest (this
may take a while...):
pytest
Notes
- Ensure that your
.envfile is not committed to version control by adding it to.gitignore. - If you encounter issues, verify you are using the correct Python version and have installed all dependencies properly.
Framework setup
To ensure you have the latest version of RareLink installed and to check the current version, run:
rarelink framework update
rarelink framework status
REDCap setup
To set up your local REDCap project, run:
rarelink setup redcap-project
For additional setup guidance, use:
rarelink setup --help
This will provide details about available commands, such as:
rarelink setup keysfor configuring, viewing, or reseting your local API config file.rarelink setup download-records --helpfor downloading RareLink REDCap sheets.rarelink setup data-dictionaryto upload the RareLink-CDM sheets to your REDCap project.
Note: Ensure that your local REDCap administrator has granted you API access to your REDCap project. Remember that the API token is sensitive information, so store it securely!
Semi-Automated Import to REDCap
To process and import your local (tabular) rare disease datasets into your RareLink REDCap project, refer to the user guide on Semi-Automatic Data Capture.
Export REDCap Data to FHIR
To export IPS-based FHIR resources to your local FHIR server, refer to the user guide on the IPS RareLink FHIR Export.
Export REDCap Data to Phenopackets
To export your REDCap RareLink data to validated Phenopackets, refer to the user guide on the RareLink Phenopacket Export.
Extensional Data Modeling in REDCap
To develop your local REDCap database for disease-specific extensions around the RD-CDM, refer to the guide on how to develop and model REDCap sheets for processing by the RareLink framework: RD-CDM RareLink Extension Guide.
Contributing
Please write an issue or exchange with other users in the discussions if you encounter any problems or wish to give feedback. Feel free to reach out to adam.graefe[at]charite.de, if you are interested in collaborating and improve the use of REDCap for rare disease research and care.
Resources
Ontologies
- Human Phenotype Ontology (HP) 🔗
- Monarch Initiative Disease Ontology (MONDO) 🔗
- Online Mendelian Inheritance in Man (OMIM) 🔗
- Orphanet Rare Disease Ontology (ORDO) 🔗
- National Center for Biotechnology Information Taxonomy (NCBITaxon) 🔗
- Logical Observation Identifiers Names and Codes (LOINC) 🔗
- HUGO Gene Nomenclature Committee (HGNC) 🔗
- Gene Ontology (GO) 🔗
- NCI Thesaurus OBO Edition (NCIT) 🔗
Submodules
License
This project is licensed under the terms of the open-source Apache 2.0 License
Acknowledgements
We would like to extend our thanks to everyone in the last three years for their support in the development of this project.
Citing
When using the software or its specifications please cite:
Graefe, A.S.L., Rehburg, F., Alkarkoukly, S. et al. RareLink: scalable REDCap-based framework for rare disease interoperability linking international registries to FHIR and Phenopackets. npj Genom. Med. 10, 72 (2025). https://doi.org/10.1038/s41525-025-00534-z
- Authors:
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rarelink-2.0.6.tar.gz.
File metadata
- Download URL: rarelink-2.0.6.tar.gz
- Upload date:
- Size: 8.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8a51b11b39bc392d4804c0723387a3347ce8e723091b5e1980393c7d14f828d
|
|
| MD5 |
49d6674ece12ec0ad5b9b2938ac105aa
|
|
| BLAKE2b-256 |
f82476dc8bffa7d436d0c2f6cfc862bff81819c78998797c834d14f6e142e450
|
Provenance
The following attestation bundles were made for rarelink-2.0.6.tar.gz:
Publisher:
publish.yml on BIH-CEI/rarelink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rarelink-2.0.6.tar.gz -
Subject digest:
f8a51b11b39bc392d4804c0723387a3347ce8e723091b5e1980393c7d14f828d - Sigstore transparency entry: 1194692473
- Sigstore integration time:
-
Permalink:
BIH-CEI/rarelink@ec68d59a9c9bd2e661eb4a3c469d8bdab9b59730 -
Branch / Tag:
refs/tags/v2.0.6 - Owner: https://github.com/BIH-CEI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec68d59a9c9bd2e661eb4a3c469d8bdab9b59730 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rarelink-2.0.6-py3-none-any.whl.
File metadata
- Download URL: rarelink-2.0.6-py3-none-any.whl
- Upload date:
- Size: 357.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f61cbfbd3b11360160a4145fb92abc1134db4c30db038d503e3d43f475472eec
|
|
| MD5 |
941d51aa13834ef4cf9d8bfe4fa70a0e
|
|
| BLAKE2b-256 |
9bf67e6af0cbe9381d4ef91085688cbf3f1f6e801b004901760e97982cf6c1c0
|
Provenance
The following attestation bundles were made for rarelink-2.0.6-py3-none-any.whl:
Publisher:
publish.yml on BIH-CEI/rarelink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rarelink-2.0.6-py3-none-any.whl -
Subject digest:
f61cbfbd3b11360160a4145fb92abc1134db4c30db038d503e3d43f475472eec - Sigstore transparency entry: 1194692511
- Sigstore integration time:
-
Permalink:
BIH-CEI/rarelink@ec68d59a9c9bd2e661eb4a3c469d8bdab9b59730 -
Branch / Tag:
refs/tags/v2.0.6 - Owner: https://github.com/BIH-CEI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec68d59a9c9bd2e661eb4a3c469d8bdab9b59730 -
Trigger Event:
push
-
Statement type: