diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/CodeSystemComparer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/CodeSystemComparer.java index a78b1c324..ced654a50 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/CodeSystemComparer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/comparison/CodeSystemComparer.java @@ -422,7 +422,7 @@ public class CodeSystemComparer extends CanonicalResourceComparer { ConceptPropertyComponent cp = null; if (cd != null) { for (ConceptPropertyComponent t : cd.getProperty()) { - if (t.getCode().equals(c)) { + if (t.hasCode() && t.getCode().equals(c)) { cp = t; } } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 32fc567ae..50d12aef1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -3800,6 +3800,9 @@ public class ProfileUtilities extends TranslatingUtilities { if (contentReference.contains("#")) { String url = contentReference.substring(0, contentReference.indexOf("#")); contentReference = contentReference.substring(contentReference.indexOf("#")); + if (Utilities.noString(url)) { + url = source.getUrl(); + } if (!url.equals(source.getUrl())) { source = context.fetchResource(StructureDefinition.class, url); if (source == null) { diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java index 5f3d46224..1eca40e1a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/SimpleWorkerContext.java @@ -490,11 +490,13 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon types = new String[] { "StructureDefinition", "ValueSet", "CodeSystem", "SearchParameter", "OperationDefinition", "Questionnaire", "ConceptMap", "StructureMap", "NamingSystem", "Measures" }; } for (PackageResourceInformation pri : pi.listIndexedResources(types)) { - try { - registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageVersion(pi.id(), pi.version(), pi.dateAsDate())); - t++; - } catch (FHIRException e) { - throw new FHIRException(formatMessage(I18nConstants.ERROR_READING__FROM_PACKAGE__, pri.getFilename(), pi.name(), pi.version(), e.getMessage()), e); + if (!pri.getFilename().contains("ig-r4")) { + try { + registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageVersion(pi.id(), pi.version(), pi.dateAsDate())); + t++; + } catch (FHIRException e) { + throw new FHIRException(formatMessage(I18nConstants.ERROR_READING__FROM_PACKAGE__, pri.getFilename(), pi.name(), pi.version(), e.getMessage()), e); + } } } }