Spec: PM-30Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Status: ✅ Implemented
Last Updated: 2026-03-27 Integration Type: Data (same-core PM dependencies)
Owner: PM Core
Overview
PM-30 adds COB priority order management, secondary/tertiary claim generation from primary ERA adjudication data, Medicare–AHCCCS dual-eligible crossover routing, and secondary ERA posting. All dependencies are within the PM core (same-core data access); no cross-core imports are introduced.Integration Points
PM-01 — Patient Registration & Demographics
- Type: Data (same-core)
- Usage: Patient identity and insurance policy records. PM-30 reads
pm_insurance_policies(with newpriority_ordercolumn) andpm_patients(with newdual_eligiblecolumn). PM-30 does not write to PM-01-owned tables except via extension columns added by PM-30’s own migration. - Data Flow: PM-30 reads → PM-01 data; PM-01 does not consume PM-30 data directly.
PM-02 — Insurance & Eligibility Verification
- Type: Data (same-core) / UI trigger
- Usage: When
cob_order_change_triggers_reverificationis enabled in pm_module_settings, changing priority_order on a policy prompts staff to re-run PM-02 eligibility verification for the affected policy. PM-30 does not call PM-02 directly; it surfaces a prompt that directs staff to the PM-02 eligibility workflow for the policy. - Data Flow: PM-30 → user prompt → PM-02 eligibility UI (no direct function call).
PM-07 — Charge Capture & Fee Schedules
- Type: Data (same-core, read)
- Usage: Secondary claim lines reference the same charge items as the primary claim. PM-30 reads charge data from PM-07 tables to populate secondary claim lines; amounts are overridden by primary EOB adjudication data (paid amount, CARC/RARC adjustments, patient responsibility).
- Data Flow: PM-30 reads pm_charges → populates pm_secondary_claims lines.
PM-08 — Claims Management & Submission
- Type: Data (same-core)
- Usage: Secondary and tertiary claims are rows in
pm_claims(withcob_sequenceandfrequency_type_codeindicating secondary/tertiary). PM-30 creates pm_claims rows for secondary/tertiary claims and links them via pm_secondary_claims. PM-08 claim status lifecycle (draft → submitted → paid/denied) applies to secondary claims. PM-08 claim scrubbing (PM-18) applies to secondary claims. - Data Flow: PM-30 inserts → pm_claims (secondary row) + pm_secondary_claims (link record).
PM-09 — Payment Posting & ERA Processing
- Type: Data (same-core) / trigger
- Usage: Primary ERA posted by PM-09 is the trigger for secondary claim generation (auto or manual). PM-09 provides primary payment data (paid amount, CARC/RARC adjustments, patient responsibility) used to populate X12 COB2300/COB2400 loops in the secondary 837. Secondary ERA is posted by PM-09 to the secondary claim row; patient responsibility and patient balance are updated accordingly.
- Data Flow: PM-09 (primary ERA) → trigger → PM-30 secondary claim creation; PM-09 (secondary ERA) → updates pm_secondary_claims status + pm_claims balance.
PM-15 — Clearinghouse Integration
- Type: Data (same-core)
- Usage: Secondary and tertiary 837P/837I claims with COB segments are submitted via PM-15. PM-15 handles 837 batch assembly and submission to the clearinghouse. PM-30 produces the claim record; PM-15 transmits it.
- Data Flow: PM-30 creates pm_claims (secondary) → PM-15 batches and submits 837 with COB segments.
PM-16 — Patient Statement Generation & Billing Communications
- Type: Data (same-core, downstream)
- Usage: After secondary/tertiary ERA is posted, updated patient responsibility and patient balance feed PM-16 for patient statement generation. PM-16 reads the updated balance from PM-09/PM-30’s posting workflow; PM-30 does not call PM-16 directly.
- Data Flow: PM-30 (via PM-09 ERA posting) updates patient balance → PM-16 reads updated balance for statements.
Events Published
PM-30 does not publish cross-core events at MVP. Secondary claim status changes are internal to PM. Future enhancement: publishpm_secondary_claim_submitted and pm_secondary_claim_adjudicated events (consumed by PM-11 RCM dashboards and optionally FA for GL write-off).
Events Consumed
PM-30 does not formally subscribe to cross-core events. Thecob_secondary_claim_auto_trigger path responds to PM-09 ERA posting (same-core data; not a cross-core event contract).
API Contracts
No cross-core API contracts for PM-30. All integrations are same-core data access. PM-15 clearinghouse API handles external 837 submission.Platform Integration Layer Usage
- PF-01 (Organizations / Sites): organization_id tenant isolation on all PM-30 tables.
- PF-30 (RBAC): Permission keys
pm.cob.viewandpm.cob.manageenforced viauseHasPermissionand RLS.
Pending Contracts
| Item | Status | Notes |
|---|---|---|
pm_secondary_claim_submitted event | 📝 Deferred | Future enhancement: PM-11 RCM dashboards; FA GL write-off |
pm_secondary_claim_adjudicated event | 📝 Deferred | Future enhancement: same as above |
Security
- All pm_secondary_claims access is scoped by
organization_idviapm_has_org_accessSECURITY DEFINER function. - COB data (payer names, claim amounts, patient IDs) is PHI; no PHI in logs or AI prompts.
- UPDATE RLS policy includes
WITH CHECKto preventorganization_idmodification.