Skip to main content

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.update for injection rules.
  • rules.update for modifier_validation YAML rule sets.

Three sibling tabs at /admin/modifiers/

TabWhat it ownsWhere 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 rulesHere for browsing; Edit in advanced editor deep-links to UI-01 (Publish rule changes).
Simulator (/simulate)Hypothetical charge → which injection + validation rules fireRead-only — no DB writes

Common flow A — add a state-scoped credential modifier

  1. Open /admin/modifiers/injection.

  2. Filter state=OH, triggerType=CREDENTIAL to confirm no overlap.

  3. Click New rule. Fill: procedure H0004, state OH, payer blank, trigger CREDENTIAL / value RBT, modifier HO, sequence 1, effective-from today.

  4. Create rule. The 400 response from POST /api/v1/admin/modifiers/injection will surface Unknown modifier code: <code> if the modifier isn't in rcm_reference.code_set_modifier — fix or add to the catalogue first.

  5. Switch to the Simulator tab. Enter procedure H0004, credential RBT, state OH, 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

  1. In UI-01 (/admin/rules/CHARGE_VALIDATE) draft your edit and publish it (DRAFT → IN_REVIEW → APPROVED → PUBLISHED). See Publish rule changes.

  2. Open /admin/modifiers/validation. Confirm your rule appears in the target rule set's card list with the expected requireOneOf / requireAll / prohibit summary.

  3. 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.

  4. Repeat with a passing charge — confirm the rule is absent from the firing list.

Common errors

SymptomCauseFix
400 Unknown modifier code: HO from createModifier not in rcm_reference.code_set_modifierAdd the row to code_set_modifier first.
400 effectiveTo must be on or after effectiveFromDate math reversedFix dates; same-day expiry is rejected.
Simulator shows no validation firingsRule 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 versionYAML 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_VALIDATE rule sets whose config_scope.state is 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/rules instead.

Validation

CheckExpected
New injection ruleActive row in modifier_injection_rule; simulator shows it firing
Validation rule via UI-01PUBLISHED; visible in /validation; fires in simulator

Cross-references

Next

4.8 — State configuration navigator