How to map a Medicare 271 eligibility response to a CWF

Stedi’s Eligibility Check APIs let you get Medicare 271 eligibility responses as JSON. But your system – or one downstream – might need to display that JSON data in Common Working File (CWF) fields. Many providers still expect a CWF-style layout.

This guide shows how to map Stedi’s JSON 271 eligibility responses to CWF fields. It also covers what the CWF was, how Medicare eligibility checks work today, and why the CWF format still persists.

What Is the Common Working File (CWF)?

The Centers for Medicare & Medicaid Services (CMS) built the CWF in the 1980s to centrally manage Medicare eligibility. It was the source of truth for who was covered, when, and under which Medicare part.

The system produced fixed-format text files – also called “CWFs” – for mainframe terminals and printed reports. Each file had a set layout, with fields like member ID, coverage type, and benefit dates. For example:

Example of a CWF-like layout with fixed fields

How Medicare eligibility checks work today

CMS replaced the CWF in 2019 with the HIPAA Eligibility Transaction System (HETS). HETS returns standard 271 eligibility responses, the same as commercial insurers. Medicare 271s include a lot of Medicare-specific info, including:

  • Medicare Part A and Part B entitlements and dates

  • Part C (Medicare Advantage) and Part D (Prescription Drug) plan info

  • Deductibles, copays, and benefit limits

  • Remaining Skilled Nursing Facility (SNF) days

  • ESRD transplant or dialysis dates

  • Smoking cessation visits and therapy caps

  • Qualified Medicare Beneficiary (QMB), secondary payers, Medicaid crossover, and other coordination of benefits information.

In a response from our Real-Time Eligibility Check JSON endpoint, that data lives in the plans array. Each plan’s benefits object groups it into arrays by benefit type, such as coPayment. Each entry describes a specific coverage, limit, or service type. For example:

{
  "plans": [
    {
      "benefits": {
        "coPayment": [
          {
            "amount": "408",
            "dates": {
              "admission": {
                "end": "2024-12-31",
                "start": "2024-01-01"
              }
            },
            "insuranceType": "MEDICARE_PART_A",
            "network": {
              "indicator": "IN_AND_OUT_OF_NETWORK"
            },
            "service": {
              "definition": "Health Benefit Plan Coverage",
              "system": "STC",
              "value": "30"
            },
            "serviceLimits": [
              {
                "delivery": {
                  "frequency": {
                    "qualifier": "DAYS"
                  },
                  "period": {
                    "qualifier": "EXCEEDED",
                    "value": 60
                  }
                }
              },
              {
                "delivery": {
                  "frequency": {
                    "qualifier": "DAYS"
                  },
                  "period": {
                    "qualifier": "NOT_EXCEEDED",
                    "value": 90
                  }
                }
              },
              {
                "delivery": {
                  "period": {
                    "qualifier": "EPISODE",
                    "value": 1
                  }
                }
              }
            ],
            "timePeriod": "DAY"
          }
        ]
      }
    }
  ],
  "subscriber": {
    "memberId": "123456789",
    "name": {
      "person": {
        "firstName": "JANE",
        "lastName": "DOE"
      }
    },
    ...
  },
  ...
}

How to use this guide

Stedi’s JSON 271 eligibility response is easier to use in modern applications. But if your customers need the old CWF layout, you’ll need to map each field from JSON.

This guide isn’t an official spec. It’s a practical reference. Each section shows a CWF-style layout, a table of field mappings, and notes on when to use each field. For details on our JSON 271 eligibility responses, see our API documentation.

Provider information

Provider information in a CWF-like format

CWF field

JSON 271 eligibility response property

Organization Name

provider.name.organization

NPI ID

provider.npi

Patient Demographics

The following table includes patient demographics from the SUBMITTED TO PAYER and RETURNED BY PAYER sections of the sample CWF.

Patient demographics section in an example CWF

CWF field

JSON 271 eligibility response property

When to use

SUBMITTED TO PAYER





First Name

subscriber.name.person.firstName



Last Name

subscriber.name.person.lastName



Member ID (MBI)

subscriber.memberId



D.O.B.

subscriber.dateOfBirth



Eligibility Date(From)

subscriber.dates.eligibility.start

If the payer returns a single date instead of a date range, only start is present.

Eligibility Date(To)

subscriber.dates.eligibility.end

