Changelog
v2.0.7
A patch release fixing four defects found while exporting a non-RareLink-CDM cohort through the Phenopacket engine.
Phenopacket Engine — repeated elements:
Fixed
DiseaseMapper._map_multi_entitymapping every repeated disease element to the first element’s term. The whole record (includingrepeated_elements) was passed into_map_single_entity, so whenever the inner dict was not keyed by the instrument name the lookup fell back to a whole-record scan and returned the first match — emitting N copies of disease #1 instead of N distinct diseasesFixed
PhenotypicFeatureMapper._extract_type_valuesconsulting the whole-record multi-instrument scan before the element being mapped, so every phenotypic feature in a record inherited the first HPO term. De-duplication then collapsed the duplicates, leaving a packet that looked correct. Thetype_fields(plural) branch read the element directly and was always correct, so the two configuration spellings silently disagreedAdded
resolve_element_inner()and a singleCDM_INNER_KEY_MAPinrarelink.utils.field_access; the instrument-to-inner-key table had been duplicated verbatim infield_accessandcommon_utilsAdded regression tests asserting that distinct repeated elements stay distinct, and that
type_fieldandtype_fieldsagree (tests/phenopackets/test_repeated_elements_are_distinct.py)
Phenopacket Engine — metadata and labels:
Fixed
metaData.resourcesbeing empty for every packet built with the documented default configuration ("metadata": {}). A default-constructedCodeSystemsContainer()has every field set toNoneand the metadata mapper skipped falsy fields; it now falls back to the LinkML enum named by the field annotation, which already carries the name and version, and takes the namespace prefix from the existing_FIELD_TO_PREFIXEStableAdded
set_label_dict()/get_label_dict()torarelink.utils.label_fetching: a process-wide dictionary consulted byfetch_labelitself.--label-dictpreviously reassigned the module attribute, which only reached call sites that had not already donefrom .label_fetching import fetch_label— so labels resolved on some code paths and rendered as"Unknown Assay"/"Unknown Procedure"on others, depending on import order
CLI — file-based exports:
validate_env()now validates only the keys it is given. It previously enforced the full REDCap credential set regardless of itsrequired_keysargument, sorarelink phenopackets export --input-path ...— which reads a local JSON file and never touches the REDCap API — failed unless the user supplied a REDCap URL, a numeric project ID and two 32-character tokens--created-bynow satisfies theCREATED_BYrequirement without a.enventry, and--label-dictno longer requires a BioPortal API token, so a fully offline export needs no.envfile at all
De-identified cohorts:
Added
emit_date_of_birthto theindividualmapping block. Setting it toFalsekeeps the derived ageTimeElements while withholdingsubject.dateOfBirth— the common case for registry data that records an age but no birth date, where a date must be synthesised so ages can be computed but must not be published
v2.0.6
Phenopacket Export Pipeline:
Fixed camelCase serialization in Phenopacket JSON output (
preserving_proto_field_name=False), producing valid GA4GH Phenopacket v2 JSON (#205)Integrated
validate.pyinto the export pipeline with a two-tier approach: Python-native structural checks (required fields, CURIE format, schema version) plus optionalphenopacket-toolsCLI fallback when available on PATHAdded ontology-prefix placement checks as soft validation warnings (e.g. HP: terms outside
phenotypicFeatures, MONDO: terms outsidediseases)Improved CLI export with Rich progress bars: sequential two-phase display (creation bar completes before validation bar appears)
Added structured warnings system: mapper warnings (e.g. “No diagnosis ID found”) now use
warnings.warn()consistently, are captured per-record with record ID context, and displayed in the export summaryAdded
warnings.jsonoutput file alongsidefailures.jsonfor detailed warning inspectionExport summary now includes a Warnings column for both creation and validation stages with deduplicated counts
RD-CDM v2.0.3 Integration:
Updated to rd-cdm v2.0.3 with eleven updated ontology/code system versions and the replacement of the deprecated SNOMED CT Sex at Birth concept with LOINC
76689-9Updated the RareLink-CDM REDCap data dictionary and instruments to reflect rd-cdm v2.0.3 changes
Updated Phenopacket and FHIR export pipelines to use the revised code systems and data element definitions
Ontology Routing Adapter:
Designed
ontology_routing_adapter.pyfor use cases where single repeated elements contain mixed ontology prefixes (e.g. HP and MONDO codes in the same instrument), enabling automatic routing of HP codes tophenotypicFeaturesand MONDO/OMIM/ORDO codes todiseases(#207)
Package & Dependencies:
Reduced core dependencies from ~20 to ~10 by moving test, docs, Docker, numpy, and pandas to optional extras (
[test],[docs],[fhir],[data],[dev])Removed unused dependencies:
node,npm,config,schema-automator,tqdmRemoved the
rarelink_cdm/rd_cdm/codegen subfolder (unused at runtime); future versions will import directly from therd-cdmPyPI package
Infrastructure:
Documentation & Tests:
Updated installation docs to document optional extras (
pip install rarelink[fhir],pip install rarelink[data], etc.)Updated tests to work with
PipelineResultdataclass return type and corrected mock patch pathsRemoved unused numpy/pandas references from Sphinx
conf.py
v2.0.5 (2025-12-12)
Fixed a few of bugs
enhanced versioning and refactored repo folders
improved the functionality of MedicalActions for Phenopackets export
included MaXo as a novel coding system into the LinkML schema, Python classes, REDCap data dictionary and for Phenopackets export.
See release notes here for more detail: https://github.com/BIH-CEI/rarelink/releases/tag/v2.0.5
v2.0.4 (2025-09-25)
FHIR Export: fixed CLI export and tofhir config .yml and docker files for the FHIR export and module
FHIR IG: fixed image paths in the FHIR IG to correctly display the RD-CDM image
v2.0.3 (2025-09-24)
FHIR-IG: Fixed RareLink FHIR IG version label back to 2.0.0
PyPi package: Excluded the entire FHIR IG from the PyPi package to reduce package size (in a future version the RareLink FHIR IG will be published as a separate Git repo and package)
Figure: Updated overview Figure in the README and documentation to reflect the current state of the RareLink framework
RareLink-Phenopacket engine: fixed Metadata mapper to correctly include the ontologies within the VariationDescriptors
RareLink-Phenopacket engine: fixed label fetching from local JSONs for pipeline
Warnings: fixed DeprecationWarnings in code and tests
v2.0.2 (including v2.0.1)
The current version now published is v2.0.1.
The following changes have been made since the last version:
Dynamic versioning for code systems:
Implemented dynamic retrieval of the latest CodeSystemsContainer definitions from the RD-CDM PyPi package so that the RareLink-CDM always reflects the most current ontology/code system versions.
The RareLink/CDM engine also updates the entire RareLink-CDM and its toFHIR mappings when updates of element codes or ontology versions were made to the RD-CDM package.
The MetaData mapper of the Phenopacket Engine now scans actual Phenopacket content to detect which code systems (e.g., MONDO, HPO, LOINC, HGVS, GENO) are used and inserts only those resources with their correct, up-to-date version identifiers to ensure generated Phenopackets remain consistent with the latest controlled vocabularies without manual version updates.
Phenopacket Pipeline:
included automatic conversion the zygosity LOINC codes from the RareLink-CDM to the GENO ontologies. This ensures compliance with Phenopacket-analysis algorithms such as `GPSEA<https://www.medrxiv.org/content/10.1101/2025.03.05.25323315.abstract>`_.
deacivated for the Phenopacket pipeline because the HGVS variant remains required for the pipeline and includes the structural variant information.
included automatic transversion syntax code from
hgvstohgvs.c,hgvs.g,hgvs.p, andhgvs.mfor HGVS variants depending on the variant type. This ensures compliance with Phenopacket-analysis algorithms such as GPSEA.Fixed serialization of vital_status so that in the case of an empty or unknown (3.1) Vital Status within the RareLink-CDM, the default Phenopacket status ``UNKNOWN_STATUS``is passed to the Phenopacket.
Updated _rarelink_redcap_validate_hgvs command:
Added –hgvs-variable (-v) option to the validate-hgvs CLI command
Users can now supply one or more custom HGVS field names; if omitted, the default HGVS_VARIABLES list is used.
Enhanced validate_and_encode_hgvs to recursively scan nested dicts and lists for HGVS variables at any depth
Refactored the CLI command to pass the user-provided hgvs_variables list (or fall back to defaults) into the validator
Documentation updated to reflect the new hgvs-variable option and the improved nesting behavior
Customising the RareLink-CDM data dictionary:
Added a section on how to customise the RareLink-CDM data dictionary to suit your specific needs or simplify manual data capture: Customise the Data Dictionary.
This includes guidelines on how to hide fields, change field labels and descriptions, and add new fields and instruments as extensions to the RareLink-CDM.
Added the hint on the REDCap Multi-languag Management for the RareLink-CDM
Published on PyPi
The RareLink package is now available on PyPi, making it easier to install and use: https://pypi.org/project/rarelink/.
Fixed bugs:
Fixed the Windows bug within the
masked_inputCLI tool function for the CLI commandrarelink setup keys.
v2.0.0
First published and stable version of RareLink. This version includes the initial set of features and functionalities that were developed and tested.
Also, the FHIR Implementation Guide is finished, validated through the IG publisher including the test instances, and is available at: https://bih-cei.github.io/rarelink/.
v2.0.0.dev1 (Under Development)
This version was unstable and was used for testing and development purposes. It is not recommended for production use.
Previous versions (up to v2.0):
The ERKER project was the previous version of RareLink and can still be found in the ERKER GitHub repository. However, the ERKER project is no longer maintained and has been replaced by RareLink.