示例#1
0
        public static GridRow CreateRowForPaySplit(DataRow rowBundlePayment, PaySplit paySplit, bool isDynamic = false)
        {
            string descript = Defs.GetName(DefCat.PaymentTypes, PIn.Long(rowBundlePayment["PayType"].ToString()));

            if (rowBundlePayment["CheckNum"].ToString() != "")
            {
                descript += " #" + rowBundlePayment["CheckNum"].ToString();
            }
            descript += " " + paySplit.SplitAmt.ToString("c");
            if (PIn.Double(rowBundlePayment["PayAmt"].ToString()) != paySplit.SplitAmt)
            {
                descript += Lans.g("PayPlanL", "(split)");
            }
            GridRow row = new GridRow();

            row.Cells.Add(paySplit.DatePay.ToShortDateString());                                //0 Date
            row.Cells.Add(Providers.GetAbbr(PIn.Long(rowBundlePayment["ProvNum"].ToString()))); //1 Prov Abbr
            row.Cells.Add(descript);                                                            //2 Descript
            row.Cells.Add("");                                                                  //3 Principal
            row.Cells.Add("");                                                                  //4 Interest
            row.Cells.Add("");                                                                  //5 Due
            row.Cells.Add(paySplit.SplitAmt.ToString("n"));                                     //6 Payment
            if (!isDynamic)
            {
                row.Cells.Add("");        //7 Adjustment - Does not exist for dynamic payment plans
            }
            row.Cells.Add("");            //8 Balance (filled later)
            row.Tag       = paySplit;
            row.ColorText = Defs.GetDefByExactName(DefCat.AccountColors, "Payment").ItemColor;
            return(row);
        }
示例#2
0
        public static GridRow CreateRowForPayPlanCharge(PayPlanCharge payPlanCharge, int payPlanChargeOrdinal, bool isDynamic = false)
        {
            string descript = "#" + payPlanChargeOrdinal;

            if (payPlanCharge.Note != "")
            {
                descript += " " + payPlanCharge.Note;
                //Don't add a # if it's a recalculated charge because they aren't "true" payplan charges.
                if (payPlanCharge.Note.Trim().ToLower().Contains("recalculated based on"))
                {
                    descript = payPlanCharge.Note;
                }
            }
            GridRow row = new GridRow();                                 //Charge row

            row.Cells.Add(payPlanCharge.ChargeDate.ToShortDateString()); //0 Date
            row.Cells.Add(Providers.GetAbbr(payPlanCharge.ProvNum));     //1 Prov Abbr
            if (payPlanCharge.Principal < 0)                             //adjustment
            {
                row.Cells.Add(descript);                                 //descript -- this has to show since we don't have a type of 'adjustment'. If not, the next debit charge is one off.
                row.Cells.Add("");                                       //principal
                row.Cells.Add("");                                       //interest
                row.Cells.Add("");                                       //due
                row.Cells.Add("");                                       //payment
                if (!isDynamic)
                {
                    row.ColorText = Defs.GetDefByExactName(DefCat.AccountColors, "Adjustment").ItemColor;
                    row.Cells.Add((payPlanCharge.Principal).ToString("n"));                     //adjustment
                }
            }
            else                                                                                 //regular charge
            {
                row.Cells.Add(descript);                                                         //2 Descript
                row.Cells.Add((payPlanCharge.Principal).ToString("n"));                          //3 Principal
                row.Cells.Add(payPlanCharge.Interest.ToString("n"));                             //4 Interest
                row.Cells.Add((payPlanCharge.Principal + payPlanCharge.Interest).ToString("n")); //5 Due
                row.Cells.Add("");                                                               //6 Payment
                if (!isDynamic)                                                                  //Dynamic payment plans do not have pay plan adjustments.
                {
                    row.Cells.Add("");                                                           //7 Adjustment
                }
            }
            row.Cells.Add("");            //8 Balance (filled later)
            if (isDynamic && payPlanCharge.PayPlanChargeNum == 0)
            {
                row.ColorText = System.Drawing.Color.Gray;              //it isn't an actual charge yet, it hasn't come due and been inserted into the database.
            }
            row.Tag = payPlanCharge;
            return(row);
        }
        private void SaveTabWebSchedRecall()
        {
            WebSchedAutomaticSend sendType = WebSchedAutomaticSend.SendToEmailOnlyPreferred;

            if (radioDoNotSend.Checked)
            {
                sendType = WebSchedAutomaticSend.DoNotSend;
            }
            else if (radioSendToEmail.Checked)
            {
                sendType = WebSchedAutomaticSend.SendToEmail;
            }
            else if (radioSendToEmailNoPreferred.Checked)
            {
                sendType = WebSchedAutomaticSend.SendToEmailNoPreferred;
            }
            WebSchedAutomaticSend beforeEnum = (WebSchedAutomaticSend)PrefC.GetInt(PrefName.WebSchedAutomaticSendSetting);

            if (Prefs.UpdateInt(PrefName.WebSchedAutomaticSendSetting, (int)sendType))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched automated email preference changed from " + beforeEnum.ToString() + " to " + sendType.ToString() + ".");
            }
            WebSchedAutomaticSend sendTypeText = WebSchedAutomaticSend.SendToText;

            if (radioDoNotSendText.Checked)
            {
                sendTypeText = WebSchedAutomaticSend.DoNotSend;
            }
            beforeEnum = (WebSchedAutomaticSend)PrefC.GetInt(PrefName.WebSchedAutomaticSendTextSetting);
            if (Prefs.UpdateInt(PrefName.WebSchedAutomaticSendTextSetting, (int)sendTypeText))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched automated text preference changed from " + beforeEnum.ToString() + " to " + sendTypeText.ToString() + ".");
            }
            int beforeInt = PrefC.GetInt(PrefName.WebSchedTextsPerBatch);
            int afterInt  = PIn.Int(textWebSchedPerBatch.Text);

            if (Prefs.UpdateInt(PrefName.WebSchedTextsPerBatch, afterInt))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched batch size preference changed from " + beforeInt.ToString() + " to " + afterInt.ToString() + ".");
            }
            Prefs.UpdateBool(PrefName.WebSchedRecallAllowProvSelection, checkRecallAllowProvSelection.Checked);
            if (comboWSRConfirmStatus.SelectedIndex != -1)
            {
                Def newConfirmStatus = Defs.GetDefByExactName(DefCat.ApptConfirmed, comboWSRConfirmStatus.SelectedItem.ToString());
                Prefs.UpdateLong(PrefName.WebSchedRecallConfirmStatus, newConfirmStatus.DefNum);
            }
        }
        private void SaveTabWebSchedNewPat()
        {
            Prefs.UpdateString(PrefName.WebSchedNewPatApptMessage, textWebSchedNewPatApptMessage.Text);
            List <ClinicPref> listClinicPrefs = new List <ClinicPref>();

            foreach (Control control in panelHostedURLs.Controls)
            {
                if (control.GetType() != typeof(ContrNewPatHostedURL))
                {
                    continue;
                }
                ContrNewPatHostedURL urlPanel = (ContrNewPatHostedURL)control;
                long   clinicNum     = urlPanel.GetClinicNum();
                string allowChildren = urlPanel.GetPrefValue(PrefName.WebSchedNewPatAllowChildren);
                string verifyInfo    = urlPanel.GetPrefValue(PrefName.WebSchedNewPatVerifyInfo);
                string doAuthEmail   = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthEmail);
                string doAuthText    = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthText);
                string webFormsURL   = urlPanel.GetPrefValue(PrefName.WebSchedNewPatWebFormsURL);
                if (clinicNum == 0)
                {
                    Prefs.UpdateString(PrefName.WebSchedNewPatAllowChildren, allowChildren);
                    Prefs.UpdateString(PrefName.WebSchedNewPatVerifyInfo, verifyInfo);
                    Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail);
                    Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthText, doAuthText);
                    Prefs.UpdateString(PrefName.WebSchedNewPatWebFormsURL, webFormsURL);
                    continue;
                }
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatAllowChildren, allowChildren));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatVerifyInfo, verifyInfo));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthText, doAuthText));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatWebFormsURL, webFormsURL));
            }
            if (ClinicPrefs.Sync(listClinicPrefs, _listClinicPrefsWebSchedNewPats))
            {
                DataValid.SetInvalid(InvalidType.ClinicPrefs);
            }
            if (comboWSNPConfirmStatuses.SelectedIndex != -1)
            {
                Def newConfirmStatus = Defs.GetDefByExactName(DefCat.ApptConfirmed, comboWSNPConfirmStatuses.SelectedItem.ToString());
                Prefs.UpdateLong(PrefName.WebSchedNewPatConfirmStatus, newConfirmStatus.DefNum);
            }
            Prefs.UpdateBool(PrefName.WebSchedNewPatAllowProvSelection, checkNewPatAllowProvSelection.Checked);
        }
