Search in sources :

Example 6 with Expression

use of org.hl7.fhir.r5.model.Expression in project kindling by HL7.

the class BuildWorkerContext method queryForTerm.

private SnomedServerResponse queryForTerm(String code) throws Exception {
    if (!triedServer || serverOk) {
        triedServer = true;
        HttpClient httpclient = new DefaultHttpClient();
        HttpGet httpget = new HttpGet("http://tx.fhir.org/snomed/tool/" + SNOMED_EDITION + "/" + URLEncoder.encode(code, "UTF-8").replace("+", "%20"));
        // HttpGet httpget = new HttpGet("http://local.fhir.org:960/r4/snomed/tool/"+SNOMED_EDITION+"/"+URLEncoder.encode(code, "UTF-8").replace("+", "%20")); // don't like the url encoded this way
        HttpResponse response = httpclient.execute(httpget);
        HttpEntity entity = response.getEntity();
        InputStream instream = entity.getContent();
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document xdoc = builder.parse(instream);
            // we always get back a version, and a type. What we do depends on the type
            String t = xdoc.getDocumentElement().getAttribute("type");
            serverOk = true;
            if (t.equals("error"))
                throw new Exception(xdoc.getDocumentElement().getAttribute("message"));
            if (t.equals("description"))
                throw new Exception("The Snomed code (\"" + code + "\") is a description id not a concept id which is not valid");
            if (t.equals("concept")) {
                Concept c = new Concept();
                c.display = xdoc.getDocumentElement().getAttribute("display");
                Element child = XMLUtil.getFirstChild(xdoc.getDocumentElement());
                while (child != null) {
                    c.displays.add(child.getAttribute("value"));
                    child = XMLUtil.getNextSibling(child);
                }
                snomedCodes.put(code, c);
                return null;
            }
            if (t.equals("expression")) {
                SnomedServerResponse resp = new SnomedServerResponse();
                resp.correctExpression = xdoc.getDocumentElement().getAttribute("expressionMinimal");
                resp.display = xdoc.getDocumentElement().getAttribute("display");
                if (!snomedCodes.containsKey(resp.correctExpression)) {
                    Concept c = new Concept();
                    c.display = resp.display;
                    snomedCodes.put(resp.correctExpression, c);
                }
                return resp;
            }
            throw new Exception("Unrecognised response from server");
        } finally {
            instream.close();
        }
    } else
        return null;
}
Also used : DocumentBuilderFactory(javax.xml.parsers.DocumentBuilderFactory) HttpEntity(org.apache.http.HttpEntity) CSFileInputStream(org.hl7.fhir.utilities.CSFileInputStream) InputStream(java.io.InputStream) HttpGet(org.apache.http.client.methods.HttpGet) Element(org.w3c.dom.Element) HttpResponse(org.apache.http.HttpResponse) Document(org.w3c.dom.Document) DefaultHttpClient(org.apache.http.impl.client.DefaultHttpClient) UcumException(org.fhir.ucum.UcumException) TerminologyServiceException(org.hl7.fhir.exceptions.TerminologyServiceException) FileNotFoundException(java.io.FileNotFoundException) SAXException(org.xml.sax.SAXException) DefinitionException(org.hl7.fhir.exceptions.DefinitionException) EFhirClientException(org.hl7.fhir.r5.utils.client.EFhirClientException) IOException(java.io.IOException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) FHIRException(org.hl7.fhir.exceptions.FHIRException) DocumentBuilder(javax.xml.parsers.DocumentBuilder) DefaultHttpClient(org.apache.http.impl.client.DefaultHttpClient) HttpClient(org.apache.http.client.HttpClient)

Example 7 with Expression

use of org.hl7.fhir.r5.model.Expression in project kindling by HL7.

the class OldSpreadsheetParser method parseProfileSheet.

