Component: Validation (FHIRQuestionnaireValidator) — not in the template dropdown
FHIR Version: All versions (SDC extension)
Problem Statement
FHIRQuestionnaireValidator does not yet support the SDC answerExpression extension
(http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression). This is
documented as out of scope in docs/validation/questionnaire.md. Questionnaires that derive
their candidate answers from a FHIRPath/expression cannot have those answers validated.
Proposed Solution
Read the answerExpression extension off the source Questionnaire item, evaluate its FHIRPath
expression via FHIRPathService, and validate the response answer against the resulting answer
set. Slots in alongside the existing enableWhenExpression handling
(src/Component/Validation/src/FHIRQuestionnaireValidator.php:2254, evaluateEnableWhenExpression)
and follows the EXT_* constant pattern (~:126-175). Add an EXT_ANSWER_EXPRESSION_SDC constant.
Additional Context
Precedent: EXT_ENABLE_WHEN_EXPRESSION_SDC (line 175) and its evaluation. enableWhenExpression
and regex constraints are already covered; this is one of three remaining uncovered SDC/R5 features.
Component: Validation (
FHIRQuestionnaireValidator) — not in the template dropdownFHIR Version: All versions (SDC extension)
Problem Statement
FHIRQuestionnaireValidatordoes not yet support the SDCanswerExpressionextension(
http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression). This isdocumented as out of scope in
docs/validation/questionnaire.md. Questionnaires that derivetheir candidate answers from a FHIRPath/expression cannot have those answers validated.
Proposed Solution
Read the
answerExpressionextension off the source Questionnaire item, evaluate its FHIRPathexpression via
FHIRPathService, and validate the response answer against the resulting answerset. Slots in alongside the existing
enableWhenExpressionhandling(
src/Component/Validation/src/FHIRQuestionnaireValidator.php:2254,evaluateEnableWhenExpression)and follows the
EXT_*constant pattern (~:126-175). Add anEXT_ANSWER_EXPRESSION_SDCconstant.Additional Context
Precedent:
EXT_ENABLE_WHEN_EXPRESSION_SDC(line 175) and its evaluation.enableWhenExpressionand
regexconstraints are already covered; this is one of three remaining uncovered SDC/R5 features.