Component
Validation
FHIR Version
R4, R4B, R5 (all versions)
Problem Statement
FHIRValidationService::collectObligationViolations() silently skips all #[FHIRObligation] instances where $obligation->filter !== null. Conditional obligations (e.g. "populate this field only if another field has value X") are never evaluated.
if ($obligation->filter !== null) {
continue; // FHIRPath filter evaluation deferred to backlog
}
Proposed Solution
Use the existing FHIRPathService to evaluate $obligation->filter against the resource instance. Only apply the obligation if the filter evaluates to true. If evaluation throws, emit a distinct INFO violation ("filter indeterminate") matching the approach proposed for invariant eval errors.
Additional Context
The FHIRObligation attribute already carries the filter property; only the runtime evaluation step is missing.
Component
Validation
FHIR Version
R4, R4B, R5 (all versions)
Problem Statement
FHIRValidationService::collectObligationViolations()silently skips all#[FHIRObligation]instances where$obligation->filter !== null. Conditional obligations (e.g. "populate this field only if another field has value X") are never evaluated.Proposed Solution
Use the existing
FHIRPathServiceto evaluate$obligation->filteragainst the resource instance. Only apply the obligation if the filter evaluates totrue. If evaluation throws, emit a distinct INFO violation ("filter indeterminate") matching the approach proposed for invariant eval errors.Additional Context
The
FHIRObligationattribute already carries thefilterproperty; only the runtime evaluation step is missing.