private ConstraintStructure parseProfileSheet(Definitions definitions, Profile ap, String n, List<String> namedSheets, boolean published, String usage, List<ValidationMessage> issues, WorkGroup wg, String fmm) throws Exception {
    Sheet sheet;
    ResourceDefn resource = new ResourceDefn();
    sheet = loadSheet(n + "-Inv");
    Map<String, Invariant> invariants = null;
    if (sheet != null) {
        invariants = readInvariants(sheet, n, n + "-Inv");
    } else {
        invariants = new HashMap<String, Invariant>();
    }
    sheet = loadSheet(n);
    if (sheet == null)
        throw new Exception("The StructureDefinition referred to a tab by the name of '" + n + "', but no tab by the name could be found");
    for (int row = 0; row < sheet.rows.size(); row++) {
        ElementDefn e = processLine(resource, sheet, row, invariants, true, ap, row == 0);
        if (e != null)
            for (TypeRef t : e.getTypes()) {
                if (t.getProfile() != null && !t.getName().equals("Extension") && t.getProfile().startsWith("#")) {
                    if (!namedSheets.contains(t.getProfile().substring(1)))
                        namedSheets.add(t.getProfile().substring(1));
                }
            }
    }
    sheet = loadSheet(n + "-Extensions");
    if (sheet != null) {
        int row = 0;
        while (row < sheet.rows.size()) {
            if (sheet.getColumn(row, "Code").startsWith("!"))
                row++;
            else
                row = processExtension(resource.getRoot().getElementByName(definitions, "extensions", true, false), sheet, row, definitions, ap.metadata("extension.uri"), ap, issues, invariants, wg);
        }
    }
    sheet = loadSheet(n + "-Search");
    if (sheet != null) {
        readSearchParams(resource, sheet, true);
    }
    if (invariants != null) {
        for (Invariant inv : invariants.values()) {
            if (Utilities.noString(inv.getContext()))
                throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " has no context");
            else {
                ElementDefn ed = findContext(resource.getRoot(), inv.getContext(), "Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " Context");
                // TODO: Need to resolve context based on element name, not just path
                if (ed.getName().endsWith("[x]") && !inv.getContext().endsWith("[x]"))
                    inv.setFixedName(inv.getContext().substring(inv.getContext().lastIndexOf(".") + 1));
                ed.getInvariants().put(inv.getId(), inv);
                if (Utilities.noString(inv.getXpath())) {
                    throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " (" + inv.getEnglish() + ") has no XPath statement");
                } else if (inv.getXpath().contains("\""))
                    throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " (" + inv.getEnglish() + ") contains a \" character");
            // if (Utilities.noString(inv.getExpression()))
            // throw new Exception("Type "+resource.getRoot().getName()+" Invariant "+inv.getId()+" ("+inv.getEnglish()+") has no Expression statement (in FHIRPath format)");
            }
        }
    }
    resource.getRoot().setProfileName(n);
    if (n.toLowerCase().equals(ap.getId()))
        throw new Exception("Duplicate Profile Name: Package id " + ap.getId() + " and profile id " + n.toLowerCase() + " are the same");
    if (profileIds.containsKey(n.toLowerCase()))
        throw new Exception("Duplicate Profile Name: " + n.toLowerCase() + " in " + ap.getId() + ", already registered in " + profileIds.get(n.toLowerCase()).getOwner());
    ConstraintStructure p = new ConstraintStructure(n.toLowerCase(), resource.getRoot().getProfileName(), resource, ig != null ? ig : definitions.getUsageIG(usage, "Parsing " + name), wg, fmm, Utilities.existsInList(ap.metadata("Experimental"), "y", "Y", "true", "TRUE", "1"));
    p.setOwner(ap.getId());
    profileIds.put(n.toLowerCase(), p);
    return p;
}
Also used : Invariant(org.hl7.fhir.definitions.model.Invariant) TypeRef(org.hl7.fhir.definitions.model.TypeRef) ElementDefn(org.hl7.fhir.definitions.model.ElementDefn) ConstraintStructure(org.hl7.fhir.definitions.model.ConstraintStructure) Sheet(org.hl7.fhir.utilities.xls.XLSXmlParser.Sheet) ResourceDefn(org.hl7.fhir.definitions.model.ResourceDefn) FHIRException(org.hl7.fhir.exceptions.FHIRException)

Example 8 with Expression

use of org.hl7.fhir.r5.model.Expression in project kindling by HL7.

the class OldSpreadsheetParser method parseCommonTypeColumns.

