fix problem parsing logical model cda fragments

This commit is contained in:
Grahame Grieve 2023-09-29 13:34:39 +10:00
parent 104973a1d9
commit a22923f193
1 changed files with 4 additions and 1 deletions

View File

@ -143,9 +143,12 @@ public abstract class ParserBase {
protected StructureDefinition getDefinition(List<ValidationMessage> errors, int line, int col, String ns, String name) throws FHIRFormatError {
if (logical != null) {
String expectedName = ToolingExtensions.readStringExtension(logical, "http://hl7.org/fhir/StructureDefinition/elementdefinition-name");
String expectedName = ToolingExtensions.readStringExtension(logical, "http://hl7.org/fhir/StructureDefinition/elementdefinition-xml-name");
if (expectedName == null) {
expectedName = logical.getType();
if (Utilities.isAbsoluteUrl(expectedName)) {
expectedName = expectedName.substring(expectedName.lastIndexOf("/")+1);
}
}
String expectedNamespace = ToolingExtensions.readStringExtension(logical, "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace");
if (matchesNamespace(expectedNamespace, ns) && matchesName(expectedName, name)) {