If the payer returns a single date instead of a date range, only start is present.

Service Types(s)

service.value service.system

Check the service on each benefit entry. system is STC for a Service Type Code, or a procedure code system such as HCPCS.

RETURNED TO PAYER





First Name

subscriber.name.person.firstName



Middle Name

subscriber.name.person.middleName



Last Name

subscriber.name.person.lastName



Suffix

subscriber.name.person.suffix



Member ID (MBI)

subscriber.memberId



D.O.B.

subscriber.dateOfBirth



Gender

subscriber.gender



Address Line 1

subscriber.address.addressLine1



Address Line 2

subscriber.address.addressLine2



City

subscriber.address.city



State

subscriber.address.state



Zip Code

subscriber.address.postalCode



Benefit Information

In the JSON 271 eligibility response, each plan’s benefits object contains most of the benefits information, grouped into arrays by benefit type.

The insuranceType property on each benefit entry indicates the type of insurance policy within a program, such as Medicare. A value of MEDICARE_PART_A indicates Medicare Part A. A value of MEDICARE_PART_B indicates Medicare Part B. For a complete list of values, see the API reference.

The service object on each benefit entry identifies the type of healthcare services the benefits information relates to. Its service.value is the Service Type Code (STC). An STC of 30 relates to general benefits information. For a complete list of STCs, see Service Type Codes in our docs.

Benefit Information in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Effective Date

plans[].benefits.statuses[].dates.plan.start

All of the following must be true:

  • status = ACTIVE_COVERAGE (Active Coverage)

  • insuranceType = MEDICARE_PART_A (Medicare Part A) or MEDICARE_PART_B (Medicare Part B)



If the payer returns a single date instead of a date range, only start is present.

Termination Date

plans[].benefits.statuses[].dates.plan.end

All of the following must be true:

  • status = ACTIVE_COVERAGE (Active Coverage)

  • insuranceType = MEDICARE_PART_A (Medicare Part A) or MEDICARE_PART_B (Medicare Part B)



If the payer returns a single date instead of a date range, only start is present.

Ineligible Start

plans[].benefits.statuses[].dates.plan.start

All of the following must be true:

  • status = INACTIVE (Inactive)

  • insuranceType = MEDICARE_PART_A (Medicare Part A) or MEDICARE_PART_B (Medicare Part B)



If the payer returns a single date instead of a date range, only start is present.

Ineligible End

plans[].benefits.statuses[].dates.plan.end

All of the following must be true:

  • status = INACTIVE (Inactive)

  • insuranceType = MEDICARE_PART_A (Medicare Part A) or MEDICARE_PART_B (Medicare Part B)



If the payer returns a single date instead of a date range, only start is present.

Date of Death

subscriber.dates.dateOfDeath.start



Smoking Cessation Days

plans[].benefits.limitations[].quantity.value

All of the following must be true:

Initial Cessation Date

plans[].benefits.limitations[].dates.plan.start

This information is only available if an initial counseling visit was used in the past 12 months.

All of the following must be true:

  • service.value = 67 (Smoking Cessation)

  • insuranceType = MEDICARE_PART_B (Medicare Part B)

  • timePeriod = SERVICE_YEAR (Service Year)

  • quantity.qualifier = VISITS (Visits)

  • serviceLimits[].delivery.period.qualifier = REMAINING (Remaining)

ESRD Dialysis Date

plans[].benefits.benefitDescription[].dates.discharge.start

The following must be true:

  • service.value = RN (Renal)

ESRD Transplant Date

plans[].benefits.benefitDescription[].dates.service.start

The following must be true:

  • service.value = RN (Renal)

ESRD Coverage Period

plans[].benefits.benefitDescription[].dates.plan

The following must be true:

  • service.value = RN (Renal)

Plan Benefits

Plan Benefits in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Medicare Part A





Type

Use Base when all of the following are true:

  • timePeriod = DAY (Day)

  • dates.admission contains a full year date range, such as 2098-01-01 to 2099-12-31.

Use Spell when all of the following are true:

  • timePeriod = DAY (Day)

  • dates.admission contains a partial year date range, such as 2098-05-06 to 2098-05-08.



First Bill

plans[].benefits.coPayment[].dates.admission.start



Last Bill

plans[].benefits.coPayment[].dates.admission.end



Hospital Days Full