private ResourceDefn parseCommonTypeColumns(boolean isResource, boolean isTemplate) throws Exception {
    ResourceDefn resource = new ResourceDefn();
    resource.setInterface(isTemplate);
    Sheet sheet = loadSheet("Bindings");
    if (sheet != null)
        readBindings(sheet);
    sheet = loadSheet("Invariants");
    Map<String, Invariant> invariants = null;
    if (sheet != null)
        invariants = readInvariants(sheet, title, "Invariants");
    sheet = loadSheet("Data Elements");
    if (sheet == null)
        throw new Exception("No Sheet found for Data Elements");
    for (int row = 0; row < sheet.rows.size(); row++) {
        processLine(resource, sheet, row, invariants, false, null, row == 0);
    }
    // default...
    StandardsStatus ss = StandardsStatus.TRIAL_USE;
    String s = ini.getStringProperty("normative", resource.getName());
    if (!Utilities.noString(s))
        ss = StandardsStatus.NORMATIVE;
    resource.setStatus(ss);
    resource.setRequirements(resource.getRoot().getRequirements());
    resource.addHints(checkIgnoredColumns(sheet));
    if (template != null) {
        resource.setTemplate(template.getRoot());
        copySearchParameters(resource);
        copyInvariants(resource);
        template = null;
    }
    parseMetadata(resource);
    if (invariants != null) {
        for (Invariant inv : invariants.values()) {
            if (Utilities.noString(inv.getContext()))
                throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " has no context");
            else {
                ElementDefn ed = findContext(resource.getRoot(), inv.getContext(), "Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " Context");
                if (ed.getName().endsWith("[x]") && !inv.getContext().endsWith("[x]"))
                    inv.setFixedName(inv.getContext().substring(inv.getContext().lastIndexOf(".") + 1));
                ed.getInvariants().put(inv.getId(), inv);
                if (Utilities.noString(inv.getXpath())) {
                    throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " (" + inv.getEnglish() + ") has no XPath statement");
                } else if (inv.getXpath().contains("\""))
                    throw new Exception("Type " + resource.getRoot().getName() + " Invariant " + inv.getId() + " (" + inv.getEnglish() + ") contains a \" character");
                if (Utilities.noString(inv.getExpression())) {
                // This has been disabled for now, per Lloyd McKenzie's request via Skype - jamesagnew
                // throw new Exception("Type "+resource.getRoot().getName()+" Invariant "+inv.getId()+" ("+inv.getEnglish()+") has no Expression statement (in FHIRPath format)");
                } else {
                    fpUsages.add(new FHIRPathUsage(inv.getContext(), isResource ? resource.getName() : "DomainResource", inv.getContext(), null, inv.getExpression(), inv.getXpath()));
                }
            }
        }
    }
    // EK: Future types. But those won't get there.
    if (bindings != null)
        resource.getRoot().getNestedBindings().putAll(bindings);
    scanNestedTypes(resource, resource.getRoot(), resource.getName());
    resolveElementReferences(resource, resource.getRoot());
    resource.getRoot().setAbstractType(isAbstract);
    return resource;
}
Also used : Invariant(org.hl7.fhir.definitions.model.Invariant) ElementDefn(org.hl7.fhir.definitions.model.ElementDefn) FHIRPathUsage(org.hl7.fhir.definitions.validation.FHIRPathUsage) ResourceDefn(org.hl7.fhir.definitions.model.ResourceDefn) Sheet(org.hl7.fhir.utilities.xls.XLSXmlParser.Sheet) StandardsStatus(org.hl7.fhir.utilities.StandardsStatus) FHIRException(org.hl7.fhir.exceptions.FHIRException)

Example 9 with Expression

use of org.hl7.fhir.r5.model.Expression in project kindling by HL7.

the class OldSpreadsheetParser method readSearchParams.

