RareLink - A REDCap-based Python framework linking international registries to HL7 FHIR and GA4GH Phenopackets
Project description
A novel rare disease framework for REDCap linking international registries to FHIR and Phenopackets.
Framework
Packages & Compatibility
-> This way to the RareLink documentation
-> This way to the RareLink FHIR Implementation Guide
Note: The paper has been submitted to a journal - you can find the preprint here: https://www.medrxiv.org/content/10.1101/2025.05.09.25327342v1
Table of Contents
Project Description
RareLink - A novel rare disease framework in 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
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.
- Phenopacket Export: Predefined configurations enable seamless export of the RD-CDM data to validated Phenopackets utilising the Phenopacket Mapper. RareLink guides ensure compatibility for developing custom REDCap instruments and LinkML-based extensions.
- 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.2, the HL7 GenomicsReporting v3.0.0 or FHIR Base Resources (v4.0.1).
- 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 can be set up using various Python project management approaches. One
common method is to use a virtual environment. Below is an example where the
virtual environment is named rarelink-venv, but you can name it as you prefer:
python3.12 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
Note: You need Python ≥3.10 but <3.13 to be able to use RareLink!
Next, clone the RareLink repository, navigate to its root directory, and install RareLink using:
git clone https://github.com/BIH-CEI/rarelink.git
cd rarelink
pip install .
If you want to install development dependencies (e.g., pytest), use:
pip install .[dev]
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:
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@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, Version 2025-05-06) 🔗
- Monarch Initiative Disease Ontology (MONDO, Version Version 2025-06-03) 🔗
- Online Mendelian Inheritance in Man (OMIM, Version OMIM2024_08_09) 🔗
- Orphanet Rare Disease Ontology (OPRHA, Version OMIM2024_08_09) 🔗
- National Center for Biotechnology Information Taxonomy (NCBITaxon, Version 2024-07-03) 🔗
- Logical Observation Identifiers Names and Codes (LOINC, Version LNC278) 🔗
- HUGO Gene Nomenclature Committee (HGNC, Version 2024-08-23) 🔗
- Gene Ontology (GENO, Version 2023-10-08) 🔗
- NCI Thesaurus OBO Edition (NCIT, Version Version 24.01e ) 🔗
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.
- 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.3.tar.gz.
File metadata
- Download URL: rarelink-2.0.3.tar.gz
- Upload date:
- Size: 8.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d10e9b5d986919fb846042868d3e6e97e4e59313de0f4a8c6a08645fffc0a3
|
|
| MD5 |
bfb5abeb71e527b7eb20185f36da1ca0
|
|
| BLAKE2b-256 |
228b30c50e2ca9ceee01a639c890b3fa7b7087514971ac08a22a18c42caaee98
|
Provenance
The following attestation bundles were made for rarelink-2.0.3.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.3.tar.gz -
Subject digest:
c2d10e9b5d986919fb846042868d3e6e97e4e59313de0f4a8c6a08645fffc0a3 - Sigstore transparency entry: 552150393
- Sigstore integration time:
-
Permalink:
BIH-CEI/rarelink@35776324d99c523551f31d71bd338ed1b3b93a91 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BIH-CEI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35776324d99c523551f31d71bd338ed1b3b93a91 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file rarelink-2.0.3-py3-none-any.whl.
File metadata
- Download URL: rarelink-2.0.3-py3-none-any.whl
- Upload date:
- Size: 348.5 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 |
fd526b7c6d46480c9570bb44f7b2dcb430d0dca4cbd8bfdb9773918b2fa50e23
|
|
| MD5 |
1a914a69dbe3f3d84839930195c57747
|
|
| BLAKE2b-256 |
ba2346a95b92f3a913b97f9045491ada549c3a1087a70440eeba784a75d265bb
|
Provenance
The following attestation bundles were made for rarelink-2.0.3-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.3-py3-none-any.whl -
Subject digest:
fd526b7c6d46480c9570bb44f7b2dcb430d0dca4cbd8bfdb9773918b2fa50e23 - Sigstore transparency entry: 552150415
- Sigstore integration time:
-
Permalink:
BIH-CEI/rarelink@35776324d99c523551f31d71bd338ed1b3b93a91 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/BIH-CEI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@35776324d99c523551f31d71bd338ed1b3b93a91 -
Trigger Event:
workflow_dispatch
-
Statement type: