ga4gh / ga4gh/phenopacket-schema
Allow semantic linking of schema elements (e.g., Inferred Phenotypic Features from Measurements)
- Dominant language
- Java
- Stars
- 101
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
## Background
Currently, a `Measurement` with an abnormal value may imply a `PhenotypicFeature`, but the schema lacks a built-in mechanism to formally link the two. For instance, a `Measurement` for `LOINC:26515-7` (Platelets [#/volume] in blood), if abnormally low, directly implies a `PhenotypicFeature` for Thrombocytopenia (`HP:0001873`). In many clinical integrations, it is better to store both the quantitative measurement and the qualitative ontology term while preserving their relationship.
This is a specific instance of a broader architectural issue: we frequently need to link various building blocks to ensure AI-ready provenance and a clear clinical narrative. Other examples include:
- Linking a `MedicalAction` to a `PhenotypicFeature` or `Disease` (e.g., administering lithium to treat Mania, or performing an MRI to discover an abnormality of the corpus callosum).
- Linking a `PhenotypicFeature` to a `Disease` to explicitly document which features were key to establishing the diagnosis.
- Modeling the treatment of a recurrent phenotypic feature, which is currently difficult because treatments are linked to particular occurrences rather than to an ontology term.
## Proposed solutions for discussion
- Option 1 (Targeted): Add an ontology class called `inferred_phenotypic_feature` (`OntologyClass`) directly to `Measurement`. (e.g., if blood sugar = 10, inferred feature = Hypoglycemia `HP:0001943`). Note: We must specify the intended semantics here. A `PhenotypicFeature` implies a characteristic abnormality, whereas a measurement might simply capture a transient state (e.g., High Blood Sugar 30 minutes after eating).
- Option 2 (Generalized): Introduce a unique ID system to `PhenotypicFeature`, `Measurement`, and `MedicalAction` elements, allowing them to cross-reference one another within a single Phenopacket payload.
Contributor guide
Research direction
Start by reviewing the Measurement, PhenotypicFeature, and MedicalAction schema elements and the examples in the issue. Compare the targeted inferred_phenotypic_feature approach with generalized cross-references, including their intended semantics. Done means the relationship model and its scope are agreed for implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100