diff --git a/matchbox-engine/src/main/java/ch/ahdis/matchbox/engine/MatchboxEngine.java b/matchbox-engine/src/main/java/ch/ahdis/matchbox/engine/MatchboxEngine.java index a8b398bcad2..bf3315dd9fb 100644 --- a/matchbox-engine/src/main/java/ch/ahdis/matchbox/engine/MatchboxEngine.java +++ b/matchbox-engine/src/main/java/ch/ahdis/matchbox/engine/MatchboxEngine.java @@ -565,8 +565,7 @@ public org.hl7.fhir.r5.elementmodel.Element transform(ByteProvider source, FhirF org.hl7.fhir.r5.elementmodel.ParserBase parser = Manager.makeParser(context, cntType); StructureDefinition sd = context.fetchResource(StructureDefinition.class, canonicalSource); - // The QName 'urn:hl7-org:v3::Observation' does not match the expected QName 'urn:hl7-org:v3::observation' at line 0 col 0 - if (sd.getKind() == StructureDefinitionKind.LOGICAL && sd.getUrl()!=null && !sd.getUrl().startsWith("http://hl7.org/cda/stds/core")) { + if (sd.getKind() == StructureDefinitionKind.LOGICAL) { parser.setLogical(sd); } org.hl7.fhir.r5.elementmodel.Element src = parser.parseSingle(new ByteArrayInputStream(source.getBytes()), null); diff --git a/matchbox-engine/src/test/java/ch/ahdis/matchbox/engine/tests/CdaToFhirTransformTests.java b/matchbox-engine/src/test/java/ch/ahdis/matchbox/engine/tests/CdaToFhirTransformTests.java index e89fa03446c..ed71cc76a05 100644 --- a/matchbox-engine/src/test/java/ch/ahdis/matchbox/engine/tests/CdaToFhirTransformTests.java +++ b/matchbox-engine/src/test/java/ch/ahdis/matchbox/engine/tests/CdaToFhirTransformTests.java @@ -157,14 +157,6 @@ void TestFhirPath() throws FHIRException, IOException { assertEquals("F028", getEngine().evaluateFhirPath(cdaLabItaly, false, "practiceSettingCode.code")); } - @Test - void TestFhirPathObservationIt() throws FHIRException, IOException { - InputStream in = getResourceAsStream("cda-it-observation.xml"); - String observationIt = IOUtils.toString(in, StandardCharsets.UTF_8); - assertEquals("2022-03-01T22:11:22+01:00", - getEngine().evaluateFhirPath(observationIt, false, "value.high.value")); - } - @Test void TestInitial() throws FHIRException, IOException { String result = getEngine().transform(cdaLabItaly, diff --git a/matchbox-engine/src/test/resources/cda/cda-it-observation-condition.xml b/matchbox-engine/src/test/resources/cda/cda-it-observation-condition.xml index 2b7dcb11bbb..2bb0805fb15 100644 --- a/matchbox-engine/src/test/resources/cda/cda-it-observation-condition.xml +++ b/matchbox-engine/src/test/resources/cda/cda-it-observation-condition.xml @@ -1,6 +1,6 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/matchbox-engine/src/test/resources/cda/cda-it-observation-cs.xml b/matchbox-engine/src/test/resources/cda/cda-it-observation-cs.xml index 60791cde5ed..b13ca833f58 100644 --- a/matchbox-engine/src/test/resources/cda/cda-it-observation-cs.xml +++ b/matchbox-engine/src/test/resources/cda/cda-it-observation-cs.xml @@ -1,4 +1,4 @@ - @@ -10,4 +10,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/matchbox-engine/src/test/resources/cda/cda-it-observation-st.xml b/matchbox-engine/src/test/resources/cda/cda-it-observation-st.xml index 60cb4f1873e..15c3aad025c 100644 --- a/matchbox-engine/src/test/resources/cda/cda-it-observation-st.xml +++ b/matchbox-engine/src/test/resources/cda/cda-it-observation-st.xml @@ -1,4 +1,4 @@ - @@ -10,4 +10,4 @@ Nessun Trauma riscontrato - \ No newline at end of file + \ No newline at end of file diff --git a/matchbox-engine/src/test/resources/cda/cda-it-observation.xml b/matchbox-engine/src/test/resources/cda/cda-it-observation.xml index 702d3439bb6..a96cfbe9d36 100644 --- a/matchbox-engine/src/test/resources/cda/cda-it-observation.xml +++ b/matchbox-engine/src/test/resources/cda/cda-it-observation.xml @@ -1,4 +1,4 @@ - @@ -40,4 +40,4 @@ - \ No newline at end of file + \ No newline at end of file