For a Type of Base, use plans[].benefits.coPayment[].serviceLimits[].delivery.period.value when serviceLimits[].delivery.period.qualifier = NOT_EXCEEDED (Not Exceeded).




For a Type of Base, use plans[].benefits.coPayment[].serviceLimits[].delivery.period.value when serviceLimits[].delivery.period.qualifier = REMAINING (Remaining).



Hospital Days Colns

For a Type of Base, use plans[].benefits.coPayment[].serviceLimits[].delivery.period.value when serviceLimits[].delivery.period.qualifier = EXCEEDED (Exceeded).




For a Type of Base, use plans[].benefits.coPayment[].serviceLimits[].delivery.period.value when serviceLimits[].delivery.period.qualifier = REMAINING (Remaining).



Hospital Days Base

plans[].benefits.coPayment[].amount



SNF Days Full

plans[].benefits.coPayment[].serviceLimits[].delivery.period.value

All of the following must be true:

  • service.value = AG (Skilled Nursing Care)

  • insuranceType = MEDICARE_PART_A (Medicare Part A)

  • serviceLimits[].delivery.period.qualifier = NOT_EXCEEDED (Not Exceeded)

SNF Days Colns

plans[].benefits.coPayment[].serviceLimits[].delivery.period.value

All of the following must be true:

  • service.value = AG (Skilled Nursing Care)

  • insuranceType = MEDICARE_PART_A (Medicare Part A)

  • serviceLimits[].delivery.period.qualifier = EXCEEDED (Exceeded)

SNF Days Base

plans[].benefits.coPayment[].amount

All of the following must be true:

  • service.value = AG (Skilled Nursing Care)

  • insuranceType = MEDICARE_PART_A (Medicare Part A)

  • timePeriod = DAY (Day)

Inpatient Deductible

plans[].benefits.deductible[].amount

All of the following must be true:

  • service.value = 30 (Health Benefit Plan Coverage)

  • insuranceType = MEDICARE_PART_A (Medicare Part A)

  • timePeriod = REMAINING (Remaining)

Medicare Part B





Deductible Remaining

plans[].benefits.deductible[].amount

All of the following must be true:

  • service.value = 30 (Health Benefit Plan Coverage)

  • insuranceType = MEDICARE_PART_B (Medicare Part B)

  • timePeriod = CALENDAR_YEAR (Calendar Year)

Physical Therapy

plans[].benefits.benefitDescription[].amount

All of the following must be true:

  • service.value = AE (Physical Medicine)

  • insuranceType = MEDICARE_PART_B (Medicare Part B)

Occupational Therapy

plans[].benefits.benefitDescription[].amount

All of the following must be true:

  • service.value = AD (Occupational Therapy)

  • insuranceType = MEDICARE_PART_B (Medicare Part B)

Medicare Part A Stays





Type

Use Hospital when:

  • service.value = 30 (Health Benefit Plan Coverage)

Use Hospital Stay when:

  • service.value = 48 (Hospital - Inpatient)

Use SNF Stay when:

  • service.value = AH (Skilled Nursing Care - Room and Board)

The following must be true:

  • insuranceType = MEDICARE_PART_A (Medicare Part A)

Start Date

dates.plan.start

On the same benefit entry as the Type.

If the payer returns a single date instead of a date range, only start is present.

End Date

dates.plan.end

On the same benefit entry as the Type.

If the payer returns a single date instead of a date range, only start is present.

Billing NPI

relatedEntities[].facilityId

Stedi returns FA (Facility Identification) identifiers in facilityId.

Qualified Medicare Beneficiary (QMB) Status

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the otherOrAdditionalPayer array (Other or Additional Payor).

  • insuranceType = QUALIFIED_MEDICARE_BENEFICIARY

Qualified Medicare Beneficiary (QMB) Status information in a CWF example

CWF field

JSON 271 eligibility response property

When to use

Period From

plans[].benefits.otherOrAdditionalPayer[].dates.coordinationOfBenefits.start

If the payer returns a single date instead of a date range, only start is present.

Period Through

plans[].benefits.otherOrAdditionalPayer[].dates.coordinationOfBenefits.end

If the payer returns a single date instead of a date range, only start is present.

QMB Plan

plans[].benefits.otherOrAdditionalPayer[].planCoverageDescription

If it’s missing, use the plan’s plans[].name. Stedi omits planCoverageDescription when it matches the plan name.

