Open ShahimEssaid opened 3 months ago
I'm starting some work in the "se-phenotypic-feature-review" branch.
A few working notes to use during our next meeting:
Issues to consider addressing related to modeling a phenotype, the PhenotypicFeature profile, and other related artifacts:
used to describe a phenotypic feature that characterizes the subject of the Phenopacket
does not make sense in FHIR since, in FHIR, an Observation points to it's subject and there is no equivalent of the idea of a subject of the Phenopacket
. This section should be written from the point of view of FHIR and later can be mapped to concepts in Phenopacket in a separate section.severity
component discriminator. Should we use LOINC as well? This? https://loinc.org/LL6109-4
modifiers
slice instead of it being its own slice?required
binding to HPO? I think we should be more flexible here, and allow folks to extend as they see fit. Explore R5's new binding features.pattern
discriminator type is now deprecated and we should update to value
. See: https://hl7.org/fhir/R5/profiling.html#discriminatorcontains
rule, etc.display
as part of the discriminator.onset
not fully modeled (the coded onset is not available) but there is this extension:
Condition
.component
approach for all phenotype modeling but a general extension for various resources might be more flexible especially if we need some complex structure.resolution
not modeled (same as above)From @julsas , and example of an extension for the onset/resolution issue above. See: https://simplifier.net/mii-basismodul-diagnose-2024/mii_pr_diagnose_condition https://simplifier.net/packages/de.basisprofil.r4/1.4.0/files/656774
We can implement something similar, and to be applied to the appropriate contexts even nesting into Period.
pattern discriminator type is now deprecated and we should update to value. See: https://hl7.org/fhir/R5/profiling.html#discriminator
To clarify: I understand this should work in R4 because 'pattern' and 'value' as discriminator types work the same way and hence they deprecated 'pattern' in R5. What 'value' as a discriminator does is, it checks ElementDefinition.pattern[x]
and ElementDefinition.fixed[x]
and decides whether the profile defines a fixed value or pattern via these elements. So the discriminator type 'pattern' is deprecated but we can still use the concept of patterns in profiling.
The default in FSH is pattern, so something like
* component[severity].code.coding = $hpo#HP:0012824
will become
"patternCoding": {
"code": "HP:0012824",
"system": "http://human-phenotype-ontology.org"
}
The 'exactly' keyword in FSH will switch this to fixedCoding
but we shouldn't use this here because it is less flexible.
* component ^slicing.discriminator.type = #pattern
* component ^slicing.discriminator.path = "code.coding"
* component ^slicing.rules = #open
Btw. it is sufficient to declare this once. It does not need to be repeated on every component. And we should change the path to just "code", because atm we don't allow alternative codings.
Yes, I read a little more of the FSH docs. Specifically, the assignment rules section: https://build.fhir.org/ig/HL7/fhir-shorthand/reference.html#assignment-rules It helped clarify that the keyword exactly
is the one that drives the pattern[x] vs fixed[x]. I did not see a difference in the Sushi output if we use #value vs #pattern but I don't know if that has any implication for the validator when it validates R4.
I'm still interested in learning if the LOINC LLx codes are okay to use or not for the discriminator. From reading the LOINC documentation here it appears that the LLx codes are similar to the regular codes, and maybe we can use them that way.
Reviewing our PhenotypicFeature profile and related content. This issue is to track and discuss anything while we review the current modeling of a phenotype. This first post can be considered a wiki post and a summary of the review status.