Dev Reference

Eligibility

Insurance coverage verification, real-time eligibility checks (X12 270/271 and FHIR), benefit parsing, and prior-authorization workflow (X12 278 / DaVinci PAS).

Data Classification: All 5 entities are org-scoped. Partition key: OrganizationID. Coverage and EligibilityCheck carry a PatientID global FK. Trust tiers: InsurancePlan = T1, Coverage = T1/T2, EligibilityCheck = T2, BenefitDetail = T2, PriorAuth = T2. See Data Model for ownership conventions.

InsurancePlan P0 — Trust Tier T1

A payer + plan combination representing a specific insurance product. Tracks X12/FHIR capability flags and CMS-0057-F impact status.

Schema

FieldTypeRequiredPKFKNotes
InsurancePlanIDUUIDYesYes
PayerNameString(100)Yes
PayerIDString(50)YesX12 payer ID
PlanNameString(100)Yes
PlanTypeString(50)YesHMO | PPO | EPO | POS | HDHP | Medicare | Medicaid | Tricare | VA | WC
LineOfBusinessString(50)YesCommercial | MedicareAdvantage | MedicareFFS | MedicaidMCO | MedicaidFFS | FFE | WC
IsCMS0057FImpactedBoolYesSubject to CMS-0057-F prior-auth rules
SupportsX12278BoolYes
SupportsDaVinciPasBoolYesFHIR DaVinci PAS capability
IsActiveBoolYes
OrganizationIDUUIDYesOrganizationPartition key
CreatedByUserIDUUIDYesUserAudit
CreatedDateTimeUTCDateTimeUTCYesAudit
UpdatedByUserIDUUIDYesUserAudit
UpdatedDateTimeUTCDateTimeUTCYesAudit
IsDeletedBoolYesSoft-delete

RBAC

Role (Tier)Access
Patient (10)Read own plan name/type
FrontDesk (30)Read
MA / RN (40)Read
Biller (51)Read & write
Clinician (60)Read
PracticeMgr (70)Read & write
EditAMI (90+)Schema management

Coverage P0 — Trust Tier T1/T2

Links a patient to an insurance plan with subscriber details. Supports primary/secondary/tertiary ranking.

Schema

FieldTypeRequiredPKFKNotes
CoverageIDUUIDYesYes
PatientIDUUIDYesPatient (global FK)
InsurancePlanIDUUIDYesInsurancePlan
SubscriberIDString(50)YesMember/subscriber number
SubscriberFirstNameString(100)Yes
SubscriberLastNameString(100)Yes
SubscriberDateOfBirthDateTimeUTCYes
RelationshipToSubscriberString(50)Yesself | spouse | child | other
GroupNumberString(50)No
RankIntYes1 = primary, 2 = secondary, 3 = tertiary
EffectiveDateDateTimeUTCYes
TerminationDateDateTimeUTCNoNull = open-ended
IsActiveBoolYes
OrganizationIDUUIDYesOrganizationPartition key
CreatedByUserIDUUIDYesUserAudit
CreatedDateTimeUTCDateTimeUTCYesAudit
UpdatedByUserIDUUIDYesUserAudit
UpdatedDateTimeUTCDateTimeUTCYesAudit
IsDeletedBoolYesSoft-delete

RBAC

Role (Tier)Access
Patient (10)Read own coverage
FrontDesk (30)Read & write
MA / RN (40)Read
Biller (51)Read & write
Clinician (60)Read
PracticeMgr (70)Read & write
EditAMI (90+)Schema management

EligibilityCheck P0 — Trust Tier T2

A point-in-time eligibility verification against a payer. Supports X12 270/271 and FHIR CoverageEligibilityRequest/Response. Raw request/response payloads are encrypted at rest.

Schema

FieldTypeRequiredPKFKNotes
EligibilityCheckIDUUIDYesYes
PatientIDUUIDYesPatient (global FK)
CoverageIDUUIDYesCoverage
TransactionTypeString(50)YesX12_270_271 | FHIR_COVERAGE_ELIGIBILITY
TriggerString(50)YesBooking | T-24h | CheckIn | Manual
RequestSentDateTimeUTCYes
ResponseReceivedDateTimeUTCNoNull while pending
ResponseLatencyMillisecondsIntNoComputed on response receipt
StatusString(50)YesActive | Inactive | Pending | Error | Unknown
ClearinghouseString(50)YesStedi | Availity | Waystar
TransactionTraceNumberString(50)NoX12 TRN segment
ErrorCodeString(50)No
ErrorDescriptionString(200)No
RawRequestText (encrypted)YesAES-256 at rest
RawResponseText (encrypted)NoAES-256 at rest
OrganizationIDUUIDYesOrganizationPartition key
CreatedByUserIDUUIDYesUserAudit
CreatedDateTimeUTCDateTimeUTCYesAudit
UpdatedByUserIDUUIDYesUserAudit
UpdatedDateTimeUTCDateTimeUTCYesAudit
IsDeletedBoolYesSoft-delete

