use of org.hl7.fhir.r5.terminologies.LoincToDEConvertor in project kindling by HL7.
the class Publisher method buildLoincExample.
private String buildLoincExample(String filename) throws FileNotFoundException, Exception {
LoincToDEConvertor conv = new LoincToDEConvertor();
conv.setDefinitions(Utilities.path(page.getFolders().srcDir, "loinc", "loincS.xml"));
conv.process();
IParser xml = new XmlParser().setOutputStyle(OutputStyle.PRETTY);
FileOutputStream s = new FileOutputStream(Utilities.path(page.getFolders().dstDir, filename + ".xml"));
xml.compose(s, conv.getBundle());
s.close();
IParser json = new JsonParser().setOutputStyle(OutputStyle.PRETTY);
s = new FileOutputStream(Utilities.path(page.getFolders().dstDir, filename + ".json"));
json.compose(s, conv.getBundle());
s.close();
return "Loinc Narrative";
}
Aggregations