use of org.hl7.fhir.definitions.parsers.spreadsheets.BindingsParser in project kindling by HL7.
the class SourceParser method loadGlobalBindings.
private void loadGlobalBindings() throws Exception {
logger.log("Load Common Bindings", LogMessageType.Process);
BindingsParser parser = new BindingsParser(new CSFileInputStream(new CSFile(termDir + "bindings.xml")), termDir + "bindings.xml", srcDir, registry, version.toCode(), definitions.getCodeSystems(), page.getConceptMaps(), genDate, exceptionIfExcelNotNormalised, page.packageInfo());
List<BindingSpecification> cds = parser.parse();
for (BindingSpecification cd : cds) {
definitions.getAllBindings().add(cd);
definitions.getCommonBindings().put(cd.getName(), cd);
if (cd.getValueSet() != null) {
vsGen.updateHeader(cd, cd.getValueSet());
definitions.getBoundValueSets().put(cd.getValueSet().getUrl(), cd.getValueSet());
} else if (cd.getReference() != null && cd.getReference().startsWith("http:")) {
definitions.getUnresolvedBindings().add(cd);
}
if (cd.getMaxValueSet() != null) {
vsGen.updateHeader(cd, cd.getMaxValueSet());
definitions.getBoundValueSets().put(cd.getMaxValueSet().getUrl(), cd.getMaxValueSet());
}
}
if (!page.getDefinitions().getBoundValueSets().containsKey("http://hl7.org/fhir/ValueSet/data-absent-reason"))
throw new Exception("d-a-r not found");
}
Aggregations