RBAC

Role (Tier)Access
Patient (10)Read own status only (no raw payloads)
FrontDesk (30)Trigger check & read parsed results
MA / RN (40)Read
Biller (51)Read parsed results
Clinician (60)Read
PracticeMgr (70)Read raw payloads
EditAMI (90+)Schema management

BenefitDetail P0 — Trust Tier T2

Parsed benefit information from an eligibility response. Includes copay, coinsurance, deductible, and out-of-pocket amounts per service category.

Schema

FieldTypeRequiredPKFKNotes
BenefitDetailIDUUIDYesYes
EligibilityCheckIDUUIDYesEligibilityCheck
ServiceCategoryString(50)YesX12 EB04 service type code
CoverageLevelString(50)YesIndividual | Family
InNetworkBoolYes
CopayAmountMoneyNo
CopayCurrencyCodeString(3)NoISO 4217
CoinsurancePercentDecimalNo0.00 - 1.00
DeductibleAmountMoneyNo
DeductibleCurrencyCodeString(3)NoISO 4217
DeductibleRemainingAmountMoneyNo
DeductibleRemainingCurrencyCodeString(3)NoISO 4217
OutOfPocketMaxAmountMoneyNo
OutOfPocketMaxCurrencyCodeString(3)NoISO 4217
OutOfPocketRemainingAmountMoneyNo
OutOfPocketRemainingCurrencyCodeString(3)NoISO 4217
RequiresReferralBoolNo
RequiresPriorAuthBoolNo
BenefitNotesString(500)No
OrganizationIDUUIDYesOrganizationPartition key
CreatedByUserIDUUIDYesUserAudit
CreatedDateTimeUTCDateTimeUTCYesAudit
UpdatedByUserIDUUIDYesUserAudit
UpdatedDateTimeUTCDateTimeUTCYesAudit
IsDeletedBoolYesSoft-delete

RBAC

Role (Tier)Access
Patient (10)Read own benefit summary
FrontDesk (30)Read
MA / RN (40)Read
Biller (51)Read
Clinician (60)Read
PracticeMgr (70)Read
EditAMI (90+)Schema management

PriorAuth P0 — Trust Tier T2

Prior-authorization request lifecycle. Supports X12 278, FHIR DaVinci PAS, fax, and portal submission methods. Compliant with CMS-0057-F expedited (72h) and standard (7d) decision deadlines.

Schema

FieldTypeRequiredPKFKNotes
PriorAuthIDUUIDYesYes
PatientIDUUIDYesPatient (global FK)
CoverageIDUUIDYesCoverage
OrderingProviderIDUUIDYesProvider
EncounterIDUUIDNoEncounterFrom Clinical Doc module
ServiceCodeString(50)YesCPT or HCPCS code
DiagnosisCodeString(50)YesICD-10-CM
SubmissionMethodString(50)YesX12_278 | FHIR_DAVINCI_PAS | Fax | Portal
SubmissionPriorityString(50)YesStandard | Expedited (per CMS-0057-F)
SubmittedDateTimeUTCYes
DecisionDeadlineDateTimeUTCYes72h for expedited, 7d for standard
DecisionDateTimeUTCNo
DecisionStatusString(50)YesPending | Approved | Denied | Pended | Cancelled
AuthNumberString(50)NoAssigned on approval
ApprovedUnitsIntNo
ApprovedFromDateTimeUTCNo
ApprovedToDateTimeUTCNo
DenialReasonString(200)No
RawRequestText (encrypted)YesAES-256 at rest
RawResponseText (encrypted)NoAES-256 at rest
OrganizationIDUUIDYesOrganizationPartition key
CreatedByUserIDUUIDYesUserAudit
CreatedDateTimeUTCDateTimeUTCYesAudit
UpdatedByUserIDUUIDYesUserAudit
UpdatedDateTimeUTCDateTimeUTCYesAudit
IsDeletedBoolYesSoft-delete

RBAC

Role (Tier)Access
Patient (10)Read own PA status
FrontDesk (30)Read & trigger PA
MA / RN (40)Read all & submit PA
Biller (51)Submit, cancel, queue PA
Clinician (60)Read all & submit/attach clinical justification
PracticeMgr (70)Override & approve PA
EditAMI (90+)Schema management

Trust tier roll-up

