X12 270 Eligibility, Coverage or Benefit Inquiry

The 270 (005010X279A1) is the HIPAA transaction a provider sends to check a patient's insurance eligibility and benefits before a visit or service. The payer answers with a 271.

The inquiry identifies the payer, the provider, the subscriber and, when needed, the dependent, and asks about one or more service types in EQ segments - 30 is the general health benefit plan coverage.

At a glance

Standard
X12 HIPAA
Implementation guide
005010X279A1
Functional group
HS (GS01)
Sent by
Provider to payer
Responses
271, 999 (batch)
ediFabric .NET template
TS270 in EdiFabric.Templates.Hipaa
OpenEDI definition
View 270 in the spec library

270 structure

The full X12 270 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 10 loops and 43 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.

Segment / loop Name Usage Max use
STTransaction Set HeaderRequired1
BHTBeginning of Hierarchical TransactionRequired1
Loop 2000AInformation Source LevelRequired>1
HLInformation Source LevelRequired1
Loop 2100AInformation Source NameRequired1
NM1Information Source NameRequired1
Loop 2000BInformation Receiver LevelRequired>1
HLInformation Receiver LevelRequired1
Loop 2100BInformation Receiver NameRequired1
NM1Information Receiver NameRequired1
REFInformation Receiver Additional IdentificationSituational9
N3Information Receiver AddressSituational1
N4Information Receiver City State ZIP CodeSituational1
PRVInformation Receiver Provider InformationSituational1
Loop 2000CSubscriber LevelRequired>1
HLSubscriber LevelRequired1
TRNSubscriber Trace NumberSituational2
Loop 2100CSubscriber NameRequired1
NM1Subscriber NameRequired1
REFSubscriber Additional IdentificationSituational9
N3Subscriber AddressSituational1
N4Subscriber City State ZIP CodeSituational1
PRVProvider InformationSituational1
DMGSubscriber Demographic InformationSituational1
INSMultiple Birth Sequence NumberSituational1
HISubscriber Health Care Diagnosis CodeSituational1
DTPSubscriber DateSituational2
Loop 2110CSubscriber Eligibilityor Benefit InquirySituational99
EQSubscriber Eligibilityor Benefit InquiryRequired1
Any orderThe loops below can appear in any orderSituational1
AMTSubscriber Spend Down AmountSituational1
AMTSubscriber Spend Down Total Billed AmountSituational1
IIISubscriber Eligibilityor Benefit Additional Inquiry InformationSituational1
REFSubscriber Additional InformationSituational1
DTPSubscriber Eligibility Benefit DateSituational1
Loop 2000DDependent LevelSituational>1
HLDependent LevelRequired1
TRNDependent Trace NumberSituational2
Loop 2100DDependent NameRequired1
NM1Dependent NameRequired1
REFDependent Additional IdentificationSituational9
N3Dependent AddressSituational1
N4Dependent City State ZIP CodeSituational1
PRVProvider InformationSituational1
DMGDependent Demographic InformationSituational1
INSDependent RelationshipSituational1
HIDependent Health Care Diagnosis CodeSituational1
DTPDependent DateSituational2
Loop 2110DDependent Eligibilityor Benefit InquiryRequired99
EQDependent Eligibilityor Benefit InquiryRequired1
IIIDependent Eligibilityor Benefit Additional Inquiry InformationSituational1
REFDependent Additional InformationSituational1
DTPDependent Eligibility Benefit DateSituational1
SETransaction Set TrailerRequired1

Usage follows the 005010X279A1 implementation guide: Required segments must be sent, Situational ones only when the guide's condition applies. Trading partners often add their own rules in companion guides - ediFabric templates can be adjusted to match. Open the element-level definition in the EdiNation spec library.

Sample 270 file

An eligibility inquiry for one subscriber. Paste it into EdiNation to see every element named and validated.

ISA*00*          *00*          *ZZ*1234567        *ZZ*11111          *170508*1141*^*00501*000000101*1*P*:~
GS*HC*XXXXXXX*XXXXX*20170617*1741*101*X*005010X279A1~
ST*270*1234*005010X279A1~
BHT*0022*13*10001234*20060501*1319~
HL*1**20*1~
NM1*PR*2*ABC COMPANY*****PI*842610001~
HL*2*1*21*1~
NM1*1P*2*BONE AND JOINT CLINIC*****SV*2000035~
HL*3*2*22*0~
TRN*1*93175-012547*9877281234~
NM1*IL*1*SMITH*ROBERT****MI*11122333301~
DMG*D8*19430519~
DTP*291*D8*20060501~
EQ*30~
SE*13*1234~
GE*1*101~
IEA*1*000000101~

