///<summary>In realtime mode, X12 limits the request to one patient. We will always use the subscriber. So all EB segments are for the subscriber.</summary> public List<EB271> GetListEB(bool isInNetwork) { List<EB271> retVal=new List<EB271>(); EB271 eb=null; for(int i=0;i<Segments.Count;i++) { //loop until we encounter the first EB if(Segments[i].SegmentID!="EB" && eb==null) { continue; } if(Segments[i].SegmentID=="EB") { //add the previous eb if(eb!=null) { retVal.Add(eb); } //then, start the next one eb=new EB271(Segments[i],isInNetwork); continue; } else if(Segments[i].SegmentID=="SE") {//end of benefits retVal.Add(eb); break; } else {//add to existing eb eb.SupplementalSegments.Add(Segments[i]); continue; } } return retVal; }
internal bool IsValidForBatchVerification(List <EB271> listBenefits, bool isCoinsuranceInverted, out string errorMsg) { errorMsg = this.GetProcessingError(); if (errorMsg != "") { return(false); } if (listBenefits.Count == 0) { errorMsg = "No benefits reported."; return(false); } else if (listBenefits.Count == 1) { EB271 eb271 = listBenefits[0]; switch (eb271.Segment.Elements[1]) { case "U": //Contact Following Entity for Information for Eligibility or Benefit Information errorMsg = "Contact carrier for more information."; //There will be an MSG segment following this. X12Segment msgSegment = eb271.SupplementalSegments.FirstOrDefault(x => x.SegmentID == "MSG"); if (msgSegment != null) { errorMsg += "\r\n" + msgSegment.Get(1); } break; //The following codes have not been reported as of yet. case "6": //Inactive case "7": //Inactive - Pending Eligibility Update case "8": //Inactive - Pending Investigation case "T": //Card(s) Reported Lost/Stolen case "V": //Cannot Process errorMsg = eb271.GetEB01Description(eb271.Segment.Elements[1]); //Returns null if given code is not known. break; default: //Intentionally blank, most other EB01 codes are not easily identified as errors. break; } } return(errorMsg.IsNullOrEmpty()); }
///<summary>In realtime mode, X12 limits the request to one patient. We will always use the subscriber. So all EB segments are for the subscriber.</summary> public List <EB271> GetListEB(bool isInNetwork, bool isCoinsuranceInverted) { List <EB271> retVal = new List <EB271>(); EB271 eb = null; for (int i = 0; i < Segments.Count; i++) { //loop until we encounter the first EB if (Segments[i].SegmentID != "EB" && eb == null) { continue; } if (Segments[i].SegmentID == "EB") { //add the previous eb if (eb != null) { retVal.Add(eb); } X12Segment hsdSeg = null; if (Segments[i + 1].SegmentID == "HSD") { hsdSeg = Segments[i + 1]; } //then, start the next one eb = new EB271(Segments[i], isInNetwork, isCoinsuranceInverted, hsdSeg); continue; } else if (Segments[i].SegmentID == "SE") //end of benefits { retVal.Add(eb); break; } else //add to existing eb { eb.SupplementalSegments.Add(Segments[i]); continue; } } return(retVal); }