use of org.hl7.fhir.definitions.validation.ValueSetValidator in project kindling by HL7.
the class PageProcessor method setDefinitions.
public void setDefinitions(Definitions definitions) throws Exception {
this.definitions = definitions;
breadCrumbManager.setDefinitions(definitions);
TerminologyClient client;
try {
client = new TerminologyClientR5(tsServer);
client.setTimeout(60000);
} catch (Exception e) {
System.out.println("Warning @ PageProcessor client initialize: " + e.getLocalizedMessage());
client = null;
}
workerContext = new BuildWorkerContext(definitions, client, definitions.getCodeSystems(), definitions.getValuesets(), conceptMaps, profiles, guides, folders.rootDir);
workerContext.setDefinitions(definitions);
workerContext.setLogger(this);
workerContext.setAllowLoadingDuplicates(true);
log("Load UTG Terminology", LogMessageType.Process);
NpmPackage utg = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION).loadPackage("hl7.terminology");
workerContext.loadFromPackage(utg, new R4ToR5Loader(BuildWorkerContext.defaultTypesToLoad(), new UTGLoader(utg.version())));
log("Load Terminology Cache from " + Utilities.path(folders.rootDir, "vscache"), LogMessageType.Process);
workerContext.initTS(Utilities.path(folders.rootDir, "vscache"));
log(" .. loaded", LogMessageType.Process);
vsValidator = new ValueSetValidator(workerContext, definitions.getVsFixups(), definitions.getStyleExemptions());
breadCrumbManager.setContext(workerContext);
}
Aggregations