Example #1
0
 ///<summary>ListRows and ListClaimsPaid must be 1:1 and in the same order.</summary>
 private void SetClaimDetailRows(List <GridRow> listRows, List <Hx835_Claim> listClaimsPaid, bool isRefreshNeeded = false)
 {
     if (isRefreshNeeded)
     {
         RefreshFromDb();
     }
     for (int i = 0; i < listRows.Count; i++)
     {
         UI.GridRow  row       = listRows[i];
         Hx835_Claim claimPaid = listClaimsPaid[i];
         row.Tag = claimPaid;
         row.Cells.Clear();
         string claimStatus = "";
         if (claimPaid.IsProcessed(_listClaimProcs, _listAttaches))
         {
             claimStatus = "X";
         }
         else if (claimPaid.IsAttachedToClaim && claimPaid.ClaimNum == 0)
         {
             claimStatus = "N/A";                  //User detached claim manually.
         }
         row.Cells.Add(claimStatus);
         row.Cells.Add(new UI.GridCell(claimPaid.PatientName.ToString()));                //Patient
         string strDateService = claimPaid.DateServiceStart.ToShortDateString();
         if (claimPaid.DateServiceEnd > claimPaid.DateServiceStart)
         {
             strDateService += " to " + claimPaid.DateServiceEnd.ToShortDateString();
         }
         row.Cells.Add(new UI.GridCell(strDateService));                             //DateService
         row.Cells.Add(new UI.GridCell(claimPaid.ClaimTrackingNumber));              //Claim Identfier
         row.Cells.Add(new UI.GridCell(claimPaid.PayerControlNumber));               //PayorControlNum
         row.Cells.Add(new UI.GridCell(claimPaid.StatusCodeDescript));               //Status
         row.Cells.Add(new UI.GridCell(claimPaid.ClaimFee.ToString("f2")));          //ClaimFee
         row.Cells.Add(new UI.GridCell(claimPaid.InsPaid.ToString("f2")));           //InsPaid
         row.Cells.Add(new UI.GridCell(claimPaid.PatientPortionAmt.ToString("f2"))); //PatPort
         row.Cells.Add(new UI.GridCell(claimPaid.PatientDeductAmt.ToString("f2")));  //Deduct
         row.Cells.Add(new UI.GridCell(claimPaid.WriteoffAmt.ToString("f2")));       //Writeoff
     }
 }
Example #2
0
        private void gridClaimDetails_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            Hx835_Claim claimPaid      = (Hx835_Claim)gridClaimDetails.ListGridRows[e.Row].Tag;
            Claim       claim          = claimPaid.GetClaimFromDb();
            bool        isAttachNeeded = (!claimPaid.IsAttachedToClaim);

            if (claim == null)           //Not found in db.
            {
                claim = ClaimSelectionHelper(claimPaid);
                if (claim != null)               //A claim was selected.
                {
                    isAttachNeeded = true;       //Hard attach selected claim to db claim, since user manually picked matching claim.
                }
            }
            if (claim == null)           //Claim not found and user did not select one.
            {
                return;
            }
            //From this point on claim is not null.
            bool isReadOnly = true;

            CreateAttachForClaim(claimPaid, claim.ClaimNum, isAttachNeeded);
            if (claimPaid.IsSplitClaim)
            {
                //Sync ClaimNum for all split claims in the same group, based on user selection.
                claimPaid.GetOtherNotDetachedSplitClaims()
                .ForEach(x => CreateAttachForClaim(x, claim.ClaimNum, isAttachNeeded));
            }
            if (claimPaid.IsProcessed(_listClaimProcs, _listAttaches))
            {
                //If the claim is already received, then we do not allow the user to enter payments.
                //The user can edit the claim to change the status from received if they wish to enter the payments again.
                if (Security.IsAuthorized(Permissions.ClaimView))
                {
                    Patient       pat    = Patients.GetPat(claim.PatNum);
                    Family        fam    = Patients.GetFamily(claim.PatNum);
                    FormClaimEdit formCE = new FormClaimEdit(claim, pat, fam);
                    formCE.ShowDialog();                    //Modal, because the user could edit information in this window.
                }
                isReadOnly = false;
            }
            else if (Security.IsAuthorized(Permissions.InsPayCreate))             //Claim found and is not received.  Date not checked here, but it will be checked when actually creating the check.
            {
                EtransL.ImportEraClaimData(_x835, claimPaid, claim, false);
                RefreshFromDb();                //ClaimProcs could have been split, need to refresh both claimProc list and attaches.
                isReadOnly = false;
            }
            if (isReadOnly)
            {
                FormEtrans835ClaimEdit formC = new FormEtrans835ClaimEdit(_x835, claimPaid);
                formC.Show(this);                //This window is just used to display information.
            }
            if (!gridClaimDetails.IsDisposed)    //Not sure how the grid is sometimes disposed, perhaps because of it being non-modal.
            //Refresh the claim detail row in case something changed above.
            {
                gridClaimDetails.BeginUpdate();
                List <GridRow> listRows = new List <GridRow>()
                {
                    gridClaimDetails.ListGridRows[e.Row]
                };                                          //Row associated to claimPaid
                if (claimPaid.IsSplitClaim)                 //Need to update multiple rows.
                {
                    List <Hx835_Claim> listOtherSplitClaims = claimPaid.GetOtherNotDetachedSplitClaims();
                    List <GridRow>     listAdditionalRows   = gridClaimDetails.ListGridRows
                                                              .Where(x =>
                                                                     x != gridClaimDetails.ListGridRows[e.Row] &&
                                                                     listOtherSplitClaims.Contains((Hx835_Claim)x.Tag)
                                                                     ).ToList();
                    listRows.AddRange(listAdditionalRows);
                }
                SetClaimDetailRows(listRows, listRows.Select(x => (Hx835_Claim)x.Tag).ToList(), true);
                gridClaimDetails.EndUpdate();
            }
        }
Example #3
0
 public void X835_IsProcessed_NoSupplemental()
 {
     //Must enter payment to match claim procs since they consider financial information.
     TryEnterPayment(_x835, _eraJustinSmithClaim, _claimPrimaryJustinSmith, true);         //Will return if payment already entered.
     Assert.AreEqual(true, _eraJustinSmithClaim.IsProcessed(ClaimProcs.Refresh(_claimPrimaryJustinSmith.PatNum), _listEtrans835Attaches));
 }