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_entity mapping every repeated disease element to the first element’s term. The whole record (including repeated_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 diseases

  • Fixed PhenotypicFeatureMapper._extract_type_values consulting 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. The type_fields (plural) branch read the element directly and was always correct, so the two configuration spellings silently disagreed

  • Added resolve_element_inner() and a single CDM_INNER_KEY_MAP in rarelink.utils.field_access; the instrument-to-inner-key table had been duplicated verbatim in field_access and common_utils

  • Added regression tests asserting that distinct repeated elements stay distinct, and that type_field and type_fields agree (tests/phenopackets/test_repeated_elements_are_distinct.py)

Phenopacket Engine — metadata and labels:

  • Fixed metaData.resources being empty for every packet built with the documented default configuration ("metadata": {}). A default-constructed CodeSystemsContainer() has every field set to None and 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_PREFIXES table

  • Added set_label_dict() / get_label_dict() to rarelink.utils.label_fetching: a process-wide dictionary consulted by fetch_label itself. --label-dict previously reassigned the module attribute, which only reached call sites that had not already done from .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 its required_keys argument, so rarelink 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-by now satisfies the CREATED_BY requirement without a .env entry, and --label-dict no longer requires a BioPortal API token, so a fully offline export needs no .env file at all

De-identified cohorts:

  • Added emit_date_of_birth to the individual mapping block. Setting it to False keeps the derived age TimeElements while withholding subject.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.py into the export pipeline with a two-tier approach: Python-native structural checks (required fields, CURIE format, schema version) plus optional phenopacket-tools CLI fallback when available on PATH

  • Added ontology-prefix placement checks as soft validation warnings (e.g. HP: terms outside phenotypicFeatures, MONDO: terms outside diseases)

  • 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 summary

  • Added warnings.json output file alongside failures.json for detailed warning inspection

  • Export 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-9

  • Updated 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.py for 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 to phenotypicFeatures and MONDO/OMIM/ORDO codes to diseases (#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, tqdm

  • Removed the rarelink_cdm/rd_cdm/ codegen subfolder (unused at runtime); future versions will import directly from the rd-cdm PyPI package

Infrastructure:

  • Fixed toFHIR Docker Compose: updated Kafka image references from deprecated bitnami/kafka:latest to bitnamilegacy/kafka:3.7.0 following Bitnami’s August 2025 image deprecation (#210)

  • Added .DS_Store to .gitignore (#202)

Documentation & Tests:

  • Updated installation docs to document optional extras (pip install rarelink[fhir], pip install rarelink[data], etc.)

  • Updated tests to work with PipelineResult dataclass return type and corrected mock patch paths

  • Removed 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 hgvs to hgvs.c, hgvs.g, hgvs.p, and hgvs.m for 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.

Published on PyPi

Fixed bugs:

  • Fixed the Windows bug within the masked_input CLI tool function for the CLI command rarelink 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.