Search in sources :

Example 6 with JsonParser

use of org.hl7.fhir.r4b.formats.JsonParser in project kindling by HL7.

the class Publisher method produceProfile.

private void produceProfile(ResourceDefn resource, Profile pack, ConstraintStructure profile, SectionTracker st, String intro, String notes, String prefix, ImplementationGuideDefn ig) throws Exception {
    File tmp = Utilities.createTempFile("tmp", ".tmp");
    String title = profile.getId();
    int level = (ig == null || ig.isCore()) ? 0 : 1;
    // you have to validate a profile, because it has to be merged with it's
    // base resource to fill out all the missing bits
    // validateProfile(profile);
    ByteArrayOutputStream bs = new ByteArrayOutputStream();
    XmlSpecGenerator gen = new XmlSpecGenerator(bs, title + "-definitions.html", "", page, ig.isCore() ? "" : "../");
    gen.generate(profile.getResource());
    gen.close();
    String xml = new String(bs.toByteArray());
    bs = new ByteArrayOutputStream();
    JsonSpecGenerator genJ = new JsonSpecGenerator(bs, title + "-definitions.html", "", page, ig.isCore() ? "" : "../", page.getVersion().toCode());
    genJ.generate(profile.getResource());
    genJ.close();
    String json = new String(bs.toByteArray());
    XmlParser comp = new XmlParser();
    FileOutputStream s = new FileOutputStream(page.getFolders().dstDir + prefix + title + ".profile.xml");
    comp.setOutputStyle(OutputStyle.PRETTY).compose(s, profile.getResource());
    s.close();
    Utilities.copyFile(new CSFile(page.getFolders().dstDir + prefix + title + ".profile.xml"), new CSFile(page.getFolders().dstDir + "examples" + File.separator + title + ".profile.xml"));
    JsonParser jcomp = new JsonParser();
    s = new FileOutputStream(page.getFolders().dstDir + prefix + title + ".profile.json");
    jcomp.setOutputStyle(OutputStyle.PRETTY).compose(s, profile.getResource());
    s.close();
    // String shex = new ShExGenerator(page.getWorkerContext()).generate(HTMLLinkPolicy.NONE, profile.getResource());
    // TextFile.stringToFile(shex, Utilities.changeFileExt(page.getFolders().dstDir + prefix +title + ".profile.shex", ".shex"));
    // shexToXhtml(prefix +title + ".profile", "ShEx statement for " + prefix +title, shex, "profile-instance:type:" + title, "Type");
    TerminologyNotesGenerator tgen = new TerminologyNotesGenerator(new FileOutputStream(tmp), page);
    tgen.generate(level == 0 ? "" : "../", profile);
    tgen.close();
    String tx = TextFile.fileToString(tmp.getAbsolutePath());
    String src = TextFile.fileToString(page.getFolders().templateDir + "template-profile.html");
    src = page.processProfileIncludes(profile.getId(), profile.getId(), pack, profile, xml, json, tx, src, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, false);
    if (st != null)
        src = insertSectionNumbers(src, st, title + ".html", level, null);
    else if (ig != null && !ig.isCore()) {
        src = addSectionNumbers(title + ".html", title, src, null, 1, null, ig);
        st = page.getSectionTrackerCache().get(ig.getCode() + "::" + title);
    }
    page.getHTMLChecker().registerFile(prefix + title + ".html", "StructureDefinition " + profile.getResource().getName(), HTMLLinkChecker.XHTML_TYPE, false);
    TextFile.stringToFile(src, page.getFolders().dstDir + prefix + title + ".html");
    new ProfileUtilities(page.getWorkerContext(), page.getValidationErrors(), page).generateSchematrons(new FileOutputStream(page.getFolders().dstDir + prefix + title + ".sch"), profile.getResource());
    if (pack.getExamples().size() > 0) {
        src = TextFile.fileToString(page.getFolders().templateDir + "template-profile-examples.html");
        src = page.processProfileIncludes(profile.getId(), profile.getId(), pack, profile, xml, json, tx, src, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, false);
        page.getHTMLChecker().registerFile(prefix + title + "-examples.html", "Examples for StructureDefinition " + profile.getResource().getName(), HTMLLinkChecker.XHTML_TYPE, true);
        TextFile.stringToFile(src, page.getFolders().dstDir + prefix + title + "-examples.html");
    }
    src = TextFile.fileToString(page.getFolders().templateDir + "template-profile-definitions.html");
    src = page.processProfileIncludes(profile.getId(), profile.getId(), pack, profile, xml, json, tx, src, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, false);
    if (st != null)
        src = insertSectionNumbers(src, st, title + "-definitions.html", level, null);
    page.getHTMLChecker().registerFile(prefix + title + "-definitions.html", "Definitions for StructureDefinition " + profile.getResource().getName(), HTMLLinkChecker.XHTML_TYPE, true);
    TextFile.stringToFile(src, page.getFolders().dstDir + prefix + title + "-definitions.html");
    src = TextFile.fileToString(page.getFolders().templateDir + "template-profile-mappings.html");
    src = page.processProfileIncludes(profile.getId(), profile.getId(), pack, profile, xml, json, tx, src, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, false);
    if (st != null)
        src = insertSectionNumbers(src, st, title + "-mappings.html", level, null);
    page.getHTMLChecker().registerFile(prefix + title + "-mappings.html", "Mappings for StructureDefinition " + profile.getResource().getName(), HTMLLinkChecker.XHTML_TYPE, true);
    TextFile.stringToFile(src, page.getFolders().dstDir + prefix + title + "-mappings.html");
    try {
        processQuestionnaire(resource, profile.getResource(), st, false, prefix, ig);
    } catch (Exception e) {
        e.printStackTrace();
        page.log("Questionnaire Generation Failed: " + e.getMessage(), LogMessageType.Error);
    }
    new ReviewSpreadsheetGenerator().generate(page.getFolders().dstDir + prefix + Utilities.changeFileExt((String) profile.getResource().getUserData("filename"), "-review.xls"), "Health Level Seven International", page.getGenDate(), profile.getResource(), page);
    // xml to xhtml of xml
    // first pass is to strip the xsi: stuff. seems to need double
    // processing in order to delete namespace crap
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    factory.setNamespaceAware(true);
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document xdoc = builder.parse(new CSFileInputStream(page.getFolders().dstDir + prefix + title + ".profile.xml"));
    XmlGenerator xmlgen = new XmlGenerator();
    xmlgen.generate(xdoc.getDocumentElement(), tmp, "http://hl7.org/fhir", xdoc.getDocumentElement().getLocalName());
    // reload it now
    builder = factory.newDocumentBuilder();
    xdoc = builder.parse(new CSFileInputStream(tmp.getAbsolutePath()));
    XhtmlGenerator xhtml = new XhtmlGenerator(new ExampleAdorner(page.getDefinitions(), page.genlevel(level)));
    ByteArrayOutputStream b = new ByteArrayOutputStream();
    xhtml.generate(xdoc, b, "StructureDefinition", profile.getTitle(), 0, true, title + ".profile.xml.html");
    String html = TextFile.fileToString(page.getFolders().templateDir + "template-profile-example-xml.html").replace("<%example%>", b.toString());
    html = page.processProfileIncludes(title + ".profile.xml.html", profile.getId(), pack, profile, "", "", "", html, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, hasNarrative(xdoc));
    TextFile.stringToFile(html, page.getFolders().dstDir + prefix + title + ".profile.xml.html");
    page.getHTMLChecker().registerFile(prefix + title + ".profile.xml.html", "StructureDefinition", HTMLLinkChecker.XHTML_TYPE, false);
    String n = prefix + title + ".profile";
    json = resource2Json(profile.getResource());
    json = "<div class=\"example\">\r\n<p>" + Utilities.escapeXml("StructureDefinition for " + profile.getResource().getDescription()) + "</p>\r\n<p><a href=\"" + title + ".profile.json\">Raw JSON</a></p>\r\n<pre class=\"json\">\r\n" + Utilities.escapeXml(json) + "\r\n</pre>\r\n</div>\r\n";
    html = TextFile.fileToString(page.getFolders().templateDir + "template-profile-example-json.html").replace("<%example%>", json);
    html = page.processProfileIncludes(title + ".profile.json.html", profile.getId(), pack, profile, "", "", "", html, title + ".html", (resource == null ? profile.getResource().getType() : resource.getName()) + "/" + pack.getId() + "/" + profile.getId(), intro, notes, ig, false, false);
    TextFile.stringToFile(html, page.getFolders().dstDir + prefix + title + ".profile.json.html");
    // page.getEpub().registerFile(n + ".json.html", description, EPubManager.XHTML_TYPE);
    page.getHTMLChecker().registerExternal(n + ".json.html");
    tmp.delete();
}
Also used : XmlParser(org.hl7.fhir.r5.formats.XmlParser) XmlSpecGenerator(org.hl7.fhir.definitions.generators.specification.XmlSpecGenerator) JsonSpecGenerator(org.hl7.fhir.definitions.generators.specification.JsonSpecGenerator) DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) XmlGenerator(org.hl7.fhir.utilities.xml.XmlGenerator) TerminologyNotesGenerator(org.hl7.fhir.definitions.generators.specification.TerminologyNotesGenerator) ByteArrayOutputStream(java.io.ByteArrayOutputStream) CSFile(org.hl7.fhir.utilities.CSFile) Document(org.w3c.dom.Document) XhtmlDocument(org.hl7.fhir.utilities.xhtml.XhtmlDocument) ContactPoint(org.hl7.fhir.r5.model.ContactPoint) TransformerException(javax.xml.transform.TransformerException) IOException(java.io.IOException) FHIRException(org.hl7.fhir.exceptions.FHIRException) FileNotFoundException(java.io.FileNotFoundException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) ReviewSpreadsheetGenerator(org.hl7.fhir.definitions.generators.specification.ReviewSpreadsheetGenerator) XhtmlGenerator(org.hl7.fhir.utilities.xml.XhtmlGenerator) ProfileUtilities(org.hl7.fhir.r5.conformance.ProfileUtilities) DocumentBuilder(javax.xml.parsers.DocumentBuilder) FileOutputStream(java.io.FileOutputStream) IniFile(org.hl7.fhir.utilities.IniFile) File(java.io.File) CSFile(org.hl7.fhir.utilities.CSFile) TextFile(org.hl7.fhir.utilities.TextFile) CSFileInputStream(org.hl7.fhir.utilities.CSFileInputStream) JsonParser(org.hl7.fhir.r5.formats.JsonParser)

