Version: 1.0.0Documentation Index
Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
Use this file to discover all available pages before exploring further.
Last Updated: 2026-02-23
Spec: PM-15 Clearinghouse Integration
Overview
The Clearinghouse module enables your organization to connect to ANSI X12 clearinghouses for electronic claims submission (837P/I), remittance retrieval (835), eligibility verification (270/271), claim status inquiries (276/277), and prior authorization requests (278). Phase 1 provides configuration management, batch tracking, transaction logging, and payer enrollment. Actual clearinghouse transport (Waystar REST/SFTP) is planned for Phase 2.Prerequisites
- Organization Admin or Billing Manager role with
pm.clearinghouse.adminpermission - Active payer records in PM-02 (Insurance & Eligibility)
- Clearinghouse vendor contract (e.g., Waystar) with credentials
1. Configuring a Clearinghouse Connection
Navigate
Practice Management → Clearinghouse → ConfigurationsAdd New Configuration
- Click Add Configuration
-
Fill required fields:
- Clearinghouse Name — Display name (e.g., “Waystar Production”)
- Provider — Select from supported providers (currently: Waystar)
- Connection Type —
APIorSFTP - Sender ID — Your organization’s sender identifier
- Receiver ID — Clearinghouse receiver identifier
-
For API connections:
- API Endpoint — Full URL provided by clearinghouse
- Credentials Vault Ref — Vault reference for API key/token (e.g.,
vault://waystar/api-key)
-
For SFTP connections:
- Host — SFTP server hostname
- Port — SFTP port (default: 22)
- Submission Path — Remote directory for outbound files
- Retrieval Path — Remote directory for inbound files (835s)
- Username Vault Ref — Vault reference for SFTP username
- Credentials Vault Ref — Vault reference for SFTP password/key
- Click Save
Vault References
Credentials are never stored in the database. Instead, the configuration stores a vault reference string that is resolved at runtime by the edge function. Format:vault://{provider}/{key-name}
Examples:
vault://waystar/api-key— Waystar API keyvault://waystar/sftp-password— Waystar SFTP password
2. Payer Enrollment
Before submitting claims through a clearinghouse, each payer must be enrolled.Navigate
Practice Management → Clearinghouse → EnrollmentsAdd Enrollment
- Click Add Enrollment
- Select:
- Clearinghouse — The configuration to enroll with
- Payer — The insurance payer
- Transaction Types — Which X12 transactions are enabled (837P, 837I, 835, 270/271, etc.)
- Set Enrollment Status (pending, active, suspended, terminated)
- Fill optional dates: Enrolled Date, Effective Date, Termination Date
- Click Save
Enrollment Statuses
| Status | Description |
|---|---|
pending | Application submitted to clearinghouse |
active | Enrolled and ready for transactions |
suspended | Temporarily disabled |
terminated | No longer enrolled |
3. Transaction Batches
Batches group related X12 transactions for submission or retrieval.Navigate
Practice Management → Clearinghouse → BatchesBatch Lifecycle
| Status | Description |
|---|---|
pending | Batch created, awaiting submission |
submitted | Sent to clearinghouse |
accepted | Acknowledged by clearinghouse (999) |
rejected | Rejected by clearinghouse (999/277CA) |
processed | Fully processed (835 posted, etc.) |
error | System error during processing |
Viewing Batch Details
Click any batch row to see:- Transaction type, direction, record count
- Submission timestamp and response data
- Error details (if rejected)
- File name and size
4. Transaction Log
The transaction log is an append-only audit trail of all clearinghouse interactions.Navigate
Practice Management → Clearinghouse → TransactionsKey Fields
- Trace Number — Unique identifier for tracking
- Transaction Type — X12 type (837P, 835, etc.)
- Direction — Inbound or outbound
- Status — Current processing status
- Claim ID — Associated claim (if applicable)
5. Security Considerations
Credential Storage
- All credentials use vault references — never stored in the database
- Edge functions resolve vault refs at runtime
- Rotate credentials regularly through your vault provider
Audit Trail
- All configuration changes are tracked via
created_by/updated_by - Transaction log is immutable (append-only, no UPDATE/DELETE)
- Batch status changes are timestamped
PHI Protection
- X12 transactions contain PHI (patient demographics, diagnoses)
- All transport uses TLS encryption
- Log entries do not store claim content — only trace numbers and status
Multi-Tenant Isolation
- All clearinghouse data is scoped by
organization_id - Row-Level Security (RLS) with
FORCEprevents cross-tenant access - DELETE operations restricted to
org_adminrole
6. Troubleshooting
Common Issues
| Issue | Solution |
|---|---|
| ”Configuration validation failed” | Check that all required fields are filled for your connection type |
| Batch stuck in “submitted” | Phase 1 stub — no transport yet. Will resolve in Phase 2 |
| Cannot delete configuration | Only org_admin can delete. Check your role assignment |
| Enrollment not showing payer | Ensure the payer exists in PM-02 with an active status |
Edge Function Logs
Check theclearinghouse-batch-submit function logs:
Supabase Dashboard → Edge Functions → clearinghouse-batch-submit → Logs
7. Phase 2 Roadmap
Phase 2 will implement:- Live Waystar REST API connectivity
- SFTP file transfer for 837P/I submission and 835 retrieval
- Real-time eligibility checks (270/271)
- Claim status inquiries (276/277)
- Prior authorization requests (278)
- Automated ERA processing and payment posting