ahdis / matchbox

Apache License 2.0
28 stars 20 forks source link

terminology validation differences between IG Publisher #215

Closed oliveregger closed 7 months ago

oliveregger commented 8 months ago

There seems to be a difference in tx validation with the new matchbox version:

FHIR IG Publisher Version 1.6.3 (Git# 58fd9ba64d35) returns only display warnings for [Bundle-1c-TxProblem.json]( https://build.fhir.org/ig/ahdis/ch-elm/branches/oe_validationcmp/qa.html#_scratch_repo_input_resources_Bundle-1c-TxProblem}

With matchbox 3.8.0 there are mutliple errors when configured with the internal terminology server, especially two:

error [code-invalid]: line 28, column 10, in Bundle.entry[0].resource.type: The code '4241000179101' is not in the value set 'http://hl7.eu/fhir/laboratory/ValueSet/lab-reportType-eu-lab' (expansion contains 1 codes)

error [code-invalid]: line 206, column 10, in Bundle.entry[3].resource.value.ofType(CodeableConcept): The code '10828004' is not in the value set 'http://hl7.org/fhir/uv/ips/ValueSet/results-coded-values-laboratory-uv-ips' (expansion contains 0 codes)

image

matchbox 3.6.0 with ch-elm did not show this validation error behaviour (there is a constraint failing there but not validation issues but a constraint in the valueset)

OperationOutcome with machbox-ch-elm v.3.6.0

{
  "resourceType": "OperationOutcome",
  "id": "C711E430-2A7C-485D-A2A7-D0712AE96F2F",
  "issue": [
    {
      "extension": [
        {
          "extension": [
            {
              "url": "profile",
              "valueUri": "http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict"
            },
            {
              "url": "profileVersion",
              "valueUri": "1.1.1"
            },
            {
              "url": "profileDate",
              "valueDateTime": "2024-02-27T13:22:07+01:00"
            },
            {
              "url": "total",
              "valueDuration": {
                "value": 5068,
                "unit": "ms"
              }
            },
            {
              "url": "validatorVersion",
              "valueString": "powered by matchbox 3.6.0, hapi-fhir 7.0.0 and org.hl7.fhir.core 6.1.2.2"
            },
            {
              "url": "ig",
              "valueString": "ch.fhir.ig.ch-elm#1.1.1"
            },
            {
              "url": "hintAboutNonMustSupport",
              "valueBoolean": false
            },
            {
              "url": "recursive",
              "valueBoolean": false
            },
            {
              "url": "showMessagesFromReferences",
              "valueBoolean": false
            },
            {
              "url": "doDebug",
              "valueBoolean": false
            },
            {
              "url": "assumeValidRestReferences",
              "valueBoolean": false
            },
            {
              "url": "canDoNative",
              "valueBoolean": false
            },
            {
              "url": "noExtensibleBindingMessages",
              "valueBoolean": false
            },
            {
              "url": "noUnicodeBiDiControlChars",
              "valueBoolean": false
            },
            {
              "url": "noInvariants",
              "valueBoolean": false
            },
            {
              "url": "displayIssuesAreWarnings",
              "valueBoolean": true
            },
            {
              "url": "wantInvariantsInMessages",
              "valueBoolean": false
            },
            {
              "url": "doImplicitFHIRPathStringConversion",
              "valueBoolean": false
            },
            {
              "url": "securityChecks",
              "valueBoolean": false
            },
            {
              "url": "crumbTrails",
              "valueBoolean": false
            },
            {
              "url": "forPublication",
              "valueBoolean": false
            },
            {
              "url": "httpReadOnly",
              "valueBoolean": true
            },
            {
              "url": "allowExampleUrls",
              "valueBoolean": false
            },
            {
              "url": "txServer",
              "valueUri": "[http://localhost:80/matchboxv3/fhir](http://localhost/matchboxv3/fhir)"
            },
            {
              "url": "lang"
            },
            {
              "url": "snomedCT"
            },
            {
              "url": "fhirVersion",
              "valueString": "4.0.1"
            },
            {
              "url": "ig",
              "valueString": "ch.fhir.ig.ch-elm#1.1.1"
            },
            {
              "url": "locale",
              "valueString": "English"
            },
            {
              "url": "jurisdiction",
              "valueString": "urn:iso:std:iso:3166#US"
            },
            {
              "url": "sessionId",
              "valueString": "1620999587"
            },
            {
              "url": "package",
              "valueString": "hl7.fhir.xver-extensions#4.0"
            },
            {
              "url": "package",
              "valueString": "hl7.fhir.r4.core#4.0.1"
            },
            {
              "url": "package",
              "valueString": "hl7.fhir.uv.extensions.r4#1.0.0"
            },
            {
              "url": "package",
              "valueString": "hl7.terminology#5.4.0"
            },
            {
              "url": "package",
              "valueString": "fhir.dicom#2022.4.20221006"
            },
            {
              "url": "package",
              "valueString": "hl7.fhir.uv.ips#1.1.0"
            },
            {
              "url": "package",
              "valueString": "hl7.fhir.eu.laboratory#0.1.0-ballot"
            },
            {
              "url": "package",
              "valueString": "ihe.formatcode.fhir#1.1.0"
            },
            {
              "url": "package",
              "valueString": "ch.fhir.ig.ch-epr-term#2.0.10"
            },
            {
              "url": "package",
              "valueString": "ch.fhir.ig.ch-core#4.0.1"
            },
            {
              "url": "package",
              "valueString": "ch.fhir.ig.ch-lab-report#0.1.1"
            },
            {
              "url": "package",
              "valueString": "ch.fhir.ig.ch-elm#1.1.1"
            }
          ],
          "url": "http://matchbox.health/validiation"
        }
      ],
      "severity": "information",
      "code": "informational",
      "diagnostics": "Validation for profile [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1) (2024-02-27T13:22:07+01:00). Loaded packages: hl7.fhir.xver-extensions#4.0, hl7.fhir.r4.core#4.0.1, hl7.fhir.uv.extensions.r4#1.0.0, hl7.terminology#5.4.0, fhir.dicom#2022.4.20221006, hl7.fhir.uv.ips#1.1.0, hl7.fhir.eu.laboratory#0.1.0-ballot, ihe.formatcode.fhir#1.1.0, ch.fhir.ig.ch-epr-term#2.0.10, ch.fhir.ig.ch-core#4.0.1, ch.fhir.ig.ch-lab-report#0.1.1, ch.fhir.ig.ch-elm#1.1.1. Duration: 5.068s. powered by matchbox 3.6.0, hapi-fhir 7.0.0 and org.hl7.fhir.core 6.1.2.2. Validation parameters: CliContext{doNative=false, hintAboutNonMustSupport=false, recursive=false, showMessagesFromReferences=false, doDebug=false, assumeValidRestReferences=false, canDoNative=false, noExtensibleBindingMessages=false, noUnicodeBiDiControlChars=false, noInvariants=false, displayIssuesAreWarnings=true, wantInvariantsInMessages=false, doImplicitFHIRPathStringConversion=false, htmlInMarkdownCheck=WARNING, txServer='[http://localhost:80/matchboxv3/fhir',](http://localhost/matchboxv3/fhir',) lang='null', snomedCT='null', fhirVersion='4.0.1', ig='ch.fhir.ig.ch-elm#1.1.1', questionnaireMode=CHECK, level=HINTS, mode=VALIDATION, securityChecks=false, crumbTrails=false, forPublication=false, allowExampleUrls=false, locale='English', locations={}, jurisdiction='urn:iso:std:iso:3166#US', igsPreloaded=[ch.fhir.ig.ch-elm#1.1.1], onlyOneEngine=false, httpReadOnly=true}"
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 17
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 6
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        }
      ],
      "severity": "information",
      "code": "informational",
      "diagnostics": "This element does not match any known slice defined in the profile [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1) Slice info: 1.) Bundle.entry[0]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition')) 2.) Bundle.entry[0]: Bundle.entry[0].resource.section[0].entry[0]: Unable to find a match for profile Observation/1bObs-NeisseriaGonorrhoeae among choices: http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory 3.) Bundle.entry[0]: Bundle.entry[0].resource.section[0].entry[0]: Bundle.entry[0].resource.entry[3].resource/*Observation/1bObs-NeisseriaGonorrhoeae*/: Rule ch-elm-expecting-specimen-specification: 'If Observation.code is a member of http://fhir.ch/ig/ch-elm/ValueSet/ch-elm-expecting-specimen-specification, then Specimen.type must be a member of the mapped ValueSet in http://fhir.ch/ig/ch-elm/ConceptMap/ch-elm-expecting-specimen-specification-to-results-completion-vs' Failed 4.) Bundle.entry[0]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient')) 5.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Patient' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient%7C1.1.1',) but found type 'Composition' 6.) Bundle.entry[0]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer')) 7.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Practitioner' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer%7C1.1.1',) but found type 'Composition' 8.) Bundle.entry[0]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer')) 9.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'PractitionerRole' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer%7C1.1.1',) but found type 'Composition' 10.) Bundle.entry[0]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization')) 11.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Organization' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization%7C4.0.1',) but found type 'Composition' 12.) Bundle.entry[0]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson')) 13.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'RelatedPerson' in profile '[http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1',](http://hl7.org/fhir/StructureDefinition/RelatedPerson%7C4.0.1',) but found type 'Composition' 14.) Bundle.entry[0]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device')) 15.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Device' in profile '[http://hl7.org/fhir/StructureDefinition/Device|4.0.1',](http://hl7.org/fhir/StructureDefinition/Device%7C4.0.1',) but found type 'Composition' 16.) Bundle.entry[0]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter')) 17.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Encounter' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter%7C4.0.1',) but found type 'Composition' 18.) Bundle.entry[0]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location')) 19.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Location' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location%7C4.0.1',) but found type 'Composition' 20.) Bundle.entry[0]: Does not match slice 'DiagnosticReport' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport')) 21.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'DiagnosticReport' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport%7C1.1.1',) but found type 'Composition' 22.) Bundle.entry[0]: Does not match slice 'Observation' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict')) 23.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Observation' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict%7C1.1.1',) but found type 'Composition' 24.) Bundle.entry[0]: Does not match slice 'Specimen' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen')) 25.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'Specimen' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen%7C1.1.1',) but found type 'Composition' 26.) Bundle.entry[0]: Does not match slice 'ServiceRequest' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order')) 27.) Bundle.entry[0]: Bundle.entry[0].resource: Specified profile type was 'ServiceRequest' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order%7C1.1.1',) but found type 'Composition'",
      "expression": [
        "Bundle.entry[0]"
      ]
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 74
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 6
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        }
      ],
      "severity": "information",
      "code": "informational",
      "diagnostics": "This element does not match any known slice defined in the profile [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1) Slice info: 1.) Bundle.entry[1]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition')) 2.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Composition' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition%7C1.1.1',) but found type 'DiagnosticReport' 3.) Bundle.entry[1]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient')) 4.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Patient' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient%7C1.1.1',) but found type 'DiagnosticReport' 5.) Bundle.entry[1]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer')) 6.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Practitioner' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer%7C1.1.1',) but found type 'DiagnosticReport' 7.) Bundle.entry[1]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer')) 8.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'PractitionerRole' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer%7C1.1.1',) but found type 'DiagnosticReport' 9.) Bundle.entry[1]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization')) 10.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Organization' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization%7C4.0.1',) but found type 'DiagnosticReport' 11.) Bundle.entry[1]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson')) 12.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'RelatedPerson' in profile '[http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1',](http://hl7.org/fhir/StructureDefinition/RelatedPerson%7C4.0.1',) but found type 'DiagnosticReport' 13.) Bundle.entry[1]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device')) 14.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Device' in profile '[http://hl7.org/fhir/StructureDefinition/Device|4.0.1',](http://hl7.org/fhir/StructureDefinition/Device%7C4.0.1',) but found type 'DiagnosticReport' 15.) Bundle.entry[1]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter')) 16.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Encounter' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter%7C4.0.1',) but found type 'DiagnosticReport' 17.) Bundle.entry[1]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location')) 18.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Location' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location%7C4.0.1',) but found type 'DiagnosticReport' 19.) Bundle.entry[1]: Does not match slice 'DiagnosticReport' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport')) 20.) Bundle.entry[1]: Bundle.entry[1].resource.result[0]: Unable to find a match for profile Observation/1bObs-NeisseriaGonorrhoeae among choices: http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory 21.) Bundle.entry[1]: Bundle.entry[1].resource.result[0]: Bundle.entry[0].resource.entry[3].resource/*Observation/1bObs-NeisseriaGonorrhoeae*/: Rule ch-elm-expecting-specimen-specification: 'If Observation.code is a member of http://fhir.ch/ig/ch-elm/ValueSet/ch-elm-expecting-specimen-specification, then Specimen.type must be a member of the mapped ValueSet in http://fhir.ch/ig/ch-elm/ConceptMap/ch-elm-expecting-specimen-specification-to-results-completion-vs' Failed 22.) Bundle.entry[1]: Does not match slice 'Observation' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict')) 23.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Observation' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict%7C1.1.1',) but found type 'DiagnosticReport' 24.) Bundle.entry[1]: Does not match slice 'Specimen' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen')) 25.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'Specimen' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen%7C1.1.1',) but found type 'DiagnosticReport' 26.) Bundle.entry[1]: Does not match slice 'ServiceRequest' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order')) 27.) Bundle.entry[1]: Bundle.entry[1].resource: Specified profile type was 'ServiceRequest' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order%7C1.1.1',) but found type 'DiagnosticReport'",
      "expression": [
        "Bundle.entry[1]"
      ]
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 171
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 6
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        }
      ],
      "severity": "information",
      "code": "informational",
      "diagnostics": "This element does not match any known slice defined in the profile [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1) Slice info: 1.) Bundle.entry[3]: Does not match slice 'Composition' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition')) 2.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Composition' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-composition%7C1.1.1',) but found type 'Observation' 3.) Bundle.entry[3]: Does not match slice 'Patient' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient')) 4.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Patient' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-patient%7C1.1.1',) but found type 'Observation' 5.) Bundle.entry[3]: Does not match slice 'Practitioner' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer')) 6.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Practitioner' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitioner-orderer%7C1.1.1',) but found type 'Observation' 7.) Bundle.entry[3]: Does not match slice 'PractitionerRole' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer')) 8.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'PractitionerRole' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-practitionerrole-orderer%7C1.1.1',) but found type 'Observation' 9.) Bundle.entry[3]: Does not match slice 'Organization' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization')) 10.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Organization' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-organization%7C4.0.1',) but found type 'Observation' 11.) Bundle.entry[3]: Does not match slice 'RelatedPerson' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/RelatedPerson')) 12.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'RelatedPerson' in profile '[http://hl7.org/fhir/StructureDefinition/RelatedPerson|4.0.1',](http://hl7.org/fhir/StructureDefinition/RelatedPerson%7C4.0.1',) but found type 'Observation' 13.) Bundle.entry[3]: Does not match slice 'Device' (discriminator: resource.conformsTo('http://hl7.org/fhir/StructureDefinition/Device')) 14.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Device' in profile '[http://hl7.org/fhir/StructureDefinition/Device|4.0.1',](http://hl7.org/fhir/StructureDefinition/Device%7C4.0.1',) but found type 'Observation' 15.) Bundle.entry[3]: Does not match slice 'Encounter' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter')) 16.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Encounter' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-encounter%7C4.0.1',) but found type 'Observation' 17.) Bundle.entry[3]: Does not match slice 'Location' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location')) 18.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Location' in profile '[http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location|4.0.1',](http://fhir.ch/ig/ch-core/StructureDefinition/ch-core-location%7C4.0.1',) but found type 'Observation' 19.) Bundle.entry[3]: Does not match slice 'DiagnosticReport' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport')) 20.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'DiagnosticReport' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-diagnosticreport%7C1.1.1',) but found type 'Observation' 21.) Bundle.entry[3]: Does not match slice 'Observation' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-observation-results-laboratory-strict')) 22.) Bundle.entry[3]: Bundle.entry[0].resource.entry[3].resource/*Observation/1bObs-NeisseriaGonorrhoeae*/: Rule ch-elm-expecting-specimen-specification: 'If Observation.code is a member of http://fhir.ch/ig/ch-elm/ValueSet/ch-elm-expecting-specimen-specification, then Specimen.type must be a member of the mapped ValueSet in http://fhir.ch/ig/ch-elm/ConceptMap/ch-elm-expecting-specimen-specification-to-results-completion-vs' Failed 23.) Bundle.entry[3]: Does not match slice 'Specimen' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen')) 24.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'Specimen' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-specimen%7C1.1.1',) but found type 'Observation' 25.) Bundle.entry[3]: Does not match slice 'ServiceRequest' (discriminator: resource.conformsTo('http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order')) 26.) Bundle.entry[3]: Bundle.entry[3].resource: Specified profile type was 'ServiceRequest' in profile '[http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order|1.1.1',](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-servicerequest-laboratory-order%7C1.1.1',) but found type 'Observation'",
      "expression": [
        "Bundle.entry[3]"
      ]
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 2
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
          "valueCode": "Validation_VAL_Profile_Minimum"
        }
      ],
      "severity": "error",
      "code": "structure",
      "diagnostics": "Bundle.entry:Composition: minimum required = 1, but only found 0 (from [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1))",
      "expression": [
        "Bundle"
      ]
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 2
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
          "valueCode": "Validation_VAL_Profile_Minimum"
        }
      ],
      "severity": "error",
      "code": "structure",
      "diagnostics": "Bundle.entry:DiagnosticReport: minimum required = 1, but only found 0 (from [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1))",
      "expression": [
        "Bundle"
      ]
    },
    {
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line",
          "valueInteger": 1
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col",
          "valueInteger": 2
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source",
          "valueString": "InstanceValidator"
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id",
          "valueCode": "Validation_VAL_Profile_Minimum"
        }
      ],
      "severity": "error",
      "code": "structure",
      "diagnostics": "Bundle.entry:Observation: minimum required = 1, but only found 0 (from [http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict|1.1.1](http://fhir.ch/ig/ch-elm/StructureDefinition/ch-elm-document-strict%7C1.1.1))",
      "expression": [
        "Bundle"
      ]
    }
  ]
}
qligier commented 8 months ago