Example 7 with JsonParser

use of org.hl7.fhir.r4b.formats.JsonParser in project kindling by HL7.

the class Publisher method generateCodeSystemPart2.

private void generateCodeSystemPart2(CodeSystem cs) throws Exception {
    String n = cs.getUserString("filename");
    if (n == null)
        n = "codesystem-" + cs.getId();
    ImplementationGuideDefn ig = (ImplementationGuideDefn) cs.getUserData(ToolResourceUtilities.NAME_RES_IG);
    if (ig != null)
        n = ig.getCode() + File.separator + n;
    if (cs.getText().getDiv().allChildrenAreText() && (Utilities.noString(cs.getText().getDiv().allText()) || !cs.getText().getDiv().allText().matches(".*\\w.*"))) {
        RenderingContext lrc = page.getRc().copy().setLocalPrefix(ig != null ? "../" : "").setTooCostlyNoteEmpty(PageProcessor.TOO_MANY_CODES_TEXT_EMPTY).setTooCostlyNoteNotEmpty(PageProcessor.TOO_MANY_CODES_TEXT_NOT_EMPTY);
        RendererFactory.factory(cs, lrc).render(cs);
    }
    page.getVsValidator().validate(page.getValidationErrors(), n, cs, true, false);
    if (isGenerate) {
        // page.log(" ... "+n, LogMessageType.Process);
        addToResourceFeed(cs, valueSetsFeed, null);
        if (cs.getUserData("path") == null)
            cs.setUserData("path", n + ".html");
        page.setId(cs.getId());
        String sf;
        WorkGroup wg = wg(cs, "vocab");
        try {
            sf = page.processPageIncludes(n + ".html", TextFile.fileToString(page.getFolders().templateDir + "template-cs.html"), "codeSystem", null, n + ".html", cs, null, "Value Set", ig, null, wg);
        } catch (Exception e) {
            throw new Exception("Error processing " + n + ".html: " + e.getMessage(), e);
        }
        sf = addSectionNumbers(n + ".html", "template-codesystem", sf, csCounter(), ig == null ? 0 : 1, null, ig);
        TextFile.stringToFile(sf, page.getFolders().dstDir + n + ".html");
        try {
            String src = page.processPageIncludesForBook(n + ".html", TextFile.fileToString(page.getFolders().templateDir + "template-cs-book.html"), "codeSystem", cs, ig, null);
            cachePage(n + ".html", src, "Code System " + n, false);
            page.setId(null);
        } catch (Exception e) {
            throw new Exception("Error processing " + n + ".html: " + e.getMessage(), e);
        }
        IParser json = new JsonParser().setOutputStyle(OutputStyle.PRETTY);
        FileOutputStream s = new FileOutputStream(page.getFolders().dstDir + n + ".json");
        json.compose(s, cs);
        s.close();
        json = new JsonParser().setOutputStyle(OutputStyle.CANONICAL);
        s = new FileOutputStream(page.getFolders().dstDir + n + ".canonical.json");
        json.compose(s, cs);
        s.close();
        IParser xml = new XmlParser().setOutputStyle(OutputStyle.PRETTY);
        s = new FileOutputStream(page.getFolders().dstDir + n + ".xml");
        xml.compose(s, cs);
        s.close();
        xml = new XmlParser().setOutputStyle(OutputStyle.CANONICAL);
        s = new FileOutputStream(page.getFolders().dstDir + n + ".canonical.xml");
        xml.compose(s, cs);
        s.close();
        // System.out.println(vs.getUrl());
        cloneToXhtml(n, "Definition for Code System " + cs.getName(), false, "codesystem-instance", "Code System", null, wg);
        jsonToXhtml(n, "Definition for Code System " + cs.getName(), resource2Json(cs), "codesystem-instance", "Code System", null, wg);
        ttlToXhtml(n, "Definition for Code System " + cs.getName(), resource2Ttl(cs), "codesystem-instance", "Code System", null, wg);
    }
}
Also used : RenderingContext(org.hl7.fhir.r5.renderers.utils.RenderingContext) WorkGroup(org.hl7.fhir.definitions.model.WorkGroup) XmlParser(org.hl7.fhir.r5.formats.XmlParser) FileOutputStream(java.io.FileOutputStream) ImplementationGuideDefn(org.hl7.fhir.definitions.model.ImplementationGuideDefn) TransformerException(javax.xml.transform.TransformerException) IOException(java.io.IOException) FHIRException(org.hl7.fhir.exceptions.FHIRException) FileNotFoundException(java.io.FileNotFoundException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) IParser(org.hl7.fhir.r5.formats.IParser) JsonParser(org.hl7.fhir.r5.formats.JsonParser)