private void readSearchParams(ResourceDefn root2, Sheet sheet, boolean forProfile) throws Exception {
    if (sheet != null) {
        for (int row = 0; row < sheet.rows.size(); row++) {
            if (!sheet.hasColumn(row, "Name"))
                throw new Exception("Search Param has no name " + getLocation(row));
            String n = sheet.getColumn(row, "Name");
            if (!n.startsWith("!")) {
                if (!sheet.hasColumn(row, "Type"))
                    throw new Exception("Search Param " + root2.getName() + "/" + n + " has no type " + getLocation(row));
                if (n.endsWith("-before") || n.endsWith("-after"))
                    throw new Exception("Search Param " + root2.getName() + "/" + n + " includes relative time " + getLocation(row));
                if (root2.getSearchParams().containsKey(n))
                    throw new Exception("Search Param " + root2.getName() + "/" + n + ": duplicate name " + getLocation(row));
                String d = sheet.getColumn(row, "Description");
                SearchType t = readSearchType(sheet.getColumn(row, "Type"), row);
                SearchParameter.XPathUsageType pu = readSearchXPathUsage(sheet.getColumn(row, "Path Usage"), row);
                if (Utilities.noString(sheet.getColumn(row, "Path")) && !root2.getName().equals("Resource") && !root2.getName().equals("DomainResource"))
                    throw new Exception("Search Param " + root2.getName() + "/" + n + " has no path at " + getLocation(row));
                SearchParameterDefn sp = null;
                if (t == SearchType.composite) {
                    List<CompositeDefinition> pn = new ArrayList<CompositeDefinition>();
                    if (Utilities.noString(d))
                        throw new Exception("Search Param " + root2.getName() + "/" + n + " has no description " + getLocation(row));
                    String[] pl = sheet.getColumn(row, "Path").split("\\&");
                    String[] pe = sheet.getColumn(row, "Expression").split("\\;");
                    if (pe.length != pl.length + 1)
                        throw new Exception("Composite Search Param " + root2.getName() + "/" + n + " needs expressions " + getLocation(row));
                    int i = 0;
                    for (String pi : pl) {
                        String p = pi.trim();
                        i++;
                        String e = pe[i].trim();
                        if (!root2.getSearchParams().containsKey(p)) {
                            boolean found = false;
                            if (p.endsWith("[x]"))
                                for (String pan : root2.getSearchParams().keySet()) {
                                    if (pan.startsWith(p.substring(0, p.length() - 3)))
                                        found = true;
                                }
                            if (!found)
                                throw new Exception("Composite Search Param " + root2.getName() + "/" + n + "  refers to an unknown component " + p + " at " + getLocation(row));
                        }
                        pn.add(new CompositeDefinition(p, e));
                    }
                    StandardsStatus ss = root2.getStatus();
                    if (!Utilities.noString(sheet.getColumn(row, "Standards-Status")))
                        ss = StandardsStatus.fromCode(sheet.getColumn(row, "Standards-Status"));
                    sp = new SearchParameterDefn(n, d, t, pu, ss);
                    sp.setExpression(pe[0].trim());
                    sp.getComposites().addAll(pn);
                } else {
                    List<String> pn = new ArrayList<String>();
                    String xp = sheet.getColumn(row, "XPath");
                    String[] pl = sheet.getColumn(row, "Path").split("\\|");
                    boolean hierarchy = false;
                    for (String pi : pl) {
                        String p = pi.trim();
                        ElementDefn e = null;
                        if (!Utilities.noString(p) && !p.startsWith("!") && !p.startsWith("Extension{") && definitions != null) {
                            e = root2.getRoot().getElementForPath(trimIndexes(p), definitions, "search param", true, true);
                        }
                        if (e != null && e.hasHierarchy() && e.getHierarchy())
                            hierarchy = true;
                        if (Utilities.noString(d) && e != null)
                            d = e.getShortDefn();
                        if (p.startsWith("Extension(")) {
                            String url = extractExtensionUrl(p);
                            StructureDefinition ex = context.fetchResource(StructureDefinition.class, url);
                            if (ex == null)
                                throw new Exception("Search Param " + root2.getName() + "/" + n + " refers to unknown extension '" + url + "' " + getLocation(row));
                            if (Utilities.noString(d))
                                d = ex.getDescription();
                            pn.add(p);
                        }
                        if (d == null)
                            throw new Exception("Search Param " + root2.getName() + "/" + n + " has no description " + getLocation(row));
                        if (e != null)
                            pn.add(p);
                        if (t == SearchType.reference) {
                            if (e == null && !forProfile && !sheet.hasColumn(row, "Target Types"))
                                throw new Exception("Search Param " + root2.getName() + "/" + n + " of type reference has wrong path '" + p + "' at " + getLocation(row));
                            if (!forProfile && e != null && (!e.hasType("Reference")) && (!e.hasType("canonical")) && (!e.hasType("Resource")))
                                throw new Exception("Search Param " + root2.getName() + "/" + n + " wrong type. The search type is reference, but the element type is " + e.typeCode());
                        } else {
                            if (e != null && e.hasOnlyType("Reference"))
                                throw new Exception("Search Param " + root2.getName() + "/" + n + " wrong type. The search type is " + t.toString() + ", but the element type is " + e.typeCode());
                            if (t == SearchType.uri) {
                                if (e != null && !(e.typeCode().equals("uri") || e.typeCode().equals("url") || e.typeCode().equals("oid") || e.typeCode().startsWith("canonical(")))
                                    throw new Exception("Search Param " + root2.getName() + "/" + n + " wrong type. The search type is " + t.toString() + ", but the element type is " + e.typeCode());
                            } else {
                                if (e != null && e.typeCode().equals("uri"))
                                    throw new Exception("Search Param " + root2.getName() + "/" + n + " wrong type. The search type is " + t.toString() + ", but the element type is " + e.typeCode());
                            }
                        }
                    }
                    if (!forProfile && t == SearchType.reference && pn.size() == 0 && !sheet.hasColumn(row, "Target Types"))
                        throw new Exception("Search Param " + root2.getName() + "/" + n + " of type reference has no path(s) " + getLocation(row));
                    StandardsStatus ss = root2.getStatus();
                    if (!Utilities.noString(sheet.getColumn(row, "Standards-Status")))
                        ss = StandardsStatus.fromCode(sheet.getColumn(row, "Standards-Status"));
                    sp = new SearchParameterDefn(n, d, t, pu, ss);
                    sp.getPaths().addAll(pn);
                    if (!Utilities.noString(xp))
                        sp.setXPath(xp);
                    if (!Utilities.noString(sheet.getColumn(row, "Expression")))
                        sp.setExpression(sheet.getColumn(row, "Expression"));
                    if (!Utilities.noString(sheet.getColumn(row, "Target Types"))) {
                        sp.setManualTypes(sheet.getColumn(row, "Target Types").split("\\,"));
                    }
                    sp.setHierarchy(hierarchy);
                    CommonSearchParameter csp = definitions.getCommonSearchParameters().get(root2.getName() + "::" + n);
                    if (csp != null)
                        for (String s : csp.getResources()) {
                            if (!root2.getName().equals(s))
                                sp.getOtherResources().add(s);
                        }
                }
                root2.getSearchParams().put(n, sp);
            }
        }
    }
}
Also used : SearchParameterDefn(org.hl7.fhir.definitions.model.SearchParameterDefn) ArrayList(java.util.ArrayList) ElementDefn(org.hl7.fhir.definitions.model.ElementDefn) FHIRException(org.hl7.fhir.exceptions.FHIRException) CompositeDefinition(org.hl7.fhir.definitions.model.SearchParameterDefn.CompositeDefinition) StructureDefinition(org.hl7.fhir.r5.model.StructureDefinition) CommonSearchParameter(org.hl7.fhir.definitions.model.CommonSearchParameter) SearchType(org.hl7.fhir.definitions.model.SearchParameterDefn.SearchType) CommonSearchParameter(org.hl7.fhir.definitions.model.CommonSearchParameter) SearchParameter(org.hl7.fhir.r5.model.SearchParameter) StandardsStatus(org.hl7.fhir.utilities.StandardsStatus)

