medizininformatik-initiative / kerndatensatzmodul-mikrobiologie

1 stars 0 forks source link

Wrong datatype in several profiles for fixed-code semantics #13

Closed jpwiedekopf closed 8 months ago

jpwiedekopf commented 8 months ago

In several profiles, the Observation.category.coding.code is fixed using fixedCode:

{
  "id": "Observation.category.coding:loinc-microbiology-studies.code",
  "path": "Observation.category.coding.code",
  "min": 1,
  "fixedCode": "microbiology studies"
}

The category is of FHIR data type CodeableConcept, so using "fixedCode": "microbiology studies" is definitely wrong - this would be the display.

Instead, it should be sliced identically to the Observation.code:

"patternCodeableConcept": {
  "coding": [
    {
      "system": "http://loinc.org",
      "code": " 18725-2"
    }
  ]
}

Note also the hint in the FHIR specification for ElementDefinition:

This is not recommended for Coding and CodeableConcept since these often have highly contextual properties such as version or display.

and the invariant eld-24:

pattern[x] should be used rather than fixed[x]

It is certainly doable to use fixedCoding here, but this is not generally used within the CDS modules. Instead, patternCodeableConcept is generally used for fixed codes as shown above.

The following Observation profiles are affected:


edit1: add invariant eld-24 edit2: Checklist

jpwiedekopf commented 8 months ago

Feedback von Eugenia:

Für das Issue in Category.coding, “fixed value” kann gerne durch ein Pattern ersetzt werden.

Super, bitte so durchführen. Ich lasse oben mal eine Checkliste ;)

rinaldie commented 8 months ago

Thanks for the checklist, it really helped! it is done.