Search in sources :

Example 36 with Expression

use of org.hl7.fhir.r5.model.Expression in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeActionDefinitionActionDefinitionCustomizationComponent.

protected void composeActionDefinitionActionDefinitionCustomizationComponent(Complex parent, String parentType, String name, ActionDefinition.ActionDefinitionCustomizationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeElement(t, "customization", name, element, index);
    if (element.hasPathElement())
        composeString(t, "ActionDefinition", "path", element.getPathElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "ActionDefinition", "expression", element.getExpressionElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 37 with Expression

use of org.hl7.fhir.r5.model.Expression in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeSearchParameter.

protected void composeSearchParameter(Complex parent, String parentType, String name, SearchParameter element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "SearchParameter", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "SearchParameter", "url", element.getUrlElement(), -1);
    if (element.hasNameElement())
        composeString(t, "SearchParameter", "name", element.getNameElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "SearchParameter", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "SearchParameter", "experimental", element.getExperimentalElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "SearchParameter", "date", element.getDateElement(), -1);
    if (element.hasPublisherElement())
        composeString(t, "SearchParameter", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeSearchParameterSearchParameterContactComponent(t, "SearchParameter", "contact", element.getContact().get(i), i);
    for (int i = 0; i < element.getUseContext().size(); i++) composeCodeableConcept(t, "SearchParameter", "useContext", element.getUseContext().get(i), i);
    if (element.hasRequirementsElement())
        composeString(t, "SearchParameter", "requirements", element.getRequirementsElement(), -1);
    if (element.hasCodeElement())
        composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1);
    if (element.hasBaseElement())
        composeCode(t, "SearchParameter", "base", element.getBaseElement(), -1);
    if (element.hasTypeElement())
        composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "SearchParameter", "description", element.getDescriptionElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1);
    if (element.hasXpathElement())
        composeString(t, "SearchParameter", "xpath", element.getXpathElement(), -1);
    if (element.hasXpathUsageElement())
        composeEnum(t, "SearchParameter", "xpathUsage", element.getXpathUsageElement(), -1);
    for (int i = 0; i < element.getTarget().size(); i++) composeCode(t, "SearchParameter", "target", element.getTarget().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)

Example 38 with Expression

use of org.hl7.fhir.r5.model.Expression in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeSearchParameter.

protected void composeSearchParameter(Complex parent, String parentType, String name, SearchParameter element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "SearchParameter", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "SearchParameter", "url", element.getUrlElement(), -1);
    if (element.hasVersionElement())
        composeString(t, "SearchParameter", "version", element.getVersionElement(), -1);
    if (element.hasNameElement())
        composeString(t, "SearchParameter", "name", element.getNameElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "SearchParameter", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "SearchParameter", "experimental", element.getExperimentalElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "SearchParameter", "date", element.getDateElement(), -1);
    if (element.hasPublisherElement())
        composeString(t, "SearchParameter", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "SearchParameter", "contact", element.getContact().get(i), i);
    for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "SearchParameter", "useContext", element.getUseContext().get(i), i);
    for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "SearchParameter", "jurisdiction", element.getJurisdiction().get(i), i);
    if (element.hasPurposeElement())
        composeMarkdown(t, "SearchParameter", "purpose", element.getPurposeElement(), -1);
    if (element.hasCodeElement())
        composeCode(t, "SearchParameter", "code", element.getCodeElement(), -1);
    for (int i = 0; i < element.getBase().size(); i++) composeCode(t, "SearchParameter", "base", element.getBase().get(i), i);
    if (element.hasTypeElement())
        composeEnum(t, "SearchParameter", "type", element.getTypeElement(), -1);
    if (element.hasDerivedFromElement())
        composeUri(t, "SearchParameter", "derivedFrom", element.getDerivedFromElement(), -1);
    if (element.hasDescriptionElement())
        composeMarkdown(t, "SearchParameter", "description", element.getDescriptionElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "SearchParameter", "expression", element.getExpressionElement(), -1);
    if (element.hasXpathElement())
        composeString(t, "SearchParameter", "xpath", element.getXpathElement(), -1);
    if (element.hasXpathUsageElement())
        composeEnum(t, "SearchParameter", "xpathUsage", element.getXpathUsageElement(), -1);
    for (int i = 0; i < element.getTarget().size(); i++) composeCode(t, "SearchParameter", "target", element.getTarget().get(i), i);
    for (int i = 0; i < element.getComparator().size(); i++) composeEnum(t, "SearchParameter", "comparator", element.getComparator().get(i), i);
    for (int i = 0; i < element.getModifier().size(); i++) composeEnum(t, "SearchParameter", "modifier", element.getModifier().get(i), i);
    for (int i = 0; i < element.getChain().size(); i++) composeString(t, "SearchParameter", "chain", element.getChain().get(i), i);
    for (int i = 0; i < element.getComponent().size(); i++) composeSearchParameterSearchParameterComponentComponent(t, "SearchParameter", "component", element.getComponent().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 39 with Expression

use of org.hl7.fhir.r5.model.Expression in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeRequestGroupRequestGroupActionConditionComponent.

protected void composeRequestGroupRequestGroupActionConditionComponent(Complex parent, String parentType, String name, RequestGroup.RequestGroupActionConditionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "condition", name, element, index);
    if (element.hasKindElement())
        composeEnum(t, "RequestGroup", "kind", element.getKindElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "RequestGroup", "description", element.getDescriptionElement(), -1);
    if (element.hasLanguageElement())
        composeString(t, "RequestGroup", "language", element.getLanguageElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "RequestGroup", "expression", element.getExpressionElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 40 with Expression

use of org.hl7.fhir.r5.model.Expression in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeOperationOutcomeOperationOutcomeIssueComponent.

protected void composeOperationOutcomeOperationOutcomeIssueComponent(Complex parent, String parentType, String name, OperationOutcome.OperationOutcomeIssueComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "issue", name, element, index);
    if (element.hasSeverityElement())
        composeEnum(t, "OperationOutcome", "severity", element.getSeverityElement(), -1);
    if (element.hasCodeElement())
        composeEnum(t, "OperationOutcome", "code", element.getCodeElement(), -1);
    if (element.hasDetails())
        composeCodeableConcept(t, "OperationOutcome", "details", element.getDetails(), -1);
    if (element.hasDiagnosticsElement())
        composeString(t, "OperationOutcome", "diagnostics", element.getDiagnosticsElement(), -1);
    for (int i = 0; i < element.getLocation().size(); i++) composeString(t, "OperationOutcome", "location", element.getLocation().get(i), i);
    for (int i = 0; i < element.getExpression().size(); i++) composeString(t, "OperationOutcome", "expression", element.getExpression().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

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