Exemplo n.º 1
0
        ///<summary>Creates patients with billing cycle day. Sets BillingUseBillingCycleDay preference to true. Creates an UpdateHistory
        ///entry for version 16.1.1.0. Deletes all current repeat charges.</summary>
        public Patient CreatePatForRepeatCharge(string suffix, int billingCycleDay)
        {
            Patient pat    = PatientT.CreatePatient(suffix);
            Patient patOld = pat.Copy();

            pat.BillingCycleDay = billingCycleDay;
            Patients.Update(pat, patOld);
            PrefT.UpdateBool(PrefName.BillingUseBillingCycleDay, true);
            UpdateHistoryT.CreateUpdateHistory("16.1.1.0");
            Prefs.RefreshCache();
            List <RepeatCharge> listRepeatingCharges = RepeatCharges.Refresh(0).ToList();

            listRepeatingCharges.ForEach(x => RepeatCharges.Delete(x));
            return(pat);
        }