Medicare Secondary Payor

Medicare Secondary Payor info in an example CWF file

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the otherOrAdditionalPayer array (Other or Additional Payor).

  • insuranceType is one of the following:

    • MEDICARE_SECONDARY_WORKING_AGED_BENEFICIARY_OR_SPOUSE_WITH_EMPLOYER_GROUP_HEALTH_PLAN
    • MEDICARE_SECONDARY_ENDSTAGE_RENAL_DISEASE_BENEFICIARY_IN_THE_MANDATED_COORDINATION_PERIOD_WITH_AN_EMPLOYERS_GROUP_HEALTH_PLAN
    • MEDICARE_SECONDARY_NOFAULT_INSURANCE_INCLUDING_AUTO_IS_PRIMARY
    • MEDICARE_SECONDARY_WORKERS_COMPENSATION
    • MEDICARE_SECONDARY_PUBLIC_HEALTH_SERVICE_PHS_OR_OTHER_FEDERAL_AGENCY
    • MEDICARE_SECONDARY_BLACK_LUNG
    • MEDICARE_SECONDARY_VETERANS_ADMINISTRATION
    • MEDICARE_SECONDARY_DISABLED_BENEFICIARY_UNDER_AGE_65_WITH_LARGE_GROUP_HEALTH_PLAN_LGHP
    • MEDICARE_SECONDARY_OTHER_LIABILITY_INSURANCE_IS_PRIMARY
    • AUTO_INSURANCE_POLICY
    • WORKERS_COMPENSATION

CWF field

JSON 271 eligibility response property

When to use

Effective Date

plans[].benefits.otherOrAdditionalPayer[].dates.coordinationOfBenefits.start

If the payer returns a single date instead of a date range, only start is present.

Termination Date

plans[].benefits.otherOrAdditionalPayer[].dates.coordinationOfBenefits.end

If the payer returns a single date instead of a date range, only start is present.

Policy Number

plans[].benefits.otherOrAdditionalPayer[].additionalInformation.insurancePolicyNumber



Insurer

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].name.organization



Address

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.addressLine1

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.addressLine2

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.city

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.state

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.postalCode



Type

plans[].benefits.otherOrAdditionalPayer[].insuranceType



Medicare Advantage

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the contactFollowingEntityForInformation array (Contact Following Entity for Eligibility or Benefit Information).

  • service.value = 30 (Health Benefit Plan Coverage). If the payer also lists CQ (Case Management), the response includes a second entry with the same details for CQ.

  • insuranceType = HEALTH_MAINTENANCE_ORGANIZATION_HMO, HEALTH_MAINTENANCE_ORGANIZATION_HMO_MEDICARE_RISK, INDEMNITY, PREFERRED_PROVIDER_ORGANIZATION_PPO, or POINT_OF_SERVICE_POS

  • relatedEntities[].type = PRIMARY_PAYER

Medicare Advantage information in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Effective Date

plans[].benefits.contactFollowingEntityForInformation[].dates.coordinationOfBenefits.start

If the payer returns a single date instead of a date range, only start is present.

Termination Date

plans[].benefits.contactFollowingEntityForInformation[].dates.coordinationOfBenefits.end

If the payer returns a single date instead of a date range, only start is present.

Plan Code

plans[].benefits.contactFollowingEntityForInformation[].additionalInformation.plan.number



Payer Name

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].name.organization



Address

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].address.addressLine1

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].address.addressLine2

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].address.city

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].address.state

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].address.postalCode



Plan Name

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].name.organization



Website

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].contacts[].urls

In most cases, CMS only provides just the payer’s domain name, such as examplepayer.com, not a complete URL.

Phone Number

plans[].benefits.contactFollowingEntityForInformation[].relatedEntities[].contacts[].phoneNumbers



Message(s)

plans[].benefits.contactFollowingEntityForInformation[].messages



Part D

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the otherOrAdditionalPayer array (Other or Additional Payor).

  • service.value = 88 (Pharmacy)

Medicare Part D info in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Effective Date

plans[].benefits.otherOrAdditionalPayer[].dates.benefit.start

If the payer returns a single date instead of a date range, only start is present.

Termination Date

plans[].benefits.otherOrAdditionalPayer[].dates.benefit.end

If the payer returns a single date instead of a date range, only start is present.

Plan Code

plans[].benefits.otherOrAdditionalPayer[].additionalInformation.plan.number



