RCMbox Docs

evaluate-validation-rules

Pure evaluation activity. Reads a YAML manifest of TypeScript validation rules, runs each rule against the BillingCaseContext, and returns BillingTask resources for failed rules. Does not persist anything — use fhir/transaction downstream to save tasks.

Script path: @aidbox-billing/billing-case/evaluate-validation-rules

Input

ParameterTypeDescription
contextBillingCaseContextBilling case context to validate
manifestPathstringPath to the manifest YAML, relative to WORKFLOW_DIR
categorystring (optional)Filter rules by this category value
ruleParamsobject (optional)Extra data passed to every rule's main function

Output

FieldTypeDescription
taskBundleBundleFHIR transaction bundle with BillingTask POST entries for failed rules
assignedDashboardstringDashboard from the highest-priority failed rule (or undefined if all passed)
assignedWorkliststringWorklist from the highest-priority failed rule (or undefined if all passed)
passedbooleantrue if zero error-severity rules failed
summaryobject{ total, passed, failed, warnings } counts

Usage in workflow YAML

- id: evaluate-rules
  name: Evaluate Validation Rules
  script: "@aidbox-billing/billing-case/evaluate-validation-rules"
  params:
    context: $activities.build-draft-claim.output.context
    manifestPath: validation-rules/manifest.yaml
  children: [assert-no-errors]

What counts as a pass

passed is true when no rules with severity: error failed. Rules with severity: warning or severity: information do not affect passed.

Manifest path

The manifestPath is resolved relative to the config project's WORKFLOW_DIR. The standard path is validation-rules/manifest.yaml.

See also

Last updated: