Ejemplo n.º 1
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (!SaveGridChanges())
     {
         return;
     }
     if (!ValidateTotals())
     {
         MsgBox.Show(this, "One or more column totals exceed the maximum allowed value, please fix data entry errors.");
         return;
     }
     SaveAllowedFees();
     if (PrefC.GetBool(PrefName.ClaimSnapshotEnabled))
     {
         Claim claimCur = Claims.GetClaim(_listClaimProcsOld[0].ClaimNum);
         if (claimCur.ClaimType != "PreAuth")
         {
             ClaimSnapshots.CreateClaimSnapshot(_listClaimProcsOld, ClaimSnapshotTrigger.InsPayment, claimCur.ClaimType);
         }
     }
     ClaimTrackings.InsertClaimProcReceived(ClaimProcsToEdit[0].ClaimNum, Security.CurUser.UserNum);
     //Make audit trail entries if writeoff or inspayamt's were changed. The claimprocs are updated outside of this form,
     //but all of the information we need for audit trail logging lives inside the form so we do it here.
     MakeAuditTrailEntries();
     DialogResult = DialogResult.OK;
 }
Ejemplo n.º 2
0
        private void FormClaimNotSent_Load(object sender, System.EventArgs e)
        {
            SetFilterControlsAndAction(() => { FillGrid(); }
                                       , odDateRangePicker, comboClinicMulti, comboBoxInsFilter
                                       );
            odDateRangePicker.SetDateTimeTo(DateTime.Now.Date);
            odDateRangePicker.SetDateTimeFrom(odDateRangePicker.GetDateTimeTo().AddDays(-7));             //default to the previous week
            _listClaimSentEditUsers = Userods.GetUsersByPermission(Permissions.ClaimSentEdit, false);
            _listOldClaimTrackings  = ClaimTrackings.RefreshForUsers(ClaimTrackingType.ClaimUser, _listClaimSentEditUsers.Select(x => x.UserNum).ToList());
            _listNewClaimTrackings  = _listOldClaimTrackings.Select(x => x.Copy()).ToList();
            //Fill the Ins Filter box
            //comboBoxInsFilter.Items.Add(Lan.g(this,"All"));//always adding an 'All' option first
            foreach (ClaimNotSentStatuses claimStat in Enum.GetValues(typeof(ClaimNotSentStatuses)))
            {
                comboBoxInsFilter.Items.Add(claimStat);
            }
            comboBoxInsFilter.SelectedIndex = 0;          //Pre-select 'All' for the user
            //Fill the right-click menu for the grid
            List <MenuItem> listMenuItems = new List <MenuItem>();

            //The first item in the list will always exists, but we toggle it's visibility to only show when 1 row is selected.
            listMenuItems.Add(new MenuItem(Lan.g(this, "Go to Account"), new EventHandler(gridMain_RightClickHelper)));
            listMenuItems[0].Tag = 0;          //Tags are used to identify what to do in gridMain_RightClickHelper.
            Menu.MenuItemCollection menuItemCollection = new Menu.MenuItemCollection(rightClickMenu);
            menuItemCollection.AddRange(listMenuItems.ToArray());
            rightClickMenu.Popup += new EventHandler((o, ea) => {
                rightClickMenu.MenuItems[0].Visible = (gridMain.SelectedIndices.Count() == 1);            //Only show 'Go to Account' when there is exactly 1 row selected.
            });
        }
