Component: Validation (FHIRQuestionnaireValidator) — not in the template dropdown
FHIR Version: All versions (SDC extension)
Problem Statement
FHIRQuestionnaireValidator does not yet support the SDC calculatedExpression extension
(http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression).
Documented as out of scope in docs/validation/questionnaire.md. Answers that should be
auto-calculated from a FHIRPath expression are not checked against the calculated value.
Proposed Solution
Read the calculatedExpression extension off the source Questionnaire item, evaluate it via
FHIRPathService against the response, and validate that the submitted answer matches the
calculated result. Reuse the expression-evaluation pattern from evaluateEnableWhenExpression
(src/Component/Validation/src/FHIRQuestionnaireValidator.php:2254) and the EXT_* constant
convention (~:126-175). Add an EXT_CALCULATED_EXPRESSION_SDC constant.
Additional Context
Precedent: EXT_ENABLE_WHEN_EXPRESSION_SDC (line 175). One of three remaining uncovered
SDC/R5 questionnaire-validation features; enableWhenExpression and regex are already covered.
Component: Validation (
FHIRQuestionnaireValidator) — not in the template dropdownFHIR Version: All versions (SDC extension)
Problem Statement
FHIRQuestionnaireValidatordoes not yet support the SDCcalculatedExpressionextension(
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression).Documented as out of scope in
docs/validation/questionnaire.md. Answers that should beauto-calculated from a FHIRPath expression are not checked against the calculated value.
Proposed Solution
Read the
calculatedExpressionextension off the source Questionnaire item, evaluate it viaFHIRPathServiceagainst the response, and validate that the submitted answer matches thecalculated result. Reuse the expression-evaluation pattern from
evaluateEnableWhenExpression(
src/Component/Validation/src/FHIRQuestionnaireValidator.php:2254) and theEXT_*constantconvention (
~:126-175). Add anEXT_CALCULATED_EXPRESSION_SDCconstant.Additional Context
Precedent:
EXT_ENABLE_WHEN_EXPRESSION_SDC(line 175). One of three remaining uncoveredSDC/R5 questionnaire-validation features;
enableWhenExpressionandregexare already covered.