HL7 / phenomics-exchange-ig

Phenomics Exchange IG
8 stars 6 forks source link

Phenotypic feature review #119

Open ShahimEssaid opened 3 months ago

ShahimEssaid commented 3 months ago

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.

ShahimEssaid commented 3 months ago

I'm starting some work in the "se-phenotypic-feature-review" branch.

ShahimEssaid commented 3 months ago

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:

ShahimEssaid commented 3 months ago

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.

julsas commented 3 months ago

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.

julsas commented 3 months ago
* 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.

ShahimEssaid commented 2 months ago

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.