Don't load resources from core examples package

This commit is contained in:
Grahame Grieve 2023-08-02 22:11:43 +10:00
parent 42aef4ad40
commit db0413c735
3 changed files with 17 additions and 7 deletions

View File

@ -2,8 +2,11 @@
* Fix invalid integer detection
* Improved invariant checking
* Create warnings for status on terminology resources
## Other code changes
* Update obligation handling code for split definitions
* Update ICF importer to handle grouping levels
* fix up copy directory for case differences

View File

@ -1266,6 +1266,11 @@ public class NpmPackage {
return Utilities.existsInList(npm.asString("type"), "fhir.core", "Core");
}
public boolean isCoreExamples() {
return name().startsWith("hl7.fhir.r") && name().endsWith(".examples");
}
public boolean isTx() {
return npm.asString("name").startsWith("hl7.terminology");
}

View File

@ -520,13 +520,15 @@ public class IgLoader implements IValidationEngineLoader {
}
}
if (!pi.isCoreExamples()) {
if (loadInContext) {
// getContext().getLoadedPackages().add(pi.name() + "#" + pi.version());
// getContext().getLoadedPackages().add(pi.name() + "#" + pi.version());
getContext().loadFromPackage(pi, ValidatorUtils.loaderForVersion(pi.fhirVersion()));
}
for (String s : pi.listResources("CodeSystem", "ConceptMap", "ImplementationGuide", "CapabilityStatement", "SearchParameter", "Conformance", "StructureMap", "ValueSet", "StructureDefinition")) {
res.put(s, TextFile.streamToBytes(pi.load("package", s)));
}
}
String ini = "[FHIR]\r\nversion=" + pi.fhirVersion() + "\r\n";
res.put("version.info", ini.getBytes());
return res;