Example 8 with JsonParser

use of org.hl7.fhir.r4b.formats.JsonParser in project kindling by HL7.

the class Publisher method generateConceptMap.

private void generateConceptMap(ConceptMap cm) throws Exception {
    String filename = cm.getUserString("path");
    RenderingContext lrc = page.getRc().copy().setLocalPrefix("").setTooCostlyNoteEmpty(PageProcessor.TOO_MANY_CODES_TEXT_EMPTY).setTooCostlyNoteNotEmpty(PageProcessor.TOO_MANY_CODES_TEXT_NOT_EMPTY);
    RendererFactory.factory(cm, lrc).render(cm);
    IParser json = new JsonParser().setOutputStyle(OutputStyle.PRETTY);
    FileOutputStream s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(filename, ".json"));
    json.compose(s, cm);
    s.close();
    json = new JsonParser().setOutputStyle(OutputStyle.CANONICAL);
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(filename, ".canonical.json"));
    json.compose(s, cm);
    s.close();
    String n = Utilities.changeFileExt(filename, "");
    jsonToXhtml(n, cm.getName(), resource2Json(cm), "conceptmap-instance", "Concept Map", null, wg("vocab"));
    ttlToXhtml(n, cm.getName(), resource2Ttl(cm), "conceptmap-instance", "Concept Map", null, wg("vocab"));
    IParser xml = new XmlParser().setOutputStyle(OutputStyle.PRETTY);
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(filename, ".xml"));
    xml.compose(s, cm);
    s.close();
    xml = new XmlParser().setOutputStyle(OutputStyle.CANONICAL);
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(filename, ".canonical.xml"));
    xml.compose(s, cm);
    s.close();
    cloneToXhtml(n, cm.getName(), false, "conceptmap-instance", "Concept Map", null, wg("vocab"));
    // now, we create an html page from the narrative
    String narrative = new XhtmlComposer(XhtmlComposer.HTML).compose(cm.getText().getDiv());
    String html = TextFile.fileToString(page.getFolders().templateDir + "template-example.html").replace("<%example%>", narrative);
    html = page.processPageIncludes(Utilities.changeFileExt(filename, ".html"), html, "conceptmap-instance", null, null, null, "Concept Map", null, null, wg("vocab"));
    TextFile.stringToFile(html, page.getFolders().dstDir + Utilities.changeFileExt(filename, ".html"));
    conceptMapsFeed.getEntry().add(new BundleEntryComponent().setResource(cm).setFullUrl("http://hl7.org/fhir/" + cm.fhirType() + "/" + cm.getId()));
    page.getConceptMaps().see(cm, page.packageInfo());
    page.getHTMLChecker().registerFile(n + ".html", cm.getName(), HTMLLinkChecker.XHTML_TYPE, false);
}
Also used : RenderingContext(org.hl7.fhir.r5.renderers.utils.RenderingContext) XmlParser(org.hl7.fhir.r5.formats.XmlParser) BundleEntryComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryComponent) FileOutputStream(java.io.FileOutputStream) XhtmlComposer(org.hl7.fhir.utilities.xhtml.XhtmlComposer) IParser(org.hl7.fhir.r5.formats.IParser) JsonParser(org.hl7.fhir.r5.formats.JsonParser)

