The 277 (005010X212) is the payer's response to a 276 claim status request. It tells the provider where a claim is in adjudication: pending, finalized, paid or denied.
The response follows the request's hierarchy of information source, receiver, service provider, subscriber and dependent, and reports each claim with STC status segments and the payer's claim identifiers.
005010X212HN (GS01)TS277 in EdiFabric.Templates.HipaaThe full X12 277 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 16 loops and 44 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 |
|---|---|---|---|
ST | Transaction Set Header | Required | 1 |
BHT | Beginning of Hierarchical Transaction | Required | 1 |
| Loop 2000A | Information Source Level | Required | >1 |
HL | Information Source Level | Required | 1 |
| Loop 2100A | Payer Name | Required | 1 |
NM1 | Payer Name | Required | 1 |
PER | Payer Contact Information | Situational | 1 |
| Loop 2000B | Information Receiver Level | Required | >1 |
HL | Information Receiver Level | Required | 1 |
| Loop 2100B | Information Receiver Name | Required | 1 |
NM1 | Information Receiver Name | Required | 1 |
| Loop 2200B | Information Receiver Trace Identifier | Situational | 1 |
TRN | Information Receiver Trace Identifier | Required | 1 |
STC | Information Receiver Status Information | Required | >1 |
| Loop 2000C | Service Provider Level | Situational | >1 |
HL | Service Provider Level | Required | 1 |
| Loop 2100C | Provider Name | Required | 2 |
NM1 | Provider Name | Required | 1 |
| Loop 2200C | Providerof Service Trace Identifier | Situational | 1 |
TRN | Providerof Service Trace Identifier | Required | 1 |
STC | Provider Status Information | Required | >1 |
| Loop 2000D | Subscriber Level | Situational | >1 |
HL | Subscriber Level | Required | 1 |
| Loop 2100D | Subscriber Name | Required | 1 |
NM1 | Subscriber Name | Required | 1 |
| Loop 2200D | Claim Status Tracking Number | Situational | >1 |
TRN | Claim Status Tracking Number | Required | 1 |
STC | Claim Level Status Information | Required | >1 |
| Any order | The loops below can appear in any order | Situational | 1 |
REF | Payer Claim Control Number | Situational | 1 |
REF | Institutional Bill Type Identification | Situational | 1 |
REF | Patient Control Number | Situational | 1 |
REF | Pharmacy Prescription Number | Situational | 1 |
REF | Voucher Identifier | Situational | 1 |
REF | Claim Identification Number for Clearinghouses and Other Transmisson Intermediaries | Situational | 1 |
DTP | Claim Service Date | Situational | 1 |
| Loop 2220D | Service Line Information | Situational | >1 |
SVC | Service Line Information | Required | 1 |
STC | Service Line Status Information | Required | >1 |
REF | Service Line Item Identification | Situational | 1 |
DTP | Service Line Date | Required | 1 |
| Loop 2000E | Dependent Level | Situational | >1 |
HL | Dependent Level | Required | 1 |
| Loop 2100E | Dependent Name | Required | 1 |
NM1 | Dependent Name | Required | 1 |
| Loop 2200E | Claim Status Tracking Number | Required | >1 |
TRN | Claim Status Tracking Number | Required | 1 |
STC | Claim Level Status Information | Required | >1 |
| Any order | The loops below can appear in any order | Situational | 1 |
REF | Payer Claim Control Number | Situational | 1 |
REF | Institutional Bill Type Identification | Situational | 1 |
REF | Patient Control Number | Situational | 1 |
REF | Pharmacy Prescription Number | Situational | 1 |
REF | Voucher Identifier | Situational | 1 |
REF | Claim Identification Number for Clearinghouses and Other Transmisson Intermediaries | Situational | 1 |
DTP | Claim Service Date | Situational | 1 |
| Loop 2220E | Service Line Information | Situational | >1 |
SVC | Service Line Information | Required | 1 |
STC | Service Line Status Information | Required | >1 |
REF | Service Line Item Identification | Situational | 1 |
DTP | Service Line Date | Required | 1 |
SE | Transaction Set Trailer | Required | 1 |
Usage follows the 005010X212 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.
A claim status response with STC status codes for the requested claims. 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*005010X212~ ST*277*0001*005010X212~ BHT*0010*08*277X212*20050916*0810*DG~ HL*1**20*1~ NM1*PR*2*ABC INSURANCE*****PI*12345~ HL*2*1*21*1~ NM1*41*2*XYZ SERVICE*****46*X67E~ HL*3*2*19*1~ NM1*1P*2*HOME HOSPITAL*****XX*1666666661~ HL*4*3*22*0~ NM1*IL*1*SMITH*FRED****MI*123456789A~ TRN*2*ABCXYZ1~ STC*P3:317*20050913**8513.88~ REF*1K*05347006051~ REF*BLT*111~ REF*EJ*SM123456~ DTP*472*RD8*20050831-20050906~ HL*5*3*22*0~ NM1*IL*1*JONES*MARY****MI*234567890A~ TRN*2*ABCXYZ2~ STC*F0:3*20050915**7599*7599~ REF*1K*0529675341~ REF*BLT*111~ REF*EJ*JO234567~ DTP*472*RD8*20050731-20050809~ HL*6*2*19*1~ NM1*1P*2*HOME HOSPITAL PHYSICIANS*****XX*1666666666~ HL*7*6*22*1~ NM1*IL*1*MANN*JOHN****MI*345678901~ HL*8*7*23~ NM1*QC*1*MANN*JOSEPH~ TRN*2*ABCXYC3~ STC*F2:88:QC*20050612**150*0~ REF*1K*051681010827~ REF*EJ*MA345678~ SVC*HC:99203*150*0****1~ STC*F2:88:QC*20050612~ DTP*472*D8*20050501~ SE*38*0001~ GE*1*101~ IEA*1*000000101~
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": "277",
"TransactionSetControlNumber_02": "0001",
"ImplementationConventionPreference_03": "005010X212"
},
"BHT_BeginningOfHierarchicalTransaction": {
"HierarchicalStructureCode_01": "0010",
"TransactionSetPurposeCode_02": "08",
"SubmitterTransactionIdentifier_03": "277X212",
"TransactionSetCreationDate_04": "20050916",
"TransactionSetCreationTime_05": "0810",
"TransactionTypeCode_06": "DG"
},
"Loop2000A": [
{
"HL_InformationSourceLevel": {
"HierarchicalIDNumber_01": "1",
"HierarchicalLevelCode_03": "20",
"HierarchicalChildCode_04": "1"
},
"Loop2100A": {
"NM1_PayerName": {
"EntityIdentifierCode_01": "PR",
"EntityTypeQualifier_02": "2",
"ResponseContactLastorOrganizationName_03": "ABC INSURANCE",
"IdentificationCodeQualifier_08": "PI",
"ResponseContactIdentifier_09": "12345"
}
},
"Loop2000B": [
{
"HL_InformationReceiverLevel": {
"HierarchicalIDNumber_01": "2",
"HierarchicalParentIDNumber_02": "1",
"HierarchicalLevelCode_03": "21",
"HierarchicalChildCode_04": "1"
},
"Loop2100B": {
"NM1_InformationReceiverName": {
"EntityIdentifierCode_01": "41",
"EntityTypeQualifier_02": "2",
"ResponseContactLastorOrganizationName_03": "XYZ SERVICE",
"IdentificationCodeQualifier_08": "46",
"ResponseContactIdentifier_09": "X67E"
}
},
"Loop2000C": [
{
"HL_ServiceProviderLevel": {
"HierarchicalIDNumber_01": "3",
"HierarchicalParentIDNumber_02": "2",
"HierarchicalLevelCode_03": "19",
"HierarchicalChildCode_04": "1"
},
"Loop2100C": [
{
"NM1_ProviderName": {
"EntityIdentifierCode_01": "1P",
"EntityTypeQualifier_02": "2",
"ResponseContactLastorOrganizationName_03": "HOME HOSPITAL",
"IdentificationCodeQualifier_08": "XX",
"ResponseContactIdentifier_09": "1666666661"
}
}
],
"Loop2000D": [
{
"HL_SubscriberLevel": {
"HierarchicalIDNumber_01": "4",
"HierarchicalParentIDNumber_02": "3",
"HierarchicalLevelCode_03": "22",
"HierarchicalChildCode_04": "0"
},
"Loop2100D": {
"NM1_SubscriberName": {
"EntityIdentifierCode_01": "IL",
"EntityTypeQualifier_02": "1",
"ResponseContactLastorOrganizationName_03": "SMITH",
"ResponseContactFirstName_04": "FRED",
"IdentificationCodeQualifier_08": "MI",
"ResponseContactIdentifier_09": "123456789A"
}
},
"Loop2200D": [
{
"TRN_ClaimStatusTrackingNumber": {
"TraceTypeCode_01": "2",
"CurrentTransactionTraceNumber_02": "ABCXYZ1"
},
"STC_ClaimLevelStatusInformation": [
{
"HealthCareClaimStatus_01": {
"HealthCareClaimStatusCategoryCode_01": "P3",
"StatusCode_02": "317"
},
"Date_02": "20050913",
"TotalSubmittedChargesForUnitWork_04": "8513.88"
}
],
"AllREF": {
"REF_PayerClaimControlNumber": {
"ReferenceIdentificationQualifier_01": "1K",
"MemberGrouporPolicyNumber_02": "05347006051"
},
"REF_InstitutionalBillTypeIdentification": {
"ReferenceIdentificationQualifier_01": "BLT",
"MemberGrouporPolicyNumber_02": "111"
},
"REF_PatientControlNumber": {
"ReferenceIdentificationQualifier_01": "EJ",
"MemberGrouporPolicyNumber_02": "SM123456"
}
},
"DTP_ClaimServiceDate": {
"DateTimeQualifier_01": "472",
"DateTimePeriodFormatQualifier_02": "RD8",
"DateTimePeriod_03": "20050831-20050906"
}
}
]
},
{
"HL_SubscriberLevel": {
"HierarchicalIDNumber_01": "5",
"HierarchicalParentIDNumber_02": "3",
"HierarchicalLevelCode_03": "22",
"HierarchicalChildCode_04": "0"
},
"Loop2100D": {
"NM1_SubscriberName": {
"EntityIdentifierCode_01": "IL",
"EntityTypeQualifier_02": "1",
"ResponseContactLastorOrganizationName_03": "JONES",
"ResponseContactFirstName_04": "MARY",
"IdentificationCodeQualifier_08": "MI",
"ResponseContactIdentifier_09": "234567890A"
}
},
"Loop2200D": [
{
"TRN_ClaimStatusTrackingNumber": {
"TraceTypeCode_01": "2",
"CurrentTransactionTraceNumber_02": "ABCXYZ2"
},
"STC_ClaimLevelStatusInformation": [
{
"HealthCareClaimStatus_01": {
"HealthCareClaimStatusCategoryCode_01": "F0",
"StatusCode_02": "3"
},
"Date_02": "20050915",
"TotalSubmittedChargesForUnitWork_04": "7599",
"MonetaryAmount_05": "7599"
}
],
"AllREF": {
"REF_PayerClaimControlNumber": {
"ReferenceIdentificationQualifier_01": "1K",
"MemberGrouporPolicyNumber_02": "0529675341"
},
"REF_InstitutionalBillTypeIdentification": {
"ReferenceIdentificationQualifier_01": "BLT",
"MemberGrouporPolicyNumber_02": "111"
},
"REF_PatientControlNumber": {
"ReferenceIdentificationQualifier_01": "EJ",
"MemberGrouporPolicyNumber_02": "JO234567"
}
},
"DTP_ClaimServiceDate": {
"DateTimeQualifier_01": "472",
"DateTimePeriodFormatQualifier_02": "RD8",
"DateTimePeriod_03": "20050731-20050809"
}
}
]
}
]
},
{
"HL_ServiceProviderLevel": {
"HierarchicalIDNumber_01": "6",
"HierarchicalParentIDNumber_02": "2",
"HierarchicalLevelCode_03": "19",
"HierarchicalChildCode_04": "1"
},
"Loop2100C": [
{
"NM1_ProviderName": {
"EntityIdentifierCode_01": "1P",
"EntityTypeQualifier_02": "2",
"ResponseContactLastorOrganizationName_03": "HOME HOSPITAL PHYSICIANS",
"IdentificationCodeQualifier_08": "XX",
"ResponseContactIdentifier_09": "1666666666"
}
}
],
"Loop2000D": [
{
"HL_SubscriberLevel": {
"HierarchicalIDNumber_01": "7",
"HierarchicalParentIDNumber_02": "6",
"HierarchicalLevelCode_03": "22",
"HierarchicalChildCode_04": "1"
},
"Loop2100D": {
"NM1_SubscriberName": {
"EntityIdentifierCode_01": "IL",
"EntityTypeQualifier_02": "1",
"ResponseContactLastorOrganizationName_03": "MANN",
"ResponseContactFirstName_04": "JOHN",
"IdentificationCodeQualifier_08": "MI",
"ResponseContactIdentifier_09": "345678901"
}
},
"Loop2000E": [
{
"HL_DependentLevel": {
"HierarchicalIDNumber_01": "8",
"HierarchicalParentIDNumber_02": "7",
"HierarchicalLevelCode_03": "23"
},
"Loop2100E": {
"NM1_DependentName": {
"EntityIdentifierCode_01": "QC",
"EntityTypeQualifier_02": "1",
"ResponseContactLastorOrganizationName_03": "MANN",
"ResponseContactFirstName_04": "JOSEPH"
}
},
"Loop2200E": [
{
"TRN_ClaimStatusTrackingNumber": {
"TraceTypeCode_01": "2",
"CurrentTransactionTraceNumber_02": "ABCXYC3"
},
"STC_ClaimLevelStatusInformation": [
{
"HealthCareClaimStatus_01": {
"HealthCareClaimStatusCategoryCode_01": "F2",
"StatusCode_02": "88",
"EntityIdentifierCode_03": "QC"
},
"Date_02": "20050612",
"TotalSubmittedChargesForUnitWork_04": "150",
"MonetaryAmount_05": "0"
}
],
"AllREF": {
"REF_PayerClaimControlNumber": {
"ReferenceIdentificationQualifier_01": "1K",
"MemberGrouporPolicyNumber_02": "051681010827"
},
"REF_PatientControlNumber": {
"ReferenceIdentificationQualifier_01": "EJ",
"MemberGrouporPolicyNumber_02": "MA345678"
}
},
"Loop2220E": [
{
"SVC_ServiceLineInformation": {
"CompositeMedicalProcedureIdentifier_01": {
"ProductorServiceIDQualifier_01": "HC",
"ProcedureCode_02": "99203"
},
"LineItemChargeAmount_02": "150",
"MonetaryAmount_03": "0",
"UnitsofServiceCount_07": "1"
},
"STC_ServiceLineStatusInformation": [
{
"HealthCareClaimStatus_01": {
"HealthCareClaimStatusCategoryCode_01": "F2",
"StatusCode_02": "88",
"EntityIdentifierCode_03": "QC"
},
"Date_02": "20050612"
}
],
"DTP_ServiceLineDate": {
"DateTimeQualifier_01": "472",
"DateTimePeriodFormatQualifier_02": "D8",
"DateTimePeriod_03": "20050501"
}
}
]
}
]
}
]
}
]
}
]
}
]
}
],
"SE": {
"NumberofIncludedSegments_01": "38",
"TransactionSetControlNumber_02": "0001"
}
}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\ResponseTransmission.txt")) using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa")) { var items = await reader.ReadToEndAsync(); foreach (var transaction in items.OfType<TS277>()) { 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("ResponseTransmission.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("ResponseTransmission.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("ResponseTransmission.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 '@ResponseTransmission.txt'
Populate a TS277 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 277 file back.
using EdiFabric.Templates.Hipaa5010; License.SetSerial("YOUR_SERIAL_KEY"); var transaction = new TS277(); transaction.ST = new ST(); transaction.ST.TransactionSetIdentifierCode_01 = "277"; transaction.ST.TransactionSetControlNumber_02 = "0001"; transaction.ST.ImplementationConventionPreference_03 = "005010X212"; transaction.BHT_BeginningOfHierarchicalTransaction = new BHT_BeginningOfHierarchicalTransaction_4(); transaction.BHT_BeginningOfHierarchicalTransaction.HierarchicalStructureCode_01 = "0010"; transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetPurposeCode_02 = "08"; transaction.BHT_BeginningOfHierarchicalTransaction.SubmitterTransactionIdentifier_03 = "277X212"; transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetCreationDate_04 = "20050916"; transaction.BHT_BeginningOfHierarchicalTransaction.TransactionSetCreationTime_05 = "0810"; transaction.BHT_BeginningOfHierarchicalTransaction.TransactionTypeCode_06 = "DG"; // Repeating 2000A Loops transaction.Loop2000A = new List<Loop_2000A_277>(); // Begin 2000A Loop var loop2000A = new Loop_2000A_277(); // ... 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", "005010X212")); 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("ResponseTransmission.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("ResponseTransmission.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("ResponseTransmission.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 '@ResponseTransmission.json' \ -o 'ResponseTransmission.txt'
STC01-1 is the claim status category code, for example P1 pending, F1 finalized/payment, F2 finalized/denial. STC01-2 is the detailed claim status code.
The 005010X212 response is. Payers can also send unsolicited 277 status notifications, and the 277CA (005010X214) acknowledges submitted claims.
Yes. Many payers support real-time claim status inquiries in addition to batch files.
In .NET, install EdiFabric and EdiFabric.Templates.Hipaa, read the file with X12Reader into TS277 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 277 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.