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 002d4dadb..86efc6b4a 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 @@ -498,7 +498,11 @@ public class SimpleWorkerContext extends BaseWorkerContext implements IWorkerCon for (PackageResourceInformation pri : pi.listIndexedResources(types)) { if (!pri.getFilename().contains("ig-r4") && (loader == null || loader.wantLoad(pi, pri))) { try { - registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageInformation(pi)); + if (!pri.hasId()) { + loadDefinitionItem(pri.getFilename(), new FileInputStream(pri.getFilename()), loader, null, new PackageInformation(pi)); + } else { + registerResourceFromPackage(new PackageResourceLoader(pri, loader), new PackageInformation(pi)); + } t++; } catch (FHIRException e) { throw new FHIRException(formatMessage(I18nConstants.ERROR_READING__FROM_PACKAGE__, pri.getFilename(), pi.name(), pi.version(), e.getMessage()), e); diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java index c6882c553..84f1d5c7a 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java @@ -144,6 +144,9 @@ public class NpmPackage { public String getSupplements() { return supplements; } + public boolean hasId() { + return !Utilities.noString(id); + } } public class IndexVersionSorter implements Comparator {