示例#5
0
        public static GridRow CreateRowForClaimProcs(DataRow rowBundleClaimProc, bool isDynamic = false)
        {
            //Either a claimpayment or a bundle of claimprocs with no claimpayment that were on the same date.
            string descript = Defs.GetName(DefCat.InsurancePaymentType, PIn.Long(rowBundleClaimProc["PayType"].ToString()));

            if (rowBundleClaimProc["CheckNum"].ToString() != "")
            {
                descript += " #" + rowBundleClaimProc["CheckNum"];
            }
            if (PIn.Long(rowBundleClaimProc["ClaimPaymentNum"].ToString()) == 0)
            {
                descript += "No Finalized Payment";
            }
            else
            {
                double checkAmt = PIn.Double(rowBundleClaimProc["CheckAmt"].ToString());
                descript += " " + checkAmt.ToString("c");
                double insPayAmt = PIn.Double(rowBundleClaimProc["InsPayAmt"].ToString());
                if (checkAmt != insPayAmt)
                {
                    descript += " " + Lans.g("PayPlanL", "(split)");
                }
            }
            GridRow row = new GridRow();

            row.Cells.Add(PIn.DateT(rowBundleClaimProc["DateCP"].ToString()).ToShortDateString()); //0 Date
            row.Cells.Add(Providers.GetLName(PIn.Long(rowBundleClaimProc["ProvNum"].ToString()))); //1 Prov Abbr
            row.Cells.Add(descript);                                                               //2 Descript
            row.Cells.Add("");                                                                     //3 Principal
            row.Cells.Add("");                                                                     //4 Interest
            row.Cells.Add("");                                                                     //5 Due
            row.Cells.Add(PIn.Double(rowBundleClaimProc["InsPayAmt"].ToString()).ToString("n"));   //6 Payment
            if (!isDynamic)
            {
                row.Cells.Add("");        //7 Adjustment
            }
            row.Cells.Add("");            //8 Balance (filled later)
            row.Tag       = rowBundleClaimProc;
            row.ColorText = Defs.GetDefByExactName(DefCat.AccountColors, "Insurance Payment").ItemColor;
            return(row);
        }