Search in sources :

Example 1 with R2ToR3Loader

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);
}
Also used : R2ToR3Loader(org.hl7.fhir.convertors.loaders.loaderR3.R2ToR3Loader) ZipInputStream(java.util.zip.ZipInputStream) SimpleWorkerContext(org.hl7.fhir.dstu3.context.SimpleWorkerContext)

Aggregations

ZipInputStream (java.util.zip.ZipInputStream)1 R2ToR3Loader (org.hl7.fhir.convertors.loaders.loaderR3.R2ToR3Loader)1 SimpleWorkerContext (org.hl7.fhir.dstu3.context.SimpleWorkerContext)1