Update: 2023-03-08
277 - Claim Acknowledgement
Important
Bishop's X12 NET SDK adheres to the 277 Health Care Claim Acknowledgement for Healthcare Insurance (January 2007) as defined in the ASC X12N/005010X214, Version 5, Release 1, ASC X12 Standards for Electronic Data Interchange, Technical Report Type 3 Implementation Guide.
Please obtain and reference this implementation guide for a detailed explanation of the 277 transaction set and to understand how it defines uniform data content, identifies valid code tables and specifies values applicable for the business focus of the 277.
Note
The word "claim" and "bill" are synonymous within this context.
The 277 is a business application acknowledgement for the 837 transaction. It acknowledges the validity and acceptability of the bill at the pre-processing stage.
Trading entities may pre-process bills to determine whether or not to introduce them to an adjudication system. This pre-adjudication process is performed so bills that are missing information or have invalid information can be corrected and resubmitted by the sender.
The level of editing in pre-adjudication programs will vary from system to system. Although the level of editing may vary, this transaction provides a standard method of reporting acknowledgement of bills. The business function identifies bills that are accepted for adjudication as well as those that are not accepted.
Warning
The 277 transaction is the only notification of pre-adjudication bill status. Bills failing the pre-adjudication editing process are not forwarded to the claim adjudication system and therefore are never reported in the ASC X12 Health Care Claim Payment/Advice (835). Claims passing the pre-adjudication editing process are forwarded to the claims adjudication system and handled according to claims processing guidelines where final adjudication of a bill is reported in the 835.
Generating the 277 for an 837
public void Load837()
{
try
{
// 837 file to load
string filename = @"C:\Temp\ClaimPro.837";
// Load an 837 transaction
using X12Doc x837 = X12Doc.Load(filename);
// Generate the 999 transaction in response to the 837. If the 837 contains interchange errors
// the 999 will only contain the ISA/TA1/IEA interchange segments where the TA1 will indicate
// the error as to why the 837 could not be processed.
//
// If the 837 does not contain interchange errors and the 837 contains a request for a TA1 segment
// (see ISA14) then the TA1 will be placed immediately after the ISA segment followed by the
// remainder of the appropriate 999 segments.
// if the 837 does not contain interchange errors and the 837 does not request a TA1 segment
// then only the appropriate 999 segments.
using X12Doc x999 = x837.Generate999(1);
x999.Save(filename + ".999", X12DocOptions.InsertCrLf);
}
catch (X12Exception e)
{
Console.WriteLine(e.ToString());
}
}
Consuming the 277
public void Consume999()
{
try
{
// 999 file to load
string filename = @"C:\Temp\ClaimPro.837.999";
// Load an 999 transaction
using X12Doc x999 = X12Doc.Load(filename);
Console.WriteLine($"Cntl#:{x999.ControlNumber} Date:{x999.DateTime} Sender:{x999.SenderETIN}");
// Assign the 999 helper to tSet
X12TA1Helper hTA1 = new(x999);
// If the 999 contains a TA1 segment (it should if you requested one in ISA14. Then the next line will provide information
// regarding the original transaction that this 999 is responding to. If a TA1 segment is not present then the original transaction
// is assumed to have been accepted.
if (hTA1.OrigInterchangeStatus != X12DocAck.NotSet)
{
Console.WriteLine($"Response to: Orig Cntl#:{hTA1.OrigInterchangeControlNumber} Orig Date:{hTA1.OrigInterchangeDateTime} Error:{hTA1.OrigError} Message:{hTA1.OrigMessage}");
Console.WriteLine();
}
foreach (X12Group grp in x999.Groups())
{
foreach (X12Transaction ts in grp.Transactions())
{
X12999Helper h999 = new(ts);
Console.WriteLine($"G:{h999.Type}:{h999.Version} Ctrl#:{h999.ControlNumber} Status:{h999.Status} Included:{h999.Included} Received:{h999.Received} Accepted:{h999.Accepted}");
foreach (X12999TsAck tsAck in h999.GetTsAcks().Where(t => t.Status == X12TsAck.Rejected))
{
Console.WriteLine($"T:{tsAck.Type}:{tsAck.Version} Cntl#:{tsAck.ControlNumber} Status:{tsAck.Status} Errors:{tsAck.SegmentErrors().Count()} ");
foreach (var ec in tsAck.ErrorCodes())
Console.WriteLine($"{ec} ");
foreach (X12999SegError se in tsAck.SegmentErrors())
{
if(!string.IsNullOrWhiteSpace(se.BusinessId))
Console.WriteLine($"\tBusiness Id:{se.BusinessId}");
Console.WriteLine($"\t{se.RefId} Pos:{se.PosInTSet} Error:{se.Error}");
foreach (X12999Ctx ctx in se.Context())
Console.WriteLine($"\tCTX: Seg:{ctx.SegId} Loop:{ctx.LoopId} PosInTSet:{ctx.PosInTSet} PosInSeg:{ctx.PosInSeg}(DEN:{ctx.DEN}) PosInEle:{ctx.PosInEle}(DEN:{ctx.CeDEN})");
foreach (X12999EleError ee in se.ElementErrors())
{
Console.WriteLine($"\t\t{se.SegId}{ee.RefId} {ee.Description} Error:{ee.Error} BadData:{ee.BadData}");
foreach (X12999Ctx ctx in ee.Context())
Console.WriteLine($"\t\t{ctx.DENDescription}");
}
}
}
}
}
}
catch (X12Exception e)
{
Console.WriteLine(e.ToString());
}
}