Ejemplo n.º 3
0
        private void FormClaimNotSent_Load(object sender, System.EventArgs e)
        {
            odDateRangePicker.SetDateTimeTo(DateTime.Now.Date);
            odDateRangePicker.SetDateTimeFrom(odDateRangePicker.GetDateTimeTo().AddDays(-7));             //default to the previous week
            _listClaimSentEditUsers = Userods.GetUsersByPermission(Permissions.ClaimSentEdit, false);
            _listOldClaimTrackings  = ClaimTrackings.RefreshForUsers(ClaimTrackingType.ClaimUser, _listClaimSentEditUsers.Select(x => x.UserNum).ToList());
            _listNewClaimTrackings  = _listOldClaimTrackings.Select(x => x.Copy()).ToList();
            //Fill the clinics combobox
            if (PrefC.HasClinicsEnabled)
            {
                _listClinics = Clinics.GetForUserod(Security.CurUser);
                comboBoxClinics.Items.Add(Lan.g(this, "All"));
                int curIndex = 0;              //start at 0 since we are adding an item
                if (!Security.CurUser.ClinicIsRestricted)
                {
                    comboBoxClinics.Items.Add(Lan.g(this, "Unassigned"));
                    curIndex++;                    //increment index after adding this option
                }
                for (int i = 0; i < _listClinics.Count; i++)
                {
                    curIndex++;
                    comboBoxClinics.Items.Add(_listClinics[i].Abbr);
                    if (Clinics.ClinicNum == 0)
                    {
                        comboBoxClinics.SelectedIndices.Clear();
                        comboBoxClinics.SetSelected(0, true);
                    }
                    if (_listClinics[i].ClinicNum == Clinics.ClinicNum)
                    {
                        comboBoxClinics.SelectedIndices.Clear();
                        comboBoxClinics.SetSelected(curIndex, true);
                    }
                }
            }
            else
            {
                labelClinics.Visible    = false;
                comboBoxClinics.Visible = false;
            }
            //Fill the Ins Filter box
            //comboBoxInsFilter.Items.Add(Lan.g(this,"All"));//always adding an 'All' option first
            foreach (ClaimNotSentStatuses claimStat in Enum.GetValues(typeof(ClaimNotSentStatuses)))
            {
                comboBoxInsFilter.Items.Add(claimStat);
            }
            comboBoxInsFilter.SelectedIndex = 0;          //Pre-select 'All' for the user
            //Fill the right-click menu for the grid
            List <MenuItem> listMenuItems = new List <MenuItem>();

            //The first item in the list will always exists, but we toggle it's visibility to only show when 1 row is selected.
            listMenuItems.Add(new MenuItem(Lan.g(this, "Go to Account"), new EventHandler(gridMain_RightClickHelper)));
            listMenuItems[0].Tag = 0;          //Tags are used to identify what to do in gridMain_RightClickHelper.
            Menu.MenuItemCollection menuItemCollection = new Menu.MenuItemCollection(rightClickMenu);
            menuItemCollection.AddRange(listMenuItems.ToArray());
            rightClickMenu.Popup += new EventHandler((o, ea) => {
                rightClickMenu.MenuItems[0].Visible = (gridMain.SelectedIndices.Count() == 1);            //Only show 'Go to Account' when there is exactly 1 row selected.
            });
        }
Ejemplo n.º 4
0
        private void butUpdate_Click(object sender, EventArgs e)
        {
            if (comboCustomTracking.SelectedIndex == -1)
            {
                //Defaults to -1 when editing and old ClaimTracking where TrackingDefNum is 0 ('None') and ClaimTrackingStatusExcludesNone is true.
                MsgBox.Show(this, "You must specify a Custom Track Status.");
                return;
            }
            if (PrefC.GetBool(PrefName.ClaimTrackingRequiresError) &&
                ((ODBoxItem <Def>)comboErrorCode.SelectedItem).Tag == null &&
                comboErrorCode.Enabled)
            {
                MsgBox.Show(this, "You must specify an error code.");                //Do they have to specify an error code even if they set the status to None?
                return;
            }
            if (comboCustomTracking.GetSelectedDefNum() == 0)
            {
                if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Setting the status to none will disable filtering in the Outstanding Claims Report."
                                 + "  Do you wish to set the status of this claim to none?"))
                {
                    return;
                }
            }
            Def errorCodeDef = ((ODBoxItem <Def>)comboErrorCode.SelectedItem).Tag;

            for (int i = 0; i < _listClaims.Count; i++)        //when not called from FormRpOutstandingIns, this should only have one claim.
            {
                _listClaims[i].CustomTracking = comboCustomTracking.GetSelectedDefNum();
                Claims.Update(_listClaims[i]);
                ClaimTracking trackCur = ListNewClaimTracks[i];
                if (trackCur == null)
                {
                    trackCur          = new ClaimTracking();
                    trackCur.ClaimNum = _listClaims[i].ClaimNum;
                }
                trackCur.Note                = textNotes.Text;
                trackCur.TrackingDefNum      = comboCustomTracking.GetSelectedDefNum();
                trackCur.TrackingErrorDefNum = errorCodeDef.DefNum;
                trackCur.UserNum             = Security.CurUser.UserNum;
                if (trackCur.ClaimTrackingNum == 0)                //new claim tracking status.
                {
                    ClaimTrackings.Insert(trackCur);
                }
                else                   //existing claim tracking status
                {
                    ClaimTrackings.Update(trackCur);
                }
                ListNewClaimTracks[i] = trackCur;              //Update list.
            }
            DialogResult = DialogResult.OK;
        }