Example 9 with JsonParser

use of org.hl7.fhir.r4b.formats.JsonParser in project kindling by HL7.

the class Publisher method produceConceptMap.

private void produceConceptMap(ConceptMap cm, ResourceDefn rd, SectionTracker st) throws Exception {
    RenderingContext lrc = page.getRc().copy().setLocalPrefix("");
    RendererFactory.factory(cm, lrc).render(cm);
    String n = cm.getUserString("path");
    FileOutputStream s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(n, ".xml"));
    new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(s, cm);
    s.close();
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(n, ".canonical.xml"));
    new XmlParser().setOutputStyle(OutputStyle.CANONICAL).compose(s, cm);
    s.close();
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(n, ".json"));
    new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(s, cm);
    s.close();
    s = new FileOutputStream(page.getFolders().dstDir + Utilities.changeFileExt(n, ".canonical.json"));
    new JsonParser().setOutputStyle(OutputStyle.CANONICAL).compose(s, cm);
    s.close();
    Utilities.copyFile(new CSFile(page.getFolders().dstDir + Utilities.changeFileExt(n, ".xml")), new CSFile(page.getFolders().dstDir + "examples" + File.separator + Utilities.changeFileExt(n, ".xml")));
    // saveAsPureHtml(cm, new FileOutputStream(Utilities.path(page.getFolders().dstDir, "html", n)), true);
    String src = TextFile.fileToString(page.getFolders().templateDir + "template-status-map.html");
    Map<String, String> others = new HashMap<String, String>();
    others.put("status-map", new XhtmlComposer(XhtmlComposer.HTML).compose(cm.getText().getDiv()));
    TextFile.stringToFile(insertSectionNumbers(page.processPageIncludes(n, src, "conceptmap-instance", others, null, null, "Profile", null, rd, rd.getWg()), st, n, 0, null), page.getFolders().dstDir + n);
    page.getHTMLChecker().registerFile(n, cm.getTitle(), HTMLLinkChecker.XHTML_TYPE, true);
    cloneToXhtml(Utilities.changeFileExt(n, ""), cm.getTitle(), true, "conceptmap-instance", "Profile", null, ((ResourceDefn) cm.getUserData("resource-definition")).getWg());
    jsonToXhtml(Utilities.changeFileExt(n, ""), cm.getTitle(), resource2Json(cm), "conceptmap-instance", "Profile", null, ((ResourceDefn) cm.getUserData("resource-definition")).getWg());
    ttlToXhtml(Utilities.changeFileExt(n, ""), cm.getTitle(), resource2Ttl(cm), "conceptmap-instance", "Profile", null, ((ResourceDefn) cm.getUserData("resource-definition")).getWg());
}
Also used : RenderingContext(org.hl7.fhir.r5.renderers.utils.RenderingContext) XmlParser(org.hl7.fhir.r5.formats.XmlParser) LinkedHashMap(java.util.LinkedHashMap) HashMap(java.util.HashMap) FileOutputStream(java.io.FileOutputStream) XhtmlComposer(org.hl7.fhir.utilities.xhtml.XhtmlComposer) CSFile(org.hl7.fhir.utilities.CSFile) JsonParser(org.hl7.fhir.r5.formats.JsonParser)