There are multiple issues causing this.

One of them will be hard to fix: the validator wants to know if http://snomed.info/sct|10828004 is contained in http://hl7.org/fhir/uv/ips/ValueSet/results-blood-group-uv-ips, which looks like this:

{
  "name": "valueSet",
  "resource": {
    "resourceType": "ValueSet",
    "url": "http://hl7.org/fhir/uv/ips/ValueSet/results-blood-group-uv-ips--0",
    "version": "1.1.0",
    "status": "active",
    "compose": {
      "include": [
        {
          "system": "http://snomed.info/sct",
          "version": "http://snomed.info/sct/900000000000207008",
          "filter": [
            {
              "property": "concept",
              "op": "descendent-of",
              "value": "365636006"
            }
          ]
        }
      ]
    }
  }
}

We could change the default value, but then we would give the wrong answer when the validator wants to know if it's part of http://hl7.org/fhir/uv/ips/ValueSet/results-coded-values-laboratory-uv-ips. The slice evaluation is probably not possible without a way to expand that kind of value sets.

oliveregger commented 8 months ago
  1. do you have an idea why the behaviour changed between the version? because before this error was not happening, and we did not change the ips / or eu lab version?1

  2. can we solve it with making the expanded ValueSet's available?

qligier commented 8 months ago
  1. I'm unsure. It's maybe not blocking, I'll only know for sure when I've fixed other issues.
  2. Yes, it would require either the expansion or the SNOMED CT definition.
qligier commented 8 months ago

It seems it was not needed :)

oliveregger commented 7 months ago

fixed in versin 3.8.1