Skip to content

Add pre-evaluation validation framework for Measure operations (DQM-570)#1010

Draft
lukedegruchy wants to merge 2 commits into
mainfrom
ld-20260424-enhance-measure-validation
Draft

Add pre-evaluation validation framework for Measure operations (DQM-570)#1010
lukedegruchy wants to merge 2 commits into
mainfrom
ld-20260424-enhance-measure-validation

Conversation

@lukedegruchy
Copy link
Copy Markdown
Contributor

Validate prerequisites (library resolution, ValueSet availability, parameter configuration, expression references) before CQL evaluation begins. Validation runs after MeasureDef construction but before engine setup, avoiding wasted compute and providing structured, actionable error feedback with machine-readable codes and remediation guidance.

New domain core (common/):

  • ValidationSeverity, ValidationIssue, ValidationResult model
  • MeasureDefValidator strategy interface + CompositeMeasureDefValidator
  • MeasureDefValidationContext record, MeasureValidationException
  • ParameterConfigurationValidator base class

New R4 validators:

  • R4CqlLibraryValidator: LIBRARY_NOT_FOUND (ERROR)
  • R4ValueSetAvailabilityValidator: VALUESET_UNAVAILABLE (WARNING)
  • R4ParameterConfigurationValidator: MISSING_REQUIRED_PARAMETER (ERROR), UNKNOWN_PARAMETER (WARNING)
  • R4ExpressionReferenceValidator: EXPRESSION_NOT_FOUND (WARNING)

Validation issues surface as contained OperationOutcome resources in MeasureReport with appropriate severity, IssueType, and error codes.

lukedegruchy and others added 2 commits April 24, 2026 17:32
Validate prerequisites (library resolution, ValueSet availability,
parameter configuration, expression references) before CQL evaluation
begins. Validation runs after MeasureDef construction but before engine
setup, avoiding wasted compute and providing structured, actionable
error feedback with machine-readable codes and remediation guidance.

New domain core (common/):
- ValidationSeverity, ValidationIssue, ValidationResult model
- MeasureDefValidator strategy interface + CompositeMeasureDefValidator
- MeasureDefValidationContext record, MeasureValidationException
- ParameterConfigurationValidator base class

New R4 validators:
- R4CqlLibraryValidator: LIBRARY_NOT_FOUND (ERROR)
- R4ValueSetAvailabilityValidator: VALUESET_UNAVAILABLE (WARNING)
- R4ParameterConfigurationValidator: MISSING_REQUIRED_PARAMETER (ERROR),
  UNKNOWN_PARAMETER (WARNING)
- R4ExpressionReferenceValidator: EXPRESSION_NOT_FOUND (WARNING)

Validation issues surface as contained OperationOutcome resources in
MeasureReport with appropriate severity, IssueType, and error codes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Formatting check succeeded!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant