+ * the itembeing validated is in the context of the stack. For root items, the stack is empty. + *
* The context Questionnaire and QuestionnaireResponse are always available
- *
- * @param questionnaireItem
- * @param questionnaireResponse
- * @param qstack
- * @return
*/
public boolean isQuestionEnabled(ValidatorHostContext hostContext, QuestionnaireItemComponent qitem, QStack qstack, FHIRPathEngine engine) {
if (hasExpressionExtension(qitem)) {
@@ -138,22 +130,22 @@ public class EnableWhenEvaluator {
ExpressionNode node = engine.parse(expr);
return engine.evaluateToBoolean(hostContext, qstack.a, qstack.a, qstack.a, node);
}
-
+
if (!qitem.hasEnableWhen()) {
return true;
}
-
+
List
* For discussion about this, see https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/enable-when
- *
- - given sourceQ - question that contains the enableWhen reference and targetQ - question that the enableWhen references in the Q and also sourceA - answer for sourceQ and targetA - answer for targetQ in the QR
- - work up from sourceQ until you find the Q group that also contains targetQ - this is groupQ
- - work up from sourceA until you find the QR group that matches groupQ - this is groupA
- - any targetA in groupA are input for the enableWhen decision
+ *
+ * - given sourceQ - question that contains the enableWhen reference and targetQ - question that the enableWhen references in the Q and also sourceA - answer for sourceQ and targetA - answer for targetQ in the QR
+ * - work up from sourceQ until you find the Q group that also contains targetQ - this is groupQ
+ * - work up from sourceA until you find the QR group that matches groupQ - this is groupA
+ * - any targetA in groupA are input for the enableWhen decision
*/
private List