Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Spec: PM-50
Created: 2026-04-07
Status: 📝 Planned

Overview

PM-50 provides ML-based claim denial prediction as a pre-submission advisory layer. It integrates into the PM-08 claim submission queue, complements PM-18 rule-based scrubbing, reads documentation completeness metadata from CL-36 via Platform Integration Layer, and uses PF-96 jurisdiction profiles for payer/state-specific context.

Integration Points

Platform Foundation Dependencies

PF FeatureIntegration TypeUsage
PF-01 (Organizations & Sites)Direct dependencyTenant isolation, site-scoped predictions
PF-02 (RBAC)Direct dependencyPermission checks for billing specialist and revenue cycle director roles
PF-10 (Notifications)Platform Integration LayerSend documentation request notifications to clinical team
PF-96 (Jurisdiction Profiles)Platform Integration LayerRead payer/state-specific parameters (filing deadlines, modifier conventions)

Same-Core Dependencies

PM FeatureIntegration TypeUsage
PM-08 (Claims Management)Shared UI surfaceRisk scores displayed in claim submission queue; scoring triggered on claim queue entry
PM-18 (Claim Scrubbing)Sequential pipelinePM-18 scrubbing runs first (rule-based), PM-50 adds ML-based prediction after
PM-29 (Denial Management)Data feedbackPM-29 denial outcomes feed PM-50 retraining pipeline (actual_outcome field)

Cross-Core Dependencies

FeatureIntegration TypeUsage
CL-36 (Clinical Documentation)Platform Integration Layer (@/platform/clinical)Read documentation completeness metadata (note section count, word count, required section presence, diagnosis specificity); no PHI content crosses into PM-50

Events Published

Event NamePublisherSubscribersStatus
pm.denial_prediction.createdPM-50None (available for GR dashboards)📝 Planned
pm.denial_prediction.outcome_recordedPM-50None (available for analytics)📝 Planned

Event Payload Schemas

pm.denial_prediction.created:
{
  prediction_id: string;
  claim_id: string;
  risk_level: 'low' | 'medium' | 'high';
  organization_id: string;
}
pm.denial_prediction.outcome_recorded:
{
  prediction_id: string;
  claim_id: string;
  actual_outcome: 'paid' | 'denied';
  organization_id: string;
}

Edge Functions

FunctionPurposeAuth
predict-denial-riskReceive claim features, return risk score + reasons + actionsverifyOrgAccess()
retrain-denial-modelCron-triggered monthly retraining using historical outcomesService role (cron)
denial-prediction-metricsReturn aggregated model performance metrics for dashboardverifyOrgAccess()

Platform Integration Layer Usage

  • @/platform/notifications — Send documentation request to clinical team (FR-3.2)
  • @/platform/clinical — Read documentation completeness metadata from CL-36 (FR-3.1); PM-50 implements stub/adapter returning null signals when CL-36 unavailable

Data Flow

PM-08 (Claim enters queue) → PM-18 (Rule-based scrub) → PM-50 (ML prediction)

                                                    Risk Score + Actions

                                                    Biller Review (UI)
                                                    ├─ Acknowledge → Submit
                                                    ├─ Hold → Investigate
                                                    ├─ Correct → Re-queue
                                                    └─ Override → Submit with reason

Security Boundaries

  • No PHI crosses into PM-50 — only categorical/aggregate features and completeness metadata
  • All prediction data scoped to organization via RLS with SECURITY DEFINER helper
  • Model training data never crosses organization boundaries
  • Edge functions validate org access via verifyOrgAccess() from _shared/auth.ts

References

  • Spec: specs/pm/specs/PM-50-ai-denial-prediction-prevention.md
  • Related: PM-08, PM-18, PM-29, PM-49, CL-36, PF-96
  • Events: docs/architecture/integrations/EVENT_CONTRACTS.md
  • Platform layers: docs/architecture/integrations/PLATFORM_INTEGRATION_LAYERS.md