Example 10 with Expression

use of org.hl7.fhir.r5.model.Expression in project kindling by HL7.

the class SourceParser method loadCompositeType.

private String loadCompositeType(String n, Map<String, org.hl7.fhir.definitions.model.TypeDefn> map, String fmm, boolean isAbstract) throws Exception {
    TypeParser tp = new TypeParser(version.toString());
    List<TypeRef> ts = tp.parse(n, false, null, context, true);
    definitions.getKnownTypes().addAll(ts);
    StandardsStatus status = loadStatus(n);
    String nv = loadNormativeVersion(n);
    try {
        TypeRef t = ts.get(0);
        File csv = new CSFile(dtDir + t.getName().toLowerCase() + ".xml");
        if (csv.exists()) {
            OldSpreadsheetParser p = new OldSpreadsheetParser("core", new CSFileInputStream(csv), csv.getName(), csv.getAbsolutePath(), definitions, srcDir, logger, registry, version, context, genDate, isAbstract, page, true, ini, wg("fhir"), definitions.getProfileIds(), fpUsages, page.getConceptMaps(), exceptionIfExcelNotNormalised, page.packageInfo(), page.getRc());
            org.hl7.fhir.definitions.model.TypeDefn el = p.parseCompositeType();
            el.setFmmLevel(fmm);
            el.setStandardsStatus(status);
            el.setNormativeVersion(nv);
            map.put(t.getName(), el);
            genTypeProfile(el);
            errors.addAll(p.getErrors());
            return el.getName();
        } else {
            String p = ini.getStringProperty("types", n);
            csv = new CSFile(dtDir + p.toLowerCase() + ".xml");
            if (!csv.exists())
                throw new Exception("unable to find a definition for " + n + " in " + p);
            XLSXmlParser xls = new XLSXmlParser(new CSFileInputStream(csv), csv.getAbsolutePath());
            new XLSXmlNormaliser(csv.getAbsolutePath(), exceptionIfExcelNotNormalised).go();
            Sheet sheet = xls.getSheets().get("Restrictions");
            boolean found = false;
            for (int i = 0; i < sheet.rows.size(); i++) {
                if (sheet.getColumn(i, "Name").equals(n)) {
                    found = true;
                    Invariant inv = new Invariant();
                    inv.setId(n);
                    inv.setEnglish(sheet.getColumn(i, "Rules"));
                    inv.setOcl(sheet.getColumn(i, "OCL"));
                    inv.setXpath(sheet.getColumn(i, "XPath"));
                    inv.setExpression(sheet.getColumn(i, "Expression"));
                    inv.setExplanation(sheet.getColumn(i, "Explanation"));
                    inv.setTurtle(sheet.getColumn(i, "RDF"));
                    ProfiledType pt = new ProfiledType();
                    pt.setDefinition(sheet.getColumn(i, "Definition"));
                    pt.setDescription(sheet.getColumn(i, "Rules"));
                    String structure = sheet.getColumn(i, "Structure");
                    if (!Utilities.noString(structure)) {
                        String[] parts = structure.split("\\;");
                        for (String pp : parts) {
                            String[] words = pp.split("\\=");
                            pt.getRules().put(words[0], words[1]);
                        }
                    }
                    pt.setName(n);
                    pt.setBaseType(p);
                    pt.setInvariant(inv);
                    definitions.getConstraints().put(n, pt);
                }
            }
            if (!found)
                throw new Exception("Unable to find definition for " + n);
            return n;
        }
    } catch (Exception e) {
        throw new Exception("Unable to load " + n + ": " + e.getMessage(), e);
    }
}
Also used : Invariant(org.hl7.fhir.definitions.model.Invariant) ProfiledType(org.hl7.fhir.definitions.model.ProfiledType) TypeRef(org.hl7.fhir.definitions.model.TypeRef) XLSXmlParser(org.hl7.fhir.utilities.xls.XLSXmlParser) XLSXmlNormaliser(org.hl7.fhir.utilities.xls.XLSXmlNormaliser) CSFile(org.hl7.fhir.utilities.CSFile) IOException(java.io.IOException) FHIRException(org.hl7.fhir.exceptions.FHIRException) FileNotFoundException(java.io.FileNotFoundException) SAXException(org.xml.sax.SAXException) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) OldSpreadsheetParser(org.hl7.fhir.definitions.parsers.spreadsheets.OldSpreadsheetParser) TypeDefn(org.hl7.fhir.definitions.model.TypeDefn) StandardsStatus(org.hl7.fhir.utilities.StandardsStatus) IniFile(org.hl7.fhir.utilities.IniFile) File(java.io.File) CSFile(org.hl7.fhir.utilities.CSFile) TextFile(org.hl7.fhir.utilities.TextFile) Sheet(org.hl7.fhir.utilities.xls.XLSXmlParser.Sheet) CSFileInputStream(org.hl7.fhir.utilities.CSFileInputStream)

Aggregations

HashMap (java.util.HashMap)33 Test (org.junit.Test)30 Test (org.junit.jupiter.api.Test)30 Patient (org.hl7.fhir.r4.model.Patient)29 CqlEvaluator (com.ibm.cohort.cql.evaluation.CqlEvaluator)28 CqlVersionedIdentifier (com.ibm.cohort.cql.library.CqlVersionedIdentifier)28 ArrayList (java.util.ArrayList)27 Expression (org.hl7.elm.r1.Expression)26 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)25 CqlEvaluationResult (com.ibm.cohort.cql.evaluation.CqlEvaluationResult)24 FHIRException (org.hl7.fhir.exceptions.FHIRException)19 FhirServerConfig (com.ibm.cohort.fhir.client.config.FhirServerConfig)16 Coding (org.hl7.fhir.r4.model.Coding)15 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)14 Row (org.apache.spark.sql.Row)12 List (java.util.List)11 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)11 FhirPath (au.csiro.pathling.fhirpath.FhirPath)10 Nonnull (javax.annotation.Nonnull)10 RestIntegrationTest (org.opencds.cqf.ruler.test.RestIntegrationTest)9