예제 #1
0
 private void FormRpProcCodes_Load(object sender, System.EventArgs e)
 {
     _listFeeScheds = FeeScheds.GetDeepCopy(true);
     _listProviders = Providers.GetListReports();
     _listClinics   = Clinics.GetDeepCopy(true);
     for (int i = 0; i < _listFeeScheds.Count; i++)
     {
         listBoxFeeSched.Items.Add(_listFeeScheds[i].Description);
     }
     listBoxFeeSched.SelectedIndex = 0;
     listBoxClinics.Items.Add(Lan.g(this, "Default"));
     if (PrefC.HasClinicsEnabled)
     {
         for (int i = 0; i < _listClinics.Count; i++)
         {
             listBoxClinics.Items.Add(_listClinics[i].Abbr);
         }
     }
     listBoxClinics.SelectedIndex = 0;
     listBoxProviders.Items.Add(Lan.g(this, "Default"));
     for (int i = 0; i < _listProviders.Count; i++)
     {
         listBoxProviders.Items.Add(_listProviders[i].Abbr);
     }
     listBoxProviders.SelectedIndex = 0;
 }
예제 #2
0
        private void butHideUnused_Click(object sender, EventArgs e)
        {
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Hide fee schedules that are not in use by insurance plans, patients, or providers?\r\n"
                             + "A backup of the database will be made first."))
            {
                return;
            }
            bool   hasChanged     = FeeScheds.Sync(_listFeeScheds, _listFeeSchedsOld);
            Action actionProgress = ODProgress.Show(ODEventType.HideUnusedFeeSchedules, startingMessage: Lans.g(this, "Backing up database..."));

            try {
                MiscData.MakeABackup();
            }
            catch (Exception ex) {
                actionProgress?.Invoke();
                FriendlyException.Show(Lans.g(this, "Unable to make a backup. No fee schedules have been altered."), ex);
                return;
            }
            ODEvent.Fire(ODEventType.HideUnusedFeeSchedules, Lans.g(this, "Hiding unused fee schedules..."));
            long countChanged = FeeScheds.HideUnusedScheds();

            if (hasChanged || countChanged > 0)
            {
                DataValid.SetInvalid(InvalidType.FeeScheds);
            }
            actionProgress?.Invoke();
            MessageBox.Show(countChanged.ToString() + " " + Lans.g(this, "unused fee schedules hidden."));
            _listFeeScheds    = FeeScheds.GetDeepCopy(_isSelectionMode);
            _listFeeSchedsOld = _listFeeScheds.Select(x => x.Copy()).ToList();
            FillGrid();
        }
예제 #3
0
 private void RefreshModuleScreen()
 {
     if (PatCur == null)
     {
         return;
     }
     if (PIn.Bool(ProgramProperties.GetPropVal(ProgramName.eClinicalWorks, "FeeSchedulesSetManually")))
     {
         comboFeeSched.Enabled = true;
     }
     else
     {
         comboFeeSched.Enabled = false;
     }
     comboFeeSched.Items.Clear();
     comboFeeSched.Items.Add(Lan.g(this, "none"));
     comboFeeSched.SelectedIndex = 0;
     _listFeeSchedShort          = FeeScheds.GetDeepCopy(true);
     for (int i = 0; i < _listFeeSchedShort.Count; i++)
     {
         comboFeeSched.Items.Add(_listFeeSchedShort[i].Description);
         if (_listFeeSchedShort[i].FeeSchedNum == PatCur.FeeSched)
         {
             comboFeeSched.SelectedIndex = i + 1;
         }
     }
 }
예제 #4
0
        private void butCleanUp_Click(object sender, EventArgs e)
        {
            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete allowed fee schedules that are not in use or that are attached to hidden insurance plans?"))
            {
                return;
            }
            long changed = FeeScheds.CleanupAllowedScheds();

            MessageBox.Show(changed.ToString() + " " + Lan.g(this, "unused fee schedules deleted."));
            FeeScheds.RefreshCache();
            _listFeeScheds    = FeeScheds.GetDeepCopy(_isSelectionMode);         //After deletion, refresh in-memory copy to continue editing.
            _listFeeSchedsOld = _listFeeScheds.Select(x => x.Copy()).ToList();
            FillGrid();
        }
예제 #5
0
 public FormFeeSchedGroupEdit(FeeSchedGroup feeSchedGroupCur)
 {
     InitializeComponent();
     Lan.F(this);
     _feeSchedGroupCur   = feeSchedGroupCur;
     _listClinicsInGroup = Clinics.GetClinics(_feeSchedGroupCur.ListClinicNumsAll ?? new List <long>());
     if (_feeSchedGroupCur.FeeSchedNum > 0)
     {
         _listOtherGroupsWithFeeSched = FeeSchedGroups.GetAllForFeeSched(_feeSchedGroupCur.FeeSchedNum)
                                        .FindAll(x => x.FeeSchedGroupNum != _feeSchedGroupCur.FeeSchedGroupNum);
     }
     _listFeeScheds = FeeScheds.GetDeepCopy(true);
     //Global fee schedules cannot be localized, so there can't be clinic overrides for them. This block also exists in FormFeeSchedEdit.cs
     _listFeeScheds.RemoveAll(x => x.IsGlobal == true);
 }
예제 #6
0
        private void FormFeeSchedules_Load(object sender, System.EventArgs e)
        {
            _listFeeScheds    = FeeScheds.GetDeepCopy(_isSelectionMode);
            _listFeeSchedsOld = _listFeeScheds.Select(x => x.Copy()).ToList();
            listType.Items.Add(Lan.g(this, "All"));
            Array arrayValues = Enum.GetValues(typeof(FeeScheduleType));

            for (int i = 0; i < arrayValues.Length; i++)
            {
                FeeScheduleType feeSchedType = ((FeeScheduleType)arrayValues.GetValue(i));
                if (feeSchedType == FeeScheduleType.OutNetwork)
                {
                    listType.Items.Add("Out of Network");
                }
                else
                {
                    listType.Items.Add(arrayValues.GetValue(i).ToString());
                }
            }
            listType.SelectedIndex = 0;
            if (!Security.IsAuthorized(Permissions.SecurityAdmin, true))
            {
                butCleanUp.Visible      = false;
                labelCleanUp.Visible    = false;
                butHideUnused.Visible   = false;
                labelHideUnused.Visible = false;
            }
            if (_isSelectionMode)
            {
                butOK.Visible           = true;
                butUp.Visible           = false;
                butDown.Visible         = false;
                butSort.Visible         = false;
                labelSort.Visible       = false;
                butAdd.Visible          = false;
                butCleanUp.Visible      = false;
                labelCleanUp.Visible    = false;
                butHideUnused.Visible   = false;
                labelHideUnused.Visible = false;
                groupBox7.Visible       = false;
            }
            FillGrid();
        }
 private void UserControlSetupWizFeeSched_Load(object sender, EventArgs e)
 {
     _listFeeScheds    = FeeScheds.GetDeepCopy();
     _listFeeSchedsOld = _listFeeScheds.Select(x => x.Copy()).ToList();
     FillGrid();
 }
예제 #8
0
 private void FormProcCodeEditMore_Load(object sender, EventArgs e)
 {
     _listFeeScheds = FeeScheds.GetDeepCopy(true);
     FillAndSortListFees();
     FillGrid();
 }
예제 #9
0
 private void FormProcCodeEditMore_Load(object sender, EventArgs e)
 {
     _listFeeScheds = FeeScheds.GetDeepCopy(true);          //js not sure why this is being used at all.  Looks like it's supposed to show all fee scheds.
     FillAndSortListFees();
     FillGrid();
 }