Esempio n. 1
0
        ///<summary>If given claim!=null, attempts to open the patient select and claim select windows.
        ///Sets isAttachNeeded to true if user went through full patient and claim selection logic, claim was not null when provided.
        ///Returns false if user does not select a claim.</summary>
        private Claim ClaimSelectionHelper(Hx835_Claim claimPaid)
        {
            PtTableSearchParams ptTableSearchParams = new PtTableSearchParams(false, claimPaid.PatientName.Lname, claimPaid.PatientName.Fname, "", "", false,
                                                                              "", "", "", "", "", 0, false, false, DateTime.MinValue, 0, "", "", "", "", "", "", "");
            DataTable ptTable        = Patients.GetPtDataTable(ptTableSearchParams);   //Mimics FormPatientSelect.cs
            long      selectedPatNum = 0;

            if (ptTable.Rows.Count == 1)
            {
                selectedPatNum = PIn.Long(ptTable.Rows[0]["PatNum"].ToString());
            }
            FormEtrans835ClaimSelect eTransClaimSelect = new FormEtrans835ClaimSelect(selectedPatNum, claimPaid);

            eTransClaimSelect.ShowDialog();
            if (eTransClaimSelect.DialogResult != DialogResult.OK)
            {
                return(null);
            }
            Claim claim = eTransClaimSelect.ClaimSelected;                                                    //Set claim so below we can act if a claim was already linked.

            if (!String.IsNullOrEmpty(claimPaid.ClaimTrackingNumber) && claimPaid.ClaimTrackingNumber != "0") //Claim was not printed, it is an eclaim.
            {
                claim.ClaimIdentifier = claimPaid.ClaimTrackingNumber;                                        //Already checked DOS and ClaimFee, update claim identifier to link claims.
                Claims.UpdateClaimIdentifier(claim.ClaimNum, claim.ClaimIdentifier);                          //Update DB
            }
            return(claim);
        }