Skip to content

Commit

Permalink
#286 patch exclude cda model from cda logical model parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveregger committed Oct 7, 2024
1 parent 70a21ea commit c9b4e82
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -565,8 +565,9 @@ 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);
if (sd.getKind() == StructureDefinitionKind.LOGICAL) {
parser.setLogical(sd);
// 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")) {
parser.setLogical(sd);
}
org.hl7.fhir.r5.elementmodel.Element src = parser.parseSingle(new ByteArrayInputStream(source.getBytes()), null);
return transform(src, mapUri, targetContext);
Expand Down

0 comments on commit c9b4e82

Please sign in to comment.