Example 10 with JsonParser

use of org.hl7.fhir.r4b.formats.JsonParser in project kindling by HL7.

the class Publisher method stripJson.

private InputStream stripJson(InputStream source) throws Exception {
    JsonParser p = new JsonParser();
    Resource r = p.parse(source);
    minify(r);
    ByteArrayOutputStream bo = new ByteArrayOutputStream();
    p.compose(bo, r);
    bo.close();
    return new ByteArrayInputStream(bo.toByteArray());
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) Resource(org.hl7.fhir.r5.model.Resource) DomainResource(org.hl7.fhir.r5.model.DomainResource) CanonicalResource(org.hl7.fhir.r5.model.CanonicalResource) ByteArrayOutputStream(java.io.ByteArrayOutputStream) JsonParser(org.hl7.fhir.r5.formats.JsonParser)

Aggregations

FileOutputStream (java.io.FileOutputStream)82 JsonParser (org.hl7.fhir.r5.formats.JsonParser)66 FHIRException (org.hl7.fhir.exceptions.FHIRException)58 FileInputStream (java.io.FileInputStream)53 IOException (java.io.IOException)49 XmlParser (org.hl7.fhir.r5.formats.XmlParser)44 ByteArrayOutputStream (java.io.ByteArrayOutputStream)41 File (java.io.File)36 JsonParser (org.hl7.fhir.r4.formats.JsonParser)35 CSFileInputStream (org.hl7.fhir.utilities.CSFileInputStream)29 JsonParser (org.hl7.fhir.dstu3.formats.JsonParser)26 JsonParser (org.hl7.fhir.r4b.formats.JsonParser)26 CSFile (org.hl7.fhir.utilities.CSFile)26 ArrayList (java.util.ArrayList)23 TextFile (org.hl7.fhir.utilities.TextFile)20 InputStream (java.io.InputStream)18 IParser (org.hl7.fhir.r5.formats.IParser)18 Resource (org.hl7.fhir.dstu3.model.Resource)17 FileNotFoundException (java.io.FileNotFoundException)16 Resource (org.hl7.fhir.r4.model.Resource)16