fix NPE validating maps

This commit is contained in:
Grahame Grieve 2023-03-23 20:48:54 +11:00
parent f122dc164f
commit 0ea81d247a
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.elementmodel.Element;
import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.CodeSystem.CodeSystemContentMode;
import org.hl7.fhir.r5.model.Enumerations.CodeSystemContentMode;
import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.r5.model.Coding;
import org.hl7.fhir.r5.model.ValueSet;

View File

@ -960,6 +960,9 @@ public class StructureMapValidator extends BaseValidator {
return null;
}
String type = input.getType();
if (type == null) {
return null;
}
StructureMapModelMode mode = input.getMode() == StructureMapInputMode.SOURCE ? StructureMapModelMode.SOURCE : StructureMapModelMode.TARGET;
for (StructureMapStructureComponent st : map.getStructure()) {
if (type.equals(st.getAlias()) && mode == st.getMode()) {