Пример #1
0
  @Override
  public void processSegmentList(List<Segment> in) {
    Segment CLP = X12Message.findSegmentByComparator(in, new SegmentComparator("CLP"));
    this.claimId = X12Message.getSafeElement(CLP, 1);
    this.claimCode = Integer.parseInt(X12Message.getSafeElement(CLP, 2));
    switch (this.claimCode.intValue()) {
      case 1:
        this.claimStatus = "PROCESSED: PRIMARY";
        break;
      case 2:
        this.claimStatus = "PROCESSED: SECONDARY";
        break;
      case 3:
        this.claimStatus = "PROCESSED: TERTIARY";
        break;
      case 4:
        this.claimStatus = "DENIED";
        break;
      case 5:
        this.claimStatus = "PENDED";
        break;
      case 10:
        this.claimStatus = "RECEIVED, NOT IN PROCESS";
        break;
      case 13:
        this.claimStatus = "SUSPENDED";
        break;
      case 15:
        this.claimStatus = "SUSPENDED, INVESTIGATION";
        break;
      case 16:
        this.claimStatus = "SUSPENDED, RETURN WITH MATERIAL";
        break;
      case 17:
        this.claimStatus = "SUSPENDED, REVIEW PENDING";
        break;
      case 19:
        this.claimStatus = "PROCESSED: PRIMARY, FORWARDED TO OTHER PAYER";
        break;
      case 20:
        this.claimStatus = "PROCESSED: SECONDARY, FORWARDED TO OTHER PAYER";
        break;
      default:
        break;
    }

    this.claimTotalAmount = Double.parseDouble(X12Message.getSafeElement(CLP, 3));
    this.claimPaidAmount = Double.parseDouble(X12Message.getSafeElement(CLP, 4));
    this.claimPatientResponsibilityAmount = Double.parseDouble(X12Message.getSafeElement(CLP, 5));
    this.claimType = X12Message.getSafeElement(CLP, 6);

    List<Amount> a = new ArrayList<Amount>();
    List<Segment> AMTs = X12Message.findSegmentsByComparator(in, new SegmentComparator("AMT"));
    for (Segment AMT : AMTs) {
      Amount e = new Amount(AMT);
      a.add(e);
    }
    this.amounts = a;

    this.patient = new Patient(in);
    this.insured = new Insured(in);
  }
Пример #2
0
 @Override
 public String toString() {
   return X12Message.serializeDTO(this);
 }