The same 270 as JSON

ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.

{
  "ST": {
    "TransactionSetIdentifierCode_01": "270",
    "TransactionSetControlNumber_02": "1234",
    "ImplementationConventionPreference_03": "005010X279A1"
  },
  "BHT_BeginningOfHierarchicalTransaction": {
    "HierarchicalStructureCode_01": "0022",
    "TransactionSetPurposeCode_02": "13",
    "SubmitterTransactionIdentifier_03": "10001234",
    "TransactionSetCreationDate_04": "20060501",
    "TransactionSetCreationTime_05": "1319"
  },
  "Loop2000A": [
    {
      "HL_InformationSourceLevel": {
        "HierarchicalIDNumber_01": "1",
        "HierarchicalLevelCode_03": "20",
        "HierarchicalChildCode_04": "1"
      },
      "Loop2100A": {
        "NM1_InformationSourceName": {
          "EntityIdentifierCode_01": "PR",
          "EntityTypeQualifier_02": "2",
          "ResponseContactLastorOrganizationName_03": "ABC COMPANY",
          "IdentificationCodeQualifier_08": "PI",
          "ResponseContactIdentifier_09": "842610001"
        }
      },
      "Loop2000B": [
        {
          "HL_InformationReceiverLevel": {
            "HierarchicalIDNumber_01": "2",
            "HierarchicalParentIDNumber_02": "1",
            "HierarchicalLevelCode_03": "21",
            "HierarchicalChildCode_04": "1"
          },
          "Loop2100B": {
            "NM1_InformationReceiverName": {
              "EntityIdentifierCode_01": "1P",
              "EntityTypeQualifier_02": "2",
              "ResponseContactLastorOrganizationName_03": "BONE AND JOINT CLINIC",
              "IdentificationCodeQualifier_08": "SV",
              "ResponseContactIdentifier_09": "2000035"
            }
          },
          "Loop2000C": [
            {
              "HL_SubscriberLevel": {
                "HierarchicalIDNumber_01": "3",
                "HierarchicalParentIDNumber_02": "2",
                "HierarchicalLevelCode_03": "22",
                "HierarchicalChildCode_04": "0"
              },
              "TRN_SubscriberTraceNumber": [
                {
                  "TraceTypeCode_01": "1",
                  "CurrentTransactionTraceNumber_02": "93175-012547",
                  "OriginatingCompanyIdentifier_03": "9877281234"
                }
              ],
              "Loop2100C": {
                "NM1_SubscriberName": {
                  "EntityIdentifierCode_01": "IL",
                  "EntityTypeQualifier_02": "1",
                  "ResponseContactLastorOrganizationName_03": "SMITH",
                  "ResponseContactFirstName_04": "ROBERT",
                  "IdentificationCodeQualifier_08": "MI",
                  "ResponseContactIdentifier_09": "11122333301"
                },
                "DMG_SubscriberDemographicInformation": {
                  "DateTimePeriodFormatQualifier_01": "D8",
                  "DependentBirthDate_02": "19430519"
                },
                "DTP_SubscriberDate": [
                  {
                    "DateTimeQualifier_01": "291",
                    "DateTimePeriodFormatQualifier_02": "D8",
                    "DateTimePeriod_03": "20060501"
                  }
                ],
                "Loop2110C": [
                  {
                    "EQ_SubscriberEligibilityorBenefitInquiry": {
                      "ServiceTypeCode_01": [
                        "30"
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "SE": {
    "NumberofIncludedSegments_01": "13",
    "TransactionSetControlNumber_02": "1234"
  }
}

Parse and validate a 270 file

Read the file into typed objects with ediFabric .NET, convert it to JSON in process with the ediFabric Native bindings for Python, Java and C, or post it to the ediFabric Cloud REST API from any language.

using EdiFabric.Templates.Hipaa5010;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\GenericRequest.txt"))
using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa"))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TS270>())
    {
        if (transaction.IsValid(out MessageErrorContext errors))
            Console.WriteLine($"{transaction.ST.TransactionSetControlNumber_02} is valid");
        else
            Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten()));
    }
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

edi = open("GenericRequest.txt", "rb").read()
output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE)
transactions = output[:offset]
report = json.loads(output[offset:])
print(report["errors_count"])
import com.edifabric.nativex12.EdiFabricX12;
import com.edifabric.nativex12.ParseMode;
import com.edifabric.nativex12.ParseResult;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

String edi = Files.readString(Path.of("GenericRequest.txt"));
ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE);
System.out.println(result.getTransactions());
System.out.println(result.getReport());
#include "edifabric_x12.h"

const char *serial = "YOUR_SERIAL_KEY";
ef_parse_result result;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial(serial);
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

char *edi = read_file("GenericRequest.txt", NULL);   /* helper in example_all_functions.c */
if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) {
    /* transactions = output[0 .. offset), report = output[offset .. length) */
    fwrite(result.output.data, 1, (size_t)result.output.length, stdout);
    ef_free(result.output.data);
}
curl -X POST 'https://api.edination.com/v2/x12/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@GenericRequest.txt'

Generate a 270 file

Populate a TS270 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 270 file back.

using EdiFabric.Templates.Hipaa5010;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TS270();

//  Transaction Set ID Code = 270 (Eligibility, Coverage or Benefit Inquiry)
//  Transaction Set Control Number = 1234
//  Implementation Convention Reference = 005010X279A1
transaction.ST = new ST();
transaction.ST.TransactionSetIdentifierCode_01 = "270";
transaction.ST.TransactionSetControlNumber_02 = "0001";
transaction.ST.ImplementationConventionPreference_03 = "005010X279A1";

//  Hierarchical Structure Code = 0022 (Information Source, Information Receiver, Subscriber, Dependent)
//  Transaction Set Purpose Code = 13(Request) Identification
//  Reference Identification = 10001234
//  Date = 20060501(May 1, 2006)
//  Time = 1:19 PM
transaction.BHT_BeginningOfHierarchicalTransaction = new BHT_BeginningOfHierarchicalTransaction();
transaction.BHT_BeginningOfHierarchicalTransaction.HierarchicalStructureCode_01 = "0022";
transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetPurposeCode_02 = "13";
transaction.BHT_BeginningOfHierarchicalTransaction.SubmitterTransactionIdentifier_03 = "10001234";
transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetCreationDate_04 = "20060501";
transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetCreationTime_05 = "1319";

// ... set the remaining loops and segments the same way

// SegmentBuilders is in the Common project of the example repository
using (var stream = new MemoryStream())
{
    using (var writer = new X12Writer(stream))
    {
        writer.Write(SegmentBuilders.BuildIsa("1"));
        writer.Write(SegmentBuilders.BuildGs("1", "SENDER1", "RECEIVER1", "005010X279A1"));
        writer.Write(transaction);
    }
    Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

# the transactions JSON returned by ef.parse, edited or produced by your application
transactions = open("GenericRequest.json", "rb").read()
edi = ef.build(transactions, postfix="\r\n")
print(edi)
import com.edifabric.nativex12.EdiFabricX12;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

// the transactions JSON returned by parse, edited or produced by your application
String transactions = Files.readString(Path.of("GenericRequest.json"));
String edi = EdiFabricX12.build(transactions, "\r\n");
System.out.println(edi);
#include "edifabric_x12.h"

ef_buffer edi;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial("YOUR_SERIAL_KEY");
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

/* the transactions JSON returned by ef_parse, edited or produced by your application */
char *transactions = read_file("GenericRequest.json", NULL);
if (ef_build(transactions, "\r\n", &edi) == 0) {
    fwrite(edi.data, 1, (size_t)edi.length, stdout);
    ef_free(edi.data);
}
# the JSON returned by /read, edited or produced by your application
curl -X POST 'https://api.edination.com/v2/x12/write' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/json' \
--data-binary '@GenericRequest.json' \
-o 'GenericRequest.txt'

270 questions

What is the minimum data for a 270?

The payer, the provider with NPI, and enough to identify the member - usually the member ID with name and date of birth - plus at least one EQ service type code.

What does service type code 30 mean?

Health benefit plan coverage. It asks for the general benefits and returns the most common service types. Specific codes such as 88 pharmacy or 98 professional visit ask for those benefits only.

What is the response to a 270?

A 271 with the eligibility and benefit details, or AAA segments explaining why the request was rejected.

How do I parse and generate X12 270 files in .NET, Python, Java and C?

In .NET, install EdiFabric and EdiFabric.Templates.Hipaa, read the file with X12Reader into TS270 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 270 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.

Related transactions

Parse your first 270 in five minutes

The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud.