medizininformatik-initiative / kerndatensatzmodul-mikrobiologie

1 stars 0 forks source link

Wrong cardinality for slice in profile DiagnosticReport #11

Closed jpwiedekopf closed 8 months ago

jpwiedekopf commented 8 months ago

In the DiagnosticReport profile, the DiagnosticReport.category.coding is sliced.

There are slices :snomed-microbiology-studies (cardinality 1..1), and :loinc-microbiology-specialization (0..1), but the cardinality on the base element is 3..*:

[
  {
    "id": "DiagnosticReport.category.coding",
    "path": "DiagnosticReport.category.coding",
    "min": 3
  },
  {
    "id": "DiagnosticReport.category.coding:snomed-microbiology-studies",
    "path": "DiagnosticReport.category.coding",
    "sliceName": "snomed-microbiology-studies",
    "min": 1,
    "max": "1",
    "fixedCoding": {
      "system": "http://snomed.info/sct",
      "code": "4341000179107",
      "display": "Microbiology report (record artifact)"
    },
    "binding": {
      "strength": "required"
    }
  },
  {
    "id": "DiagnosticReport.category.coding:loinc-microbiology-specialization",
    "path": "DiagnosticReport.category.coding",
    "sliceName": "loinc-microbiology-specialization",
    "max": "1",
    "constraint": [
      {
        "key": "dia-ic-highmed-1",
        "severity": "error",
        "human": "Microbiology LOINC Spezialisierungen dürfen nur ausgewählt werden, falls der Report als Microbiology studies kodiert wurde",
        "expression": "%resource.category.where(coding.where(code = '18725-2' and system = 'http://loinc.org').exists()).exists()"
      }
    ],
    "binding": {
      "strength": "required",
      "valueSet": "https://www.medizininformatik-initiative.de/fhir/modul-mikrobiologie/ValueSet/mii-vs-mikrobio-befundtyp-loinc"
    }
  }
]

This way, implementers would be forced to make up something for this coding to be conformant to the profile.


Simplifier: https://simplifier.net/medizininformatik-initiative-modul-mikrobiologie/mii_pr_mikrobio_diagnostic_report

jpwiedekopf commented 8 months ago

If you are intending to make this represent the constraint on DiagnosticReport.category.coding:loinc-microbiology-specialization, there should be a mandatory slice on DiagnosticReport.category.coding with fixedCoding, and another slice with the specialization (as currently modelled), because otherwise, this is really confusing.

jpwiedekopf commented 8 months ago

Feedback von Eugenia:

DiagnosticReport Category.coding hat doch 4 slices (2 sind von Modul Labor abgeleitet)

Fair point! Ich habe nur den snapshot im JSON gelesen, und daraus wird es nicht klar. Solange man den Snapshot, z.B. in Simplfier sieht, ist es klar. Sollte dann aber im IG (explizit) erwähnt werden! Unter https://simplifier.net/guide/medizininformatikinitiative-modulmikrobio-implementationguide/IG-MII-Modul-Mikrobiologie/Technische-Implementierung/FHIR-Profile/Befund-DiagnosticReport.page.md?version=current wird zwar auf die Vorgaben des Labor-Profils hingewiesen, aber ein expliziter Hinweis wäre sicher nicht verkehrt.

Mache ein enhancement aus diesem Issue, ich sehe dies nicht mehr als Blocker.

rinaldie commented 8 months ago

IG wurde angepasst