Skip to main content

Care Management Billing Engine — Admin Guide

Configuration (pm_module_settings)

All PM-75 settings are stored per-organization in pm_module_settings:

Enabling Auto-Post

Auto-post is OFF by default (kill switch = true). To enable auto-posting for your organization:
When enabled, a charge is automatically created in pm_charges for each gate-pass evaluation. When disabled (kill switch ON), gate-pass evaluations appear on the manual review worklist.

Credential Gate Mode

Strict (default): Staff must have an explicit pm_care_mgmt_staff_qualifications record with qualified = true before they can log time against a CoCM / BHI / CCM / PCM enrollment. Permissive: No credential record required. Staff can log time for any program. Use only during go-live onboarding. To switch to permissive mode:

Staff Credential Management

In strict mode, credentials are managed in pm_care_mgmt_staff_qualifications:
The pm_75_staff_qualified_for_code_family RPC evaluates credentials at billing time and returns {qualified: bool, reason: text}.

Payer Policy Configuration

Payer policies (covered codes, modifiers, override rules) are configured in:
  • pm_payers — payer master
  • pm_payer_care_mgmt_policies (or pm_payer_policies) — per-payer coverage rules for care-mgmt codes
The billing engine reads payer policy at evaluation time and includes it in the rule snapshot stored in the gate audit log. Important (A-5 OPEN): CMS default thresholds (CPT 99490/99491/99492/99493 time requirements) require human verification against the current CMS fee schedule before enabling auto-post in production. See PM-75 Compliance Signoff item C-1.

CoCM Registry Integration (SC-003)

For CoCM billing, the engine enforces that the patient has an active enrollment in the CL-54-EN-01 psychiatric registry (pm_75_record_evaluation with p_gate_status = 'denied' and p_gate_failure_reason = 'registry_membership_missing' when the registry is unavailable). When the registry is unavailable (degradation mode):
  • Gate status = denied, failure reason = registry_membership_missing
  • Charge is NOT auto-posted (SC-003 compliance)
  • Evaluation appears on the manual worklist with reason displayed
  • Registry unavailability is captured in the rule snapshot for audit
Resolution: Ensure the patient is enrolled in the CL-54-EN-01 registry before billing CoCM codes.

Audit Log

pm_care_mgmt_gate_audit is INSERT-ONLY (RLS policy USING(false) for UPDATE/DELETE). Every evaluation writes a row containing:
  • verdict (pass / fail / void)
  • reason (denial reason string)
  • rule_snapshot (JSONB: code_family_rules + payer_policy + credentials_check + registry_check)
  • created_at (immutable timestamp)
The SC-002 invariant holds: every pm_charges row with source = 'pm75_care_mgmt' in custom_fields must have a matching gate-pass audit row. The integration test SC-002 proof enforces this.

Voiding a Charge

Use the pm_75_void_care_mgmt_charge RPC (accessible to authenticated and service_role):
This atomically:
  1. Sets pm_care_mgmt_billing_periods.gate_status = 'void'
  2. Sets pm_charges.status = 'void' for the linked charge
  3. Inserts a void audit row

Security Notes

  • pm_75_record_evaluation and pm_75_void_care_mgmt_charge are SECURITY DEFINER, REVOKE from PUBLIC and anon. Only authenticated and service_role can execute them.
  • All five PM-75 tables have RLS enabled with pm_has_org_access and pf_is_org_admin guards.
  • The org-guard in pm_75_record_evaluation raises insufficient_privilege if p_organization_id does not match the enrollment’s org.