Care Management Billing Engine — Admin Guide
Configuration (pm_module_settings)
All PM-75 settings are stored per-organization inpm_module_settings:
Enabling Auto-Post
Auto-post is OFF by default (kill switch = true). To enable auto-posting for your organization: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 explicitpm_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 inpm_care_mgmt_staff_qualifications:
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 masterpm_payer_care_mgmt_policies(orpm_payer_policies) — per-payer coverage rules for care-mgmt codes
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
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)
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 thepm_75_void_care_mgmt_charge RPC (accessible to authenticated and service_role):
- Sets
pm_care_mgmt_billing_periods.gate_status = 'void' - Sets
pm_charges.status = 'void'for the linked charge - Inserts a void audit row
Security Notes
pm_75_record_evaluationandpm_75_void_care_mgmt_chargeare SECURITY DEFINER, REVOKE from PUBLIC and anon. Onlyauthenticatedandservice_rolecan execute them.- All five PM-75 tables have RLS enabled with
pm_has_org_accessandpf_is_org_adminguards. - The org-guard in
pm_75_record_evaluationraisesinsufficient_privilegeifp_organization_iddoes not match the enrollment’s org.