Skip to content

parser / guides / 06

Read HCSC responses

This page describes how to read a 271 eligibility response from a Health Care Service Corporation (HCSC) Blue Cross and Blue Shield plan by using interpretRoute with hcscProfile. The profile applies the 271 rules from the HCSC 270/271 companion guides, version 1.1 (February 2026), for the following plans:

  • Blue Cross and Blue Shield of Texas
  • Blue Cross and Blue Shield of Illinois
  • Blue Cross and Blue Shield of Oklahoma
  • Blue Cross and Blue Shield of Montana

Each plan publishes its own guide. The four guides have the same rules for 271 responses. They differ in their payer IDs and in their rules for 270 requests.

The profile does the following:

  • Checks the payer in the response.
  • Gives each error that the companion guides list its HCSC meaning, and reports any other error as a finding.
  • Reads each member's group, related plans, and utilization management contacts.

WARNING

The profile doesn't cover Blue Cross and Blue Shield of New Mexico, the fifth HCSC plan. The library has no New Mexico companion guide to follow.

Before you begin ​

Make sure that you have the following:

  • A 271 response to a 270 request that you sent to one of the four plans, either directly or through a clearinghouse.
  • The @ediocracy/parser package.

To have the library pick the profile from the 2100A payer ID in the response, use interpretRoute(entry) instead of passing hcscProfile. For more information, see Apply the payer's rules.

Read a response ​

The following example reads a file of 271 responses and prints the HCSC results for each member:

ts
import { readFile } from 'node:fs/promises';

import { readX12 } from '@ediocracy/parser';
import { read271s } from '@ediocracy/parser/271';
import { hcscProfile, interpretRoute } from '@ediocracy/parser/271/routes';

const text = await readFile('response.x12', 'utf8');

for (const entry of read271s(readX12(text))) {
    const result = interpretRoute(entry, hcscProfile);

    for (const finding of result.findings) {
        console.log('Finding:', finding.code, finding.message);
    }

    for (const error of result.errors) {
        console.log('Error:', error.condition ?? error.rejectReason, error.description);
    }

    for (const view of result.members) {
        console.log('Group:', view.group?.number, view.group?.name);
        console.log('Related plans:', view.relatedPlans.map(plan => plan.payerId));
        console.log('Utilization management:', view.utilizationManagement.map(row => row.phone));
    }
}

For each item that read271s returns, interpretRoute(entry, profile) returns a RouteEligibility object. The object has the following fields:

  • eligibility: the unchanged result of interpret271 for the response.
  • errors: each error that the payer reported, in the same order as eligibility.requestErrors. When the companion guides list an error, its entry includes the HCSC condition and description.
  • findings: the problems that the profile found in the response.
  • members: one HcscView object for each member, in the same order as eligibility.members.

Payer checks ​

Each companion guide gives the payer IDs that its plan sends. Responses from the Stedi sandbox contain Stedi's payer ID for the plan instead. hcscProfile accepts each of these IDs:

PlanNM109 values
Texas84980, G84980 (Stedi), HCSV2 (Texas Medicaid)
Illinois00621, G00621 (Stedi), MCIL2 (Illinois Medicaid)
Oklahoma00840
Montana00751
Medicare Advantage, in all four plansHMAPD

The profile reports unexpected-source when the 2100A NM1 segment doesn't meet all of the following conditions:

  • NM101 is PR.
  • NM108 is PI.
  • NM109 is one of the values in the table.

The profile doesn't check the following:

  • NM103. The guides give a short plan name, such as BCBSTX, but the Stedi sandbox sends the plan's full name.
  • The separators and the ISA and GS sender IDs. A clearinghouse that delivers the response replaces them with its own.
  • The 2100B loop and placeholder member IDs. The guides give no rules for them.

Errors ​

The companion guides list every AAA03 code that the plans send and the loop that each code appears in. The profile gives each code the following condition:

LevelAAA03conditionMeaning
source42payer-unavailableThe plan couldn't respond. Send the request again later.
receiver50provider-not-eligibleThe provider can't check eligibility with the plan.
receiver51provider-not-on-fileThe plan has no record of the provider.
subscriber58birth-date-missingThe date of birth is missing or not valid.
subscriber62date-outside-windowThe date of service is outside the period the plan answers for.
subscriber71birth-date-not-matchedThe date of birth doesn't match the plan's record for the member.
subscriber72member-id-missingThe member ID is missing or not valid.
subscriber73name-missingThe member's name is missing or not valid.
subscriber75member-not-foundNo member matches the request.
subscriber76duplicate-member-idMore than one member has the member ID.
dependent62date-outside-windowThe date of service is outside the period the plan answers for.
dependent64member-id-missingThe member ID is missing or not valid.
dependent65name-missingThe member's name is missing or not valid.
benefit62date-outside-windowThe date of service is outside the period the plan answers for.

The plans return eligibility for dates of service from 12 months before the current date through the last day of the current month. For a date outside that period, the plan sends AAA03 62.

Because the guides list every code that the plans send, the profile reports any other error as an unlisted-error finding and sets its condition and description to undefined. This includes 58 and 71 at the dependent level, because the guides list these codes only for subscribers.

HCSC view ​

Each HcscView object contains the fields in the following table. Each list keeps its rows in the order that they appear in the response.

WARNING

The companion guides don't describe these fields. The profile reads them as they appear in one Stedi sandbox response for Blue Cross and Blue Shield of Texas. Other responses might send them differently.

FieldContents
groupThe member's first REF segment with REF01 set to 6P. number is REF02, and name is REF03. undefined when there's no such segment.
relatedPlansThe NM1 segments with NM101 set to VER in the 2120 loops of the member's plan coverage rows (EB03 set to 30). name is NM103, and payerId is NM109. In the sandbox response, these name the Texas and Illinois plans.
utilizationManagementRows with EB01 set to U. name, phone, and website come from the row's first 2120 loop: the name in its NM1 segment, and the first telephone number and web address in its PER segments. serviceTypes is EB03.

Findings ​

The findings field uses codes from RouteFindingCode. The profile reports the following codes:

  • unexpected-source: the 2100A NM1 segment doesn't meet the conditions in Payer checks.
  • unlisted-error: an error whose level and AAA03 aren't in the table in Errors.

Limitations ​

The profile has the following limitations:

  • It doesn't cover Blue Cross and Blue Shield of New Mexico.
  • It accepts only two Stedi payer IDs, G84980 and G00621. For a response that contains another clearinghouse ID for one of the plans, interpretRoute(entry) returns route set to undefined.
  • It doesn't apply the companion guides' rules for 270 requests, such as member ID prefixes and supported service types.