Search in sources :

Example 1 with PlanDefinitionActionConditionComponent

use of org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent in project eCRNow by drajer-health.

the class PlanDefinitionProcessor method processConditions.

private void processConditions(List<PlanDefinitionActionConditionComponent> condlist, AbstractAction act) {
    if (condlist != null && !condlist.isEmpty()) {
        for (PlanDefinitionActionConditionComponent cond : condlist) {
            if (cond.hasKind() && cond.hasExpression()) {
                CQLExpressionCondition cd = new CQLExpressionCondition();
                cd.setConditionType(cond.getKind());
                cd.setExpression(cond.getExpression().getExpression());
                act.addCondition(cd);
            }
        }
    }
}
Also used : CQLExpressionCondition(com.drajer.eca.model.CQLExpressionCondition) PlanDefinitionActionConditionComponent(org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent)

Aggregations

CQLExpressionCondition (com.drajer.eca.model.CQLExpressionCondition)1 PlanDefinitionActionConditionComponent (org.hl7.fhir.r4.model.PlanDefinition.PlanDefinitionActionConditionComponent)1