EntityTierSource of truth
InsurancePlan1 — Internal canonicalPractice-curated catalog seeded from clearinghouse payer directories
Coverage1/2 — MixedSubscriber identifiers human-entered (1); active flag and effective dates set from latest 271 (2)
EligibilityCheck2 — External inboundResponse payload originates with the payer; trace number is authoritative
BenefitDetail2 — External inboundParsed verbatim from 271 EB segments
PriorAuth2 — External inboundDecision and auth number assigned by payer

RBAC matrix (IC 0–100 scale)

RoleLevelInsurancePlanCoverageEligibilityCheckBenefitDetailPriorAuth
Patient (self)10Read own coverage’s planRead ownRead parsed status of ownRead ownRead own
Front desk (Jordan)30ReadRead / WriteRead parsed status; triggerReadRead; trigger ePA
MA / RN (Tasha)40ReadReadReadReadRead; submit
Biller (Priya)51Read / WriteRead / WriteRead parsed; raw payload ≥ 70ReadSubmit, cancel, work-queue
Clinician (Dr. M / Maria)60ReadReadReadReadSubmit, attach clinical justification
Practice manager (Sam)70Read / WriteRead / WriteRead raw payloadReadOverride / decision approve
EditAMI90Required for any AMI schema break (per IC hard rule #5)

Trust-tier writes follow the standard rule: a Tier 2 write (e.g., 271-derived BenefitDetail) does not require human approval; the system service account writes them under a stable system UserID.

FK Relationship Diagram

erDiagram
    Patient ||--o{ Coverage : "insured by"
    InsurancePlan ||--o{ Coverage : "plan for"
    Patient ||--o{ EligibilityCheck : "verified for"
    Coverage ||--o{ EligibilityCheck : "checked against"
    EligibilityCheck ||--o{ BenefitDetail : "yields"
    Patient ||--o{ PriorAuth : "requests"
    Coverage ||--o{ PriorAuth : "authorized under"
    Provider ||--o{ PriorAuth : "ordered by"
    Encounter ||--o| PriorAuth : "linked to"
  

Prior Auth State Machine

stateDiagram-v2
    [*] --> Pending : Submitted
    Pending --> Approved : Payer approves
    Pending --> Denied : Payer denies
    Pending --> Pended : Payer requests more info
    Pending --> Cancelled : Practice cancels
    Pended --> Pending : Additional info submitted
    Pended --> Cancelled : Practice cancels
    Denied --> Pending : Appeal submitted
    Approved --> [*]
    Denied --> [*]
    Cancelled --> [*]
  

Functional Requirements

  1. P0 The system shall maintain InsurancePlan records with payer ID, plan type, line of business, and X12/FHIR capability flags.
  2. P0 The system shall store Coverage records linking patients to insurance plans with subscriber details and primary/secondary/tertiary ranking.
  3. P0 The system shall perform real-time eligibility checks via X12 270/271 or FHIR CoverageEligibilityRequest at configurable triggers (Booking, T-24h, CheckIn, Manual).
  4. P0 The system shall parse X12 271 responses into structured BenefitDetail records with copay, coinsurance, deductible, and OOP amounts per service category.
  5. P0 The system shall encrypt raw X12/FHIR request and response payloads at rest (AES-256).
  6. P0 The system shall submit prior-authorization requests via X12 278, FHIR DaVinci PAS, fax, or payer portal.
  7. P0 The system shall enforce CMS-0057-F decision deadlines: 72 hours for expedited, 7 calendar days for standard requests.
  8. P0 The system shall track PA decision status (Pending, Approved, Denied, Pended, Cancelled) with auth numbers and approved units/dates.
  9. P0 The system shall surface eligibility status on the Scheduling module's Appointment entity (Active, Inactive, Pending, Unknown).
  10. P1 The system shall support batch eligibility checks for next-day appointments via a nightly job.
  11. P1 The system shall detect and flag coverage gaps (TerminationDate in the past, no active coverage) at check-in.
  12. P1 The system shall route PA denials to a task queue for appeal workflow with clinical justification attachment.
  13. P1 The system shall track clearinghouse routing (Stedi, Availity, Waystar) and response latency per transaction.
  14. P2 The system shall provide a dashboard showing eligibility check success rates, average latency, and PA turnaround times by payer.

Non-Functional Requirements

icApplication Overrides

How the five Eligibility AMI schemas turn into a live application: module-specific stack additions, override component bindings, a versioning worked example, environment cascade, and RBAC enforcement.

Shared generation map. The IC platform code-gen flow, default bindings, environment cascade, RBAC model, and CLI commands are identical across all modules. See the IC Reference for the canonical shared reference. This section covers only Eligibility-specific content.

Technology stack P0

The shared platform stack (Cosmos DB, Redis, IC-generated API, Angular 21, SQS+SNS, OpenTelemetry, etc.) is documented in the IC Reference. Module-specific additions:

LayerTechnologyNotes
Eligibility transport (medical)X12 270/271 v5010Stedi primary, Availity Essentials Pro secondary.
Prior-auth transport (legacy)X12 278 v5010Used for non-CMS-0057-F payers.
Prior-auth transport (modern)FHIR R4 + Da Vinci PASMandated for CMS-0057-F-impacted payers from Jan 1, 2027.
FHIR resource profilesCoverage, CoverageEligibilityRequest, CoverageEligibilityResponse, Claim (PAS), ClaimResponse (PAS)R4 baseline; USCDI v3 alignment for CY 2026.
OCRAWS TextractInsurance card front + back; field extraction post-processed by a payer-ID resolver.
SchedulingAmazon EventBridgeCron driver for FR-EL-002.

Eligibility-specific override bindings P1

These overrides are declared in rules/*.rules.json and replace the default for the matching field name pattern.

FieldDefault would renderOverride componentWhy
InsurancePlan.PayerIDString50plain text inputic-ng21-eligibility-1-payer-pickerResolves payer ID against the clearinghouse’s payer directory; prevents typos that cause 271 errors.
InsurancePlan.PlanTypeString50plain text inputic-ng21-eligibility-1-plan-type-selectConstrained dropdown of HMO / PPO / EPO / POS / HDHP / Medicare / Medicaid / Tricare / VA / WC.
BenefitDetail.ServiceCategoryString50plain text inputic-ng21-eligibility-1-service-category-selectX12 EB04 service-type code picker with human-readable labels.
EligibilityCheck.StatusString50plain text displayic-ng21-eligibility-1-eligibility-status-pillColor-coded dark status pill (Active / Inactive / Pending / Error).
PriorAuth.DecisionStatusString50plain text displayic-ng21-eligibility-1-pa-status-pillColor-coded dark status pill (Pending / Approved / Denied / Pended / Cancelled).
(synthetic) Insurance card capturen/aic-ng21-eligibility-1-card-ocr-uploaderCustom flow: camera capture → Textract → field confirm → auto 270.
(synthetic) Cost estimate dialogn/aic-ng21-eligibility-1-cost-estimatorCross-cuts CPT list + BenefitDetail + RCM contract rate; renders patient-responsibility breakdown.

Versioning — worked example P0

All Eligibility artifacts are versioned break.feature.bug.buildtimestamp per IC hard rule #9. The example below traces a feature bump on InsurancePlan.

InsurancePlan 1.0.0.20260301T120000Z — Initial schema. Eight business fields plus three audit fields. Component ic-ng21-eligibility-1-app and ic-ng21-eligibility-1-coverage-card bind to insuranceplan@1.0.0.* via the DI manifest.

InsurancePlan 1.1.0.20260415T093000Z — feature bump — Adds a single optional field, FormularySupportedBool, to flag plans whose payer surfaces formulary data via the eRx-side RTPB. Per the IC change matrix:

ChangeVersion impactApproval neededMin permission
Add optional field FormularySupportedBoolfeature bump (1.0.0 → 1.1.0)NoWrite (51)

Because the change is backward-compatible, the component tag stays ic-ng21-eligibility-1-coverage-card. Existing UI consumers continue to bind insuranceplan@1.x.* and ignore the new field. New UI surfaces that need the flag bind insuranceplan@^1.1.0. No new database is required (IC rule #13 only applies to break bumps).

InsurancePlan 2.0.0.20271101T120000Z — break bump (illustrative) — An illustrative future break bump: PlanTypeString50 is split into a strongly-typed PlanTypeEnum field. Per the IC change matrix this is change field type — break bump, EditAMI (90) approval, and per IC rule #13 a new database is provisioned with ETL from the old one. The component tag becomes ic-ng21-eligibility-2-coverage-card; consumers must re-bind. The old database stays live for the configured grace period (default 90 days) for rollback.

Illustrative. The 2.0.0 example is illustrative of the change matrix and IC rule #13; it is not a committed roadmap item.

Eligibility environment details

EnvClearinghouseDa Vinci PAS endpoint
DevStedi sandboxHL7 reference PAS sandbox
QAStedi sandbox + Availity sandboxHL7 reference PAS sandbox + payer sandboxes
UATStedi prod (test trading partners)Live payer PAS endpoints (test members)
ProdStedi prod + Availity prodLive payer PAS endpoints

Eligibility RBAC notes

Cross-Module Links

Cross-Module Dependencies

See also: Eligibility walkthrough · IC Reference