Package org.hl7.fhir.validation.instance
Class EnableWhenEvaluator
- java.lang.Object
-
- org.hl7.fhir.validation.instance.EnableWhenEvaluator
-
public class EnableWhenEvaluator extends Object
Evaluates Questionnaire.item.enableWhen against a QuestionnaireResponse. Ignores possible modifierExtensions and extensions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEnableWhenEvaluator.EnableWhenResultstatic classEnableWhenEvaluator.QStackstatic classEnableWhenEvaluator.QuestionnaireAnswerPair
-
Field Summary
Fields Modifier and Type Field Description static StringANSWER_ELEMENTstatic StringITEM_ELEMENTstatic StringLINKID_ELEMENT
-
Constructor Summary
Constructors Constructor Description EnableWhenEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckConditionResults(List<EnableWhenEvaluator.EnableWhenResult> evaluationResults, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent questionnaireItem)protected booleanevaluateAnswer(org.hl7.fhir.r5.elementmodel.Element answer, org.hl7.fhir.r5.model.DataType expectedAnswer, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemOperator questionnaireItemOperator)protected EnableWhenEvaluator.EnableWhenResultevaluateCondition(org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent enableCondition, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent qitem, EnableWhenEvaluator.QStack qstack)booleanisQuestionEnabled(ValidatorHostContext hostContext, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent qitem, EnableWhenEvaluator.QStack qstack, org.hl7.fhir.r5.utils.FHIRPathEngine engine)the stack contains a set of QR items that represent the tree of the QR being validated, each tagged with the definition of the item from the Q for the QR being validated
-
-
-
Field Detail
-
LINKID_ELEMENT
public static final String LINKID_ELEMENT
- See Also:
- Constant Field Values
-
ITEM_ELEMENT
public static final String ITEM_ELEMENT
- See Also:
- Constant Field Values
-
ANSWER_ELEMENT
public static final String ANSWER_ELEMENT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
EnableWhenEvaluator
public EnableWhenEvaluator()
-
-
Method Detail
-
isQuestionEnabled
public boolean isQuestionEnabled(ValidatorHostContext hostContext, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent qitem, EnableWhenEvaluator.QStack qstack, org.hl7.fhir.r5.utils.FHIRPathEngine engine)
the stack contains a set of QR items that represent the tree of the QR being validated, each tagged with the definition of the item from the Q for the QR being validatedthe itembeing validated is in the context of the stack. For root items, the stack is empty.
The context Questionnaire and QuestionnaireResponse are always available
-
checkConditionResults
public boolean checkConditionResults(List<EnableWhenEvaluator.EnableWhenResult> evaluationResults, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent questionnaireItem)
-
evaluateCondition
protected EnableWhenEvaluator.EnableWhenResult evaluateCondition(org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemEnableWhenComponent enableCondition, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemComponent qitem, EnableWhenEvaluator.QStack qstack)
-
evaluateAnswer
protected boolean evaluateAnswer(org.hl7.fhir.r5.elementmodel.Element answer, org.hl7.fhir.r5.model.DataType expectedAnswer, org.hl7.fhir.r5.model.Questionnaire.QuestionnaireItemOperator questionnaireItemOperator)
-
-