Modifier rules editing and simulation
Outcome
Modifier injection rules are added/edited with a deterministic precedence; the simulator confirms behavior before the rule is exposed to real claims.
Prerequisites
config.updatefor injection rules.rules.updatefor modifier_validation YAML rule sets.
Three sibling tabs at /admin/modifiers/
| Tab | What it owns | Where mutations happen |
|---|---|---|
Injection (/injection) | rcm_reference.modifier_injection_rule (master) | Here. Saved rules take effect on the next charge — no deploy required. |
Validation (/validation) | Read-mostly listing of PRE_SUBMIT_VALIDATE rule sets containing modifier_validation rules | Here for browsing; Edit in advanced editor deep-links to UI-01 (Publish rule changes). |
Simulator (/simulate) | Hypothetical charge → which injection + validation rules fire | Read-only — no DB writes |
Common flow A — add a state-scoped credential modifier
Open
/admin/modifiers/injection.Filter
state=OH,triggerType=CREDENTIALto confirm no overlap.Click New rule. Fill: procedure
H0004, stateOH, payer blank, triggerCREDENTIAL/ valueRBT, modifierHO, sequence 1, effective-from today.Create rule. The 400 response from
POST /api/v1/admin/modifiers/injectionwill surfaceUnknown modifier code: <code>if the modifier isn't inrcm_reference.code_set_modifier— fix or add to the catalogue first.Switch to the Simulator tab. Enter procedure
H0004, credentialRBT, stateOH, today as service date — the rule should appear under "Modifiers that would be auto-added".
Common flow B — validate a modifier_validation rule before publishing
In UI-01 (
/admin/rules/CHARGE_VALIDATE) draft your edit and publish it (DRAFT → IN_REVIEW → APPROVED → PUBLISHED). See Publish rule changes.Open
/admin/modifiers/validation. Confirm your rule appears in the target rule set's card list with the expected requireOneOf / requireAll / prohibit summary.Open
/admin/modifiers/simulate. Enter a charge that should fail the rule (e.g., procedure with no required modifier) — confirm the BLOCK appears with your rule id + message.Repeat with a passing charge — confirm the rule is absent from the firing list.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
400 Unknown modifier code: HO from create | Modifier not in rcm_reference.code_set_modifier | Add the row to code_set_modifier first. |
400 effectiveTo must be on or after effectiveFrom | Date math reversed | Fix dates; same-day expiry is rejected. |
| Simulator shows no validation firings | Rule set not PUBLISHED, or scope mismatch (config_scope.state ≠ requested state) | Confirm via /admin/rules/CHARGE_VALIDATE/<setId> — version is PUBLISHED with the right state scope. |
| Simulator skips the rule despite a PUBLISHED version | YAML rule's kind missing/typo'd (must be exactly modifier_validation) | Fix in UI-01's editor. |
Boundaries
- Simulator evaluates only modifiers that are explicitly provided in the input. It does not pre-apply auto-injected modifiers before validation — mirrors the scrubber, which evaluates against modifiers already persisted on the line. To preview combined behaviour, list the auto-injection rules you expect, add their modifiers to the simulator's Modifier codes chip list, re-simulate.
- Validation half loads PUBLISHED
PRE_SUBMIT_VALIDATErule sets whoseconfig_scope.stateis null or matches the simulator's state input — payer/program scope filtering is intentionally permissive here ("would this fire if it matched?"). For exact production scoping, run a dry-run scrub via the rules-engine resolve preview at/admin/rulesinstead.
Validation
| Check | Expected |
|---|---|
| New injection rule | Active row in modifier_injection_rule; simulator shows it firing |
| Validation rule via UI-01 | PUBLISHED; visible in /validation; fires in simulator |
Cross-references
- Publish rule changes for the YAML side.
- Payer-scoped modifier overrides for precedence semantics.