Skip to content

Processing Claims Through the I/OCE via API

The Integrated Outpatient Code Editor (I/OCE) is a massive logic engine governing outpatient hospital billing. By integrating the Bedrock Billing API into your EHR, billing software, or internal analytics tool, you can intercept claim errors, predict outpatient reimbursement, and identify missing modifiers before the claim ever reaches the Medicare Administrative Contractor (MAC).

If you are looking for a conceptual overview of the I/OCE, please read Understanding the Integrated Outpatient Code Editor (I/OCE).

In this tutorial, we will construct an Outpatient Claim, process it through the I/OCE using the Myelin engine, and parse the resulting IoceOutput object.

Prerequisites

  • Python 3.7+
  • The requests library (pip install requests)
  • A valid Bedrock Billing API Key

Step 1: Constructing the Outpatient Claim Payload

The /myelin/process/pps endpoint expects a standard JSON Claim object. To ensure the claim routes to the I/OCE, we must include "IOCE" in the modules array.

import requests
import json

API_KEY = "sk_live_your_api_key_here"
BASE_URL = "https://api.bedrockbilling.com/api/v1"

claim_payload = {
    "claimid": "OUTPATIENT-IOCE-001",
    "modules": ["IOCE", "OPPS"],     # Route through the IOCE and the OPPS Pricer
    "from_date": "2026-03-22",
    "thru_date": "2026-03-22",
    "bill_type": "131",              # 131 = Hospital Outpatient Part B
    "patient_status": "01",
    "principal_dx": {
        "code": "R07.9"              # Chest pain, unspecified
    },
    "billing_provider": {
        "npi": "1234567890",
    },
    "lines": [
        {
            "service_date": "2026-03-22",
            "revenue_code": "0450",  # Emergency Room
            "hcpcs": "99283",        # ER Visit, Level 3
            "units": 1,
            "charges": 450.00
        },
        {
            "service_date": "2026-03-22",
            "revenue_code": "0320",  # Radiology - Diagnostic
            "hcpcs": "71045",        # Chest X-ray, 1 view
            "modifiers": ["TC"],     # Technical Component
            "units": 1,
            "charges": 150.00
        }
    ]
}

Step 2: Submitting the Request

Send the claim to the Myelin engine:

headers = {
    "Authorization": f"X-API-Key {API_KEY}",
    "Content-Type": "application/json"
}

print("Submitting outpatient claim to the I/OCE...")
response = requests.post(
    f"{BASE_URL}/myelin/process/pps",
    headers=headers,
    json=claim_payload
)

if response.status_code != 200:
    print(f"Error {response.status_code}: {response.text}")
    exit(1)

result = response.json()
ioce_info = result.get("ioce", {})

Step 3: Parsing the I/OCE Output

The API returns a highly structured IoceOutput object containing both Claim-Level and Line-Level data. You can use this to drive workflow rules (e.g., routing claims with an RTP disposition to a billing queue).

Reviewing Claim Dispositions

The I/OCE determines if the claim can proceed to payment, or if it must be rejected, denied, or returned to the provider (RTP).

# Check if the claim successfully processed
processed_flag = ioce_info.get("claim_processed_flag_description")
print(f"I/OCE Processing Status: {processed_flag}")

# Check the final claim disposition
disp_desc = ioce_info.get("claim_disposition_description")
disp_val_desc = ioce_info.get("claim_disposition_value_description")
print(f"Claim Disposition: {disp_desc} ({disp_val_desc})")

# Look up any claim-level Return To Provider (RTP) edits
rtp_edits = ioce_info.get("claim_return_to_provider_edit_list", [])
if rtp_edits:
    print("Warning! Claim RTP Edits found:")
    for edit in rtp_edits:
        print(f" - Edit {edit['edit']}: {edit['description']}")

Reviewing Line Item APCs and Status Indicators

For every line submitted on the claim, the I/OCE runs deep logic to determine its OPPS Status Indicator and maps it to a payment Ambulatory Payment Classification (APC).

print("\n--- Line Item Analysis ---")
for i, line in enumerate(ioce_info.get("line_item_list", [])):
    hcpcs = line.get("hcpcs")
    hcpcs_desc = line.get("hcpcs_description")

    # The assigned status indicator (e.g., J1, S, T, V, X)
    si = line.get("status_indicator")
    si_desc = line.get("status_indicator_description")

    # The APC mapped to this line for payment
    payment_apc = line.get("payment_apc")

    print(f"Line {i+1} [{hcpcs}] {hcpcs_desc[:30]}...")
    print(f"  Status Indicator: {si} - {si_desc}")
    if payment_apc:
        print(f"  Payment APC:      {payment_apc} ({line.get('payment_apc_description')})")

    # Check for line-level edits
    hcpcs_edits = line.get("hcpcs_edit_list", [])
    if hcpcs_edits:
        print(f"  Line HCPCS Edits:")
        for edit in hcpcs_edits:
            print(f"   - Edit {edit['edit']}: {edit['description']}")

Summary

By analyzing the I/OCE output natively within your software, your users gain immediate visibility into exactly why a claim might fail CMS logic.

Next Steps: - See the Claims Processing API Overview to explore the rest of the Myelin engine. - Integrate the Fee Schedule Rates to calculate exact OPPS payment estimates based on the assigned APCs.