use of org.hl7.fhir.convertors.loaders.loaderR3.R2ToR3Loader in project org.hl7.fhir.core by hapifhir.
the class R2R3ConversionManager method setR2Definitions.
// set up ------------------------------------------------------------------
public void setR2Definitions(InputStream stream) throws IOException, FHIRException {
needPrepare = true;
R2ToR3Loader ldr = new R2ToR3Loader();
ldr.setPatchUrls(true).setKillPrimitives(true);
Map<String, InputStream> files = readInputStream(stream);
contextR2 = new SimpleWorkerContext();
contextR2.setAllowLoadingDuplicates(true);
contextR2.loadFromFile(files.get("profiles-types.xml"), "profiles-types.xml", ldr);
contextR2.loadFromFile(files.get("profiles-resources.xml"), "profiles-resources.xml", ldr);
contextR2.loadFromFile(files.get("valuesets.xml"), "valuesets.xml", ldr);
}
Aggregations