Documentation Index
Fetch the complete documentation index at: https://docs.ledgerbox.io/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Health Insurance Card model extracts and structures information from US health insurance cards, including member information, prescription details, plan information, and Medicare/Medicaid data. The model handles various card formats and insurance types.
Model Details
- Model ID:
HEALTH_INSURANCE
- Supported Locales:
en-US
- Version: GA
- Release Date: November 30, 2024
Schema Structure
Root Level Fields
| Field | Type | Description |
|---|
Insurer | string? | Health insurance provider name |
Member | Member? | Member information |
Dependents | Dependent[] | Array of dependents |
IdNumber | IdNumber? | Identification number information |
GroupNumber | string? | Insurance Group Number |
PrescriptionInfo | PrescriptionInfo? | Prescription information |
Pbm | string? | Pharmacy Benefit Manager |
EffectiveDate | string? | Plan effective date |
Copays | Copay[] | Array of copay benefits |
Payer | Payer? | Payer information |
Plan | Plan? | Plan information |
MedicareMedicaidInfo | MedicareMedicaidInfo? | Medicare/Medicaid information |
Member Fields
| Field | Type | Description |
|---|
Name | string? | Member name |
BirthDate | string? | Member date of birth |
Employer | string? | Member employer |
Gender | string? | Member gender |
IdNumberSuffix | string? | Identification Number Suffix |
Dependent Fields
| Field | Type | Description |
|---|
Name | string? | Dependent name |
ID Number Fields
| Field | Type | Description |
|---|
Prefix | string? | ID number prefix |
Number | string? | ID number |
| Field | Type | Description |
|---|
Issuer | string? | ANSI issuer identification number |
RxBIN | string? | Prescription issued BIN number |
RxPCN | string? | Prescription processor control number |
RxGrp | string? | Prescription group number |
RxId | string? | Prescription identification number |
RxPlan | string? | Prescription Plan number |
Copay Fields
| Field | Type | Description |
|---|
Benefit | string? | Co-Pay Benefit name |
Amount | number? | Co-Pay required amount |
Plan Fields
| Field | Type | Description |
|---|
Number | string? | Plan number |
Name | string? | Plan name |
Type | string? | Plan type |
Type Definitions
import type {
Member,
Dependent,
IdNumber,
PrescriptionInfo,
Copay,
Payer,
Plan,
MedicareMedicaidInfo,
HealthInsuranceCard,
HealthInsuranceCardResponse,
StrictHealthInsuranceCardResponse
} from '@your-package/models';
Validation Rules
Basic Validation
- All fields are optional by default
- Dependents and Copays default to empty arrays if not specified
Strict Validation
The following fields are required in strict mode:
- Insurer
- Member.Name
- Member.BirthDate
- IdNumber.Number
- Plan.Name
- Plan.Type
Example Usage
import { validateHealthInsuranceCard, healthInsuranceCardUtils } from '@your-package/models';
// Example health insurance card data
const cardData = {
Insurer: "PREMERA BLUE CROSS",
Member: {
Name: "ANGEL BROWN",
BirthDate: "1958-01-06",
Gender: "M"
},
IdNumber: {
Prefix: "ABC",
Number: "123456789"
},
GroupNumber: "1000000",
Plan: {
Name: "HEALTH SAVINGS PLAN",
Type: "PPO"
}
};
// Validate the card
const validatedCard = validateHealthInsuranceCard(cardData);
// Access validated data through result property
const memberId = healthInsuranceCardUtils.getFullMemberId(validatedCard.result);
Date Handling
The model accepts dates in multiple formats:
- ISO 8601 datetime strings
- YYYY-MM-DD format
- MM/DD/YYYY format
- MM-DD-YYYY format
All dates are converted to ISO format during validation.
Best Practices
- Always validate cards before processing:
const card = validateHealthInsuranceCard(cardData);
- Use full member ID for lookups:
const memberId = healthInsuranceCardUtils.getFullMemberId(card);
- Format copay amounts consistently:
const formattedCopay = healthInsuranceCardUtils.formatCopayAmount(copay.amount);
- Check card validity:
if (!healthInsuranceCardUtils.isCardValid(card)) {
// Handle invalid card
}
-
Handle prescription information carefully as it may be on a separate card
-
Preserve original ID numbers and group numbers as strings