Claims Processing API¶
The Claims Processing API provides a unified interface for grouping, editing, and pricing healthcare claims across multiple care settings. It wraps official CMS logic to ensure accurate reimbursement calculations.
Overview¶
The API accepts a standardized Claim object and processes it through one or more requested Modules (Groupers, Editors, or Pricers).
Base Path: /api/v1/myelin
Authentication: Required (Bearer token or API Key)
Endpoints¶
Process Claim¶
Submit a claim for processing. The specific logic applied depends on the modules list provided in the request body.
Endpoint: POST /myelin/process/pps
Request Body: Claim object (JSON)
Response: MyelinOutput object (JSON)
Example Request:
curl -X POST \
-H "Authorization: sk_live_abc123..." \
-H "Content-Type: application/json" \
-d '{
"claimid": "TEST-001",
"modules": ["MSDRG", "IPPS"],
"from_date": "2025-01-01",
"thru_date": "2025-01-05",
"admit_date": "2025-01-01",
"bill_type": "111",
"patient_status": "01",
"total_charges": 15000.00,
"principal_dx": { "code": "I50.21" },
"billing_provider": {
"npi": "1234567890",
"other_id": "123456",
"additional_data": {
"ipsf": {
"operating_cost_to_charge_ratio": 0.25
}
}
}
}' \
"https://api.example.com/api/v1/myelin/process/pps"
Data Models¶
Claim Object¶
The Claim object is the central input structure. Not all fields are required for every module.
| Field | Type | Description |
|---|---|---|
claimid |
string | Unique identifier for the claim. |
modules |
array[string] | List of modules to run (e.g., ["MSDRG", "IPPS"]). |
from_date |
string | Statement covers from date (YYYY-MM-DD). |
thru_date |
string | Statement covers through date (YYYY-MM-DD). |
admit_date |
string | Admission date (YYYY-MM-DD). |
bill_type |
string | 3-digit Type of Bill (TOB) code (e.g., "111", "131"). |
patient_status |
string | Discharge status code (e.g., "01", "06"). |
total_charges |
number | Total claim charges. |
principal_dx |
DiagnosisCode | Principal diagnosis. |
secondary_dxs |
array[DiagnosisCode] | List of secondary diagnoses. |
inpatient_pxs |
array[ProcedureCode] | List of inpatient procedures (ICD-10-PCS). |
lines |
array[LineItem] | List of service lines (for outpatient/HHA). |
billing_provider |
Provider | Billing provider details. |
patient |
Patient | Patient demographics. |
cond_codes |
array[string] | List of condition codes. |
value_codes |
array[ValueCode] | List of value codes. |
occurrence_codes |
array[OccurrenceCode] | List of occurrence codes. |
span_codes |
array[SpanCode] | List of occurrence span codes. |
Supported Modules¶
| Module | Description | Type |
|---|---|---|
MSDRG |
MS-DRG Grouper (Inpatient) | Grouper |
MCE |
Medicare Code Editor (Inpatient) | Editor |
IPPS |
Inpatient Prospective Payment System | Pricer |
IOCE |
Integrated Outpatient Code Editor | Editor |
OPPS |
Outpatient Prospective Payment System | Pricer |
HHAG |
Home Health Grouper (PDGM) | Grouper |
HHA |
Home Health Agency Pricer | Pricer |
CMG |
Case Mix Group (IRF) Grouper | Grouper |
IRF |
Inpatient Rehabilitation Facility Pricer | Pricer |
PSYCH |
Inpatient Psychiatric Facility (IPF) Pricer | Pricer |
LTCH |
Long-Term Care Hospital Pricer | Pricer |
SNF |
Skilled Nursing Facility Pricer | Pricer |
HOSPICE |
Hospice Pricer | Pricer |
ESRD |
End-Stage Renal Disease Pricer | Pricer |
FQHC |
Federally Qualified Health Center Pricer | Pricer |
Sub-Objects¶
DiagnosisCode¶
{
"code": "I50.21",
"poa": "Y", // Present on Admission: Y, N, U, W, 1, or blank
"dx_type": 1 // 1=Primary, 2=Secondary (optional, inferred from position)
}
ProcedureCode¶
LineItem¶
Used primarily for outpatient (OPPS), HHA, and Hospice claims.
{
"revenue_code": "0450",
"hcpcs": "99285",
"service_date": "2025-01-01",
"units": 1,
"charges": 500.00,
"modifiers": ["25"]
}
Provider¶
{
"npi": "1234567890",
"other_id": "123456", // CMS Certification Number (CCN)
"additional_data": {
"ipsf": {
// Overrides for provider-specific factors
"operating_cost_to_charge_ratio": 0.25,
"special_wage_index": 1.05
}
}
}
Response Structure¶
The response contains a field for each module run, plus any errors.
{
"msdrg": {
"drg": "291",
"description": "HEART FAILURE & SHOCK W MCC",
"weight": 1.2345,
"mdc": "05",
"geometric_mean_los": 4.5,
"arithmetic_mean_los": 5.2
},
"ipps": {
"total_payment": 12500.50,
"federal_payment": 11000.00,
"outlier_payment": 0.0,
"capital_payment": 1500.50,
"return_code": "00"
},
"error": null
}
Error Handling¶
If a critical error occurs (e.g., missing required fields for a module), the error field will be populated, and the HTTP status code may be 400 or 500.
Common Workflows¶
Inpatient Coding & Pricing (IPPS)¶
- Modules:
["MCE", "MSDRG", "IPPS"] - Required Fields:
admit_date,bill_type,principal_dx,inpatient_pxs(if any),patient_status,total_charges,provider.
Outpatient Pricing (OPPS)¶
- Modules:
["IOCE", "OPPS"] - Required Fields:
bill_type(e.g., "131"),lines(with HCPCS/CPT),diagnosis_codes.
Home Health (PDGM)¶
- Modules:
["HHAG", "HHA"] - Required Fields:
from_date,thru_date,admit_date,principal_dx,oasis_assessment(clinical/functional levels).
Health Check¶
Check the status of the Myelin service.
Endpoint: GET /myelin/health
Response:
Usage Limits & Rate Limiting¶
The Claims Processing API is subject to organization-level usage limits based on your subscription plan.
- Monthly Limit: The number of claims you can process per month is determined by your plan.
- Rate Limit: Standard API rate limits (100 req/min) also apply.
Exceeding Limits¶
If you exceed your monthly claim limit, the API will return a 429 Too Many Requests error.
{
"detail": "Usage limit exceeded. Your organization has reached its monthly limit of 1000 claims (current: 1001). Contact support to increase your limit."
}
The Retry-After header will indicate when the limit resets (typically the start of the next billing cycle).