Payer Name

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].name.organization



Address

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.addressLine1

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.addressLine2

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.city

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.state

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].address.postalCode



Plan Name

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].name.organization



Website

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].contacts[].urls

In most cases, CMS only provides just the payer’s domain name, such as examplepayer.com, not a complete URL.

Phone Number

plans[].benefits.otherOrAdditionalPayer[].relatedEntities[].contacts[].phoneNumbers



Therapy Caps

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the benefitDescription array (Benefit Description).

  • service.value = AD (Occupational Therapy) or AE (Physical Medicine)

Therapy Caps information in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Period Begin

plans[].benefits.benefitDescription[].dates.benefit.start

If the payer returns a single date instead of a date range, only start is present.

Period End

plans[].benefits.benefitDescription[].dates.benefit.end

If the payer returns a single date instead of a date range, only start is present.

PT/ST Applied

plans[].benefits.benefitDescription[].messages



OT Applied

plans[].benefits.benefitDescription[].messages



Hospice

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the healthCareFacility array (Health Care Facility).

  • service.value = 45 (Hospice)

Hospice info in a CWF

CWF field

JSON 271 eligibility response property

When to use

Benefit Period

No direct mapping. Calculated by ordering the episodes by date for the calendar year.



Benefit Period Start Date

plans[].benefits.healthCareFacility[].dates.benefit.start

If the payer returns a single date instead of a date range, only start is present.

Benefit Period End Date

plans[].benefits.healthCareFacility[].dates.benefit.end

If the payer returns a single date instead of a date range, only start is present.

Provider

plans[].benefits.healthCareFacility[].relatedEntities[].npi

The following must be true:

  • relatedEntities[].type = PROVIDER (Provider)

Provider Name

plans[].benefits.healthCareFacility[].relatedEntities[].name.organization

The following must be true:

  • relatedEntities[].type = PROVIDER (Provider)

Hospice Elections





Election Date

plans[].benefits.healthCareFacility[].dates.benefit.start

If the payer returns a single date instead of a date range, only start is present.

Election Receipt Date

plans[].benefits.healthCareFacility[].dates.added.start



Election Revocation Code

plans[].benefits.healthCareFacility[].messages



Election NPI

plans[].benefits.healthCareFacility[].relatedEntities[].npi



Home Health Certification

Home Health Certification information in an example CWF

In the JSON 271 eligibility response, this information is only available when all of the following is true:

  • The entry is in the healthCareFacility array (Health Care Facility).

  • service.value = G0180, with a service.system of HCPCS

CWF field

JSON 271 eligibility response property

Certification HCPCS Code

plans[].benefits.healthCareFacility[].service.value

Process Date

plans[].benefits.healthCareFacility[].dates.period.start

Rehabilitation Services

Rehabilitation Services information in an example CWF

CWF field

JSON 271 eligibility response property

When to use

Pulmonary Remaining (G0424) Technical

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BF (Pulmonary Rehabilitation)

  • timePeriod = REMAINING (Remaining)

  • messages includes Technical

Pulmonary Remaining (G0424) Professional

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BF (Pulmonary Rehabilitation)

  • timePeriod = REMAINING (Remaining)

  • messages includes Professional

Cardiac Applied (93797, 93798) Technical

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BG (Cardiac Rehabilitation)

  • quantity.qualifier = QUANTITY_USED

  • messages includes Technical

Cardiac Applied (93797, 93798) Professional

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BG (Cardiac Rehabilitation)

  • quantity.qualifier = QUANTITY_USED

  • messages includes Professional

Intensive Cardiac Applied (G0422, G0423) Technical

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BG (Cardiac Rehabilitation)

  • quantity.qualifier = QUANTITY_USED

  • messages includes Intensive Cardiac Rehabilitation - Technical

Intensive Cardiac Applied (G0422, G0423) Professional

plans[].benefits.limitations[].quantity.value

All of the following must be true:

  • service.value = BG (Cardiac Rehabilitation)

  • quantity.qualifier = QUANTITY_USED

  • messages includes Intensive Cardiac Rehabilitation - Professional

PreviousHow to avoid eligibility check errors

Get started with Stedi

Start free with a sandbox account. Upgrade to production when you’re ready. There are no monthly minimums or setup fees. You only pay for the transactions you use. See our pricing.

Sign up free