Skip to content

Commit ed45bdd

Browse files
committed
docs(validation): document full R4 conformance coverage in questionnaire guidance
Add `enableWhenExpression`, `regex`, and implementation-rules table updates to the questionnaire validation guide. Update assertions in FHIRQuestionnaireConformanceTest to seed and assert all 78 eligible R4 cases, marking none as incomplete or skipped.
1 parent 55cbaa6 commit ed45bdd

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Fixed
1111
- [Docs] Removed the stale "single-element repeating fields" XML limitation note from the serialization guide; single-value repeating fields (e.g. a `HumanName` with one `given`) already round-trip correctly through XML, and a regression test now guards this
12+
- [Docs] Corrected the Questionnaire validation guide: `enableWhenExpression` (SDC + Kanta variants) and `regex` constraints are now documented as covered, the implementation-rules table lists the enforced constraint/value-domain/quantity `error` rules, and the conformance-coverage section reflects that all 78 eligible R4 cases are seeded and asserted (only SDC `answerExpression`/`calculatedExpression` and R5 `answerConstraint` remain uncovered)
1213

1314
## [0.4.0] - 2026-06-12
1415

src/Component/Validation/tests/Integration/FHIRQuestionnaireConformanceTest.php

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,16 @@
2525
* the validator, and assert the
2626
* violation counts against our own seeded outcomes in outcomes/questionnaire/.
2727
*
28-
* Why seeded (not Java-parity) outcomes: the validator implements a documented SUBSET of the
29-
* spec rules (linkId, placement, required, repeats, answer-type WARNING, basic enableWhen —
30-
* ADR-007). Many corpus cases test rules we deliberately do not cover (answerOption, min/max,
31-
* regex, units, SDC expressions, R5 answerConstraint); for those the Java error count cannot
32-
* match ours. Triage (M12.1) classified the 78 eligible R4 cases as:
33-
* - 48 "meaningful": error-presence matches Java, or we flag the answer-type mismatch as a
34-
* warning — these are SEEDED here and asserted.
35-
* - 30 "out-of-scope": Java errors on a rule we do not implement — left markTestIncomplete
36-
* (visible, not silently green) and recorded in the plan backlog.
28+
* Why seeded (not Java-parity) outcomes: the validator's error/warning verdict does not always
29+
* match the HL7 Java validator's — answer-type mismatches are reported at `warning` rather than
30+
* `error` by design, and a few SDC/R5 rules remain uncovered (SDC `answerExpression`,
31+
* `calculatedExpression`, R5 `answerConstraint`). Seeding pins each case to the validator's own
32+
* correct output instead. All 78 eligible R4 cases are now seeded and asserted (156 assertions);
33+
* none are left markTestIncomplete or skipped.
3734
*
3835
* Seeded outcomes capture the validator's CURRENT correct output, so this suite is a
39-
* regression guard. For the 48 seeded cases triage confirmed zero gaps (our error count never
40-
* exceeds Java's). Any future divergence that IS a known bug must be registered in KNOWN_GAPS.
36+
* regression guard. Triage confirmed zero gaps (our error count never exceeds Java's). Any
37+
* future divergence that IS a known bug must be registered in KNOWN_GAPS.
4138
*/
4239
#[CoversClass(FHIRQuestionnaireValidator::class)]
4340
final class FHIRQuestionnaireConformanceTest extends TestCase

0 commit comments

Comments
 (0)