private void gridClaims_CellDoubleClick(object sender, UI.ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.ClaimView))
            {
                return;
            }
            Claim claim = Claims.GetClaim(((Claim)gridClaims.ListGridRows[e.Row].Tag).ClaimNum); //This is the easiest way to determine if the claim was deleted.

            if (claim == null)                                                                   //Was deleted.
            {
                MsgBox.Show(this, "Claim has been deleted by another user.");
                gridClaims.BeginUpdate();
                gridClaims.ListGridRows.RemoveAt(e.Row);                //This will also deselect the row.
                gridClaims.EndUpdate();
                return;
            }
            FormClaimEdit formCE = new FormClaimEdit(claim, Patients.GetPat(_patNum), Patients.GetFamily(_patNum));

            formCE.ShowDialog();
            claim = Claims.GetClaim(((Claim)gridClaims.ListGridRows[e.Row].Tag).ClaimNum); //This is the easiest way to determine if the claim was deleted.
            if (claim == null)                                                             //Was deleted.
            {
                gridClaims.BeginUpdate();
                gridClaims.ListGridRows.RemoveAt(e.Row);                //This will also deselect the row.
                gridClaims.EndUpdate();
                return;
            }
            if (formCE.DialogResult == DialogResult.OK)
            {
                //Update row
                UI.GridRow row = new UI.GridRow();
                row.Tag = claim;
                row.Cells.Add(claim.DateService.ToShortDateString());                           //DOS
                row.Cells.Add(Carriers.GetName(InsPlans.RefreshOne(claim.PlanNum).CarrierNum)); //Carrier
                row.Cells.Add(Claims.GetClaimStatusString(claim.ClaimStatus));                  //Status
                if (PrefC.HasClinicsEnabled)                                                    //Using clinics
                {
                    Clinic clinic = Clinics.GetClinic(claim.ClinicNum);
                    if (clinic == null)
                    {
                        row.Cells.Add("");                        //Clinic
                    }
                    else
                    {
                        row.Cells.Add(clinic.Description);                        //Clinic
                    }
                }
                row.Cells.Add(claim.ClaimFee.ToString("f"));                //Claimfee
                gridClaims.BeginUpdate();
                gridClaims.ListGridRows[e.Row] = row;
                gridClaims.EndUpdate();
                gridClaims.SetSelected(e.Row, true);               //Reselect Row
            }
        }
Example #2
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.InsPayCreate))
            {
                return;
            }
            FormClaimPayBatch FormCPBEdit = new FormClaimPayBatch(ListClaimPay[gridMain.GetSelectedIndex()]);

            FormCPBEdit.Show();
            FormCPBEdit.FormClosed += FormCPBEdit_FormClosed;
        }
Example #3
0
        private void butMerge_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.InsPlanEdit))
            {
                return;
            }
            FormDiscountPlanMerge FormDPM = new FormDiscountPlanMerge();

            FormDPM.ShowDialog();
            FillGrid();
        }
Example #4
0
 private void FormLayoutSheetDefs_Load(object sender, EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.Setup, true))
     {
         butNew.Enabled            = false;
         butCopy.Enabled           = false;
         butDuplicate.Enabled      = false;
         gridCustomLayouts.Enabled = false;
     }
     RefreshAndFillGrids();
 }
        private void FormDiscountPlanEdit_Load(object sender, EventArgs e)
        {
            textDescript.Text = DiscountPlanCur.Description;
            _listPatNames     = DiscountPlans.GetPatsForPlan(DiscountPlanCur.DiscountPlanNum)
                                .Select(x => x.LName + ", " + x.FName)
                                .Distinct()
                                .OrderBy(x => x)
                                .ToList();
            _feeSchedCur      = FeeScheds.GetFirstOrDefault(x => x.FeeSchedNum == DiscountPlanCur.FeeSchedNum, true);
            textFeeSched.Text = _feeSchedCur != null ? _feeSchedCur.Description : "";
            _listAdjTypeDefs  = Defs.GetDiscountPlanAdjTypes().ToList();
            for (int i = 0; i < _listAdjTypeDefs.Count; i++)
            {
                comboBoxAdjType.Items.Add(_listAdjTypeDefs[i].ItemName);
                if (_listAdjTypeDefs[i].DefNum == DiscountPlanCur.DefNum)
                {
                    comboBoxAdjType.SelectedIndex = i;
                }
            }
            //populate patient information
            int countPats = _listPatNames.Count;

            textNumPatients.Text = countPats.ToString();
            if (countPats > 10000)           //10,000 per Nathan. copied from FormInsPlan.cs
            {
                comboPatient.Visible     = false;
                butListPatients.Visible  = true;
                butListPatients.Location = comboPatient.Location;
            }
            else
            {
                comboPatient.Visible    = true;
                butListPatients.Visible = false;
                comboPatient.Items.Clear();
                comboPatient.Items.AddRange(_listPatNames.ToArray());
                if (_listPatNames.Count > 0)
                {
                    comboPatient.SelectedIndex = 0;
                }
            }
            checkHidden.Checked = DiscountPlanCur.IsHidden;
            if (!Security.IsAuthorized(Permissions.InsPlanEdit, true))            //User may be able to get here if FormDiscountPlans is not in selection mode.
            {
                textDescript.ReadOnly   = true;
                comboBoxAdjType.Enabled = false;
                butFeeSched.Enabled     = false;
                butOK.Enabled           = false;
                checkHidden.Enabled     = false;
            }
            if (IsSelectionMode)
            {
                butDrop.Visible = true;
            }
        }
Example #6
0
        private void listComputer_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.GraphicsEdit))
            {
                return;
            }
            FormGraphics FormG = new FormGraphics();

            FormG.ComputerPrefCur = ComputerPrefs.GetForComputer(_listComputers[listComputer.SelectedIndex].CompName);
            FormG.ShowDialog();
        }
        private void butWebSchedSetup_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormRecallSetup FormRS = new FormRecallSetup();

            FormRS.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Recall Setup accessed via EServices Setup window.");
        }
Example #8
0
        private void butUserQuery_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.UserQuery))
            {
                return;
            }
            FormQuery FormQuery2 = new FormQuery();

            FormQuery2.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.UserQuery, 0, "");
        }
Example #9
0
 private void FormFeeEdit_Load(object sender, System.EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.FeeSchedEdit))
     {
         DialogResult = DialogResult.Cancel;
         Close();
         return;
     }
     Location     = new Point(Location.X - 190, Location.Y - 20);
     textFee.Text = FeeCur.Amount.ToString("F");
 }
Example #10
0
 private void FormPhoneGraphDateEdit_Load(object sender, EventArgs e)
 {
     textPeak.Text      = PrefC.GetRaw("GraphEmployeeTimesPeak");
     textSuperPeak.Text = PrefC.GetRaw("GraphEmployeeTimesSuperPeak");
     if (!Security.IsAuthorized(Permissions.SecurityAdmin, true))
     {
         groupGraphPrefs.Visible = false;
     }
     gridGraph.Title = DateEdit.ToShortDateString();
     FillGrid();
 }
Example #11
0
 private void TabControl1Tab_Selected(object sender, TabControlEventArgs e)
 {
     if (e.TabPage == tabPageSupplementalBackups)
     {
         if (!Security.IsAuthorized(Permissions.SecurityAdmin))
         {
             tabControl1.SelectedTab = tabPageBackup;
             return;
         }
     }
 }
Example #12
0
        ///<summary>Goes to the chart module of the patient of the selected voicemail.</summary>
        private void GoToChart()
        {
            if (gridVoiceMails.SelectedCell.Y == -1 || gridVoiceMails.ListGridRows.Count <= gridVoiceMails.SelectedCell.Y ||
                !Security.IsAuthorized(Permissions.ChartModule))
            {
                return;
            }
            VoiceMail voiceMailCur = (VoiceMail)gridVoiceMails.ListGridRows[gridVoiceMails.SelectedCell.Y].Tag;

            GotoModule.GotoChart(voiceMailCur.PatNum);
        }
Example #13
0
 private void FormHL7Defs_Load(object sender, System.EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.Setup, true))
     {
         butCopy.Enabled = false;
         grid2.Enabled   = false;
         grid1.Enabled   = false;
     }
     FillGrid1();
     FillGrid2();
 }
Example #14
0
        private void menuItemCategories_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDefinitions FormD = new FormDefinitions(DefCat.SupplyCats);

            FormD.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Definitions.");
        }
Example #15
0
        private void butEditCats_Click(object sender, System.EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDefinitions FormD = new FormDefinitions(DefCat.LetterMergeCats);

            FormD.ShowDialog();
            FillCats();
        }
 private void FormPatientPortalSetup_Load(object sender, EventArgs e)
 {
     textPatientPortalURL.Text       = PrefC.GetString(PrefName.PatientPortalURL);
     textBoxNotificationSubject.Text = PrefC.GetString(PrefName.PatientPortalNotifySubject);
     textBoxNotificationBody.Text    = PrefC.GetString(PrefName.PatientPortalNotifyBody);
     if (!Security.IsAuthorized(Permissions.Setup))
     {
         butOK.Enabled                = false;
         buttonGetURL.Enabled         = false;
         groupBoxNotification.Enabled = false;
     }
 }
Example #17
0
        private void menuItemOptions_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormSheetSetup formSS = new FormSheetSetup();

            formSS.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "ShowForms");
            FillGrid();
        }
Example #18
0
        private void menuItemImageCats_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDefinitions formD = new FormDefinitions(DefCat.ImageCats);

            formD.ShowDialog();
            SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Defs");
            FillGrid();
        }
Example #19
0
        ///<summary>Only needs to be called when procOld.ProcStatus is C, EO or EC.</summary>
        public static bool CheckPermissionsAndGlobalLockDate(Procedure procOld, Procedure procNew, DateTime procDate, double procFeeOverride = double.MinValue)
        {
            if (!procOld.ProcStatus.In(ProcStat.C, ProcStat.EO, ProcStat.EC))           //that was already complete
            {
                return(true);
            }
            //It's not possible for the user to get to this point unless they have permission for ProcComplEditLimited based on the DateEntryC.
            //The following 2 checks are not redundant because they check different dates.
            //ProcComplEditLimited does not check Global Lock date but checks the permission specific date.
            DateTime dateToUseProcOld = procOld.ProcDate;

            if (procOld.ProcStatus.In(ProcStat.EC, ProcStat.EO))
            {
                dateToUseProcOld = DateTime.Today;                                          //ignore date limitation for EO/EC procedures on Edit Completed Procedure (limited) permissions.
            }
            if (!Security.IsAuthorized(Permissions.ProcComplEditLimited, dateToUseProcOld)) //block old date
            {
                return(false);
            }
            if (procNew.ProcStatus.In(ProcStat.C, ProcStat.EO, ProcStat.EC))
            {
                DateTime dateToUseProcCur = procDate;
                if (procNew.ProcStatus.In(ProcStat.EC, ProcStat.EO))
                {
                    //ignore date limitation for EO/EC procedures on Edit Completed Procedure (full) and Edit Completed Procedure (limited) permissions.
                    dateToUseProcCur = DateTime.Today;
                }
                if (!Security.IsAuthorized(Permissions.ProcComplEditLimited, dateToUseProcCur))                //block new date, too
                {
                    return(false);
                }
                double procFee = procNew.ProcFee;
                if (procFeeOverride != double.MinValue)
                {
                    procFee = procFeeOverride;
                }
                if (procOld.ProcDate != procDate ||           //If user changed the procedure date
                    !procOld.ProcFee.IsEqual(procFee) ||                     //If user changed the procedure fee
                    procOld.CodeNum != procNew.CodeNum)                        //If user changed the procedure code
                {
                    Permissions perm = Permissions.ProcComplEdit;
                    if (procNew.ProcStatus.In(ProcStat.EO, ProcStat.EC))
                    {
                        perm = Permissions.ProcExistingEdit;
                    }
                    if (!Security.IsAuthorized(perm, procDate, procNew.CodeNum, procFee))
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Example #20
0
        private void menuItemSetup_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormEmailAddresses formEA = new FormEmailAddresses();

            formEA.ShowDialog();
            labelInboxComputerName.Text = "Computer Name Where New Email Is Fetched: " + PrefC.GetString(PrefName.EmailInboxComputerName);
            GetMessages();            //Get new messages, just in case the user entered email information for the first time.
        }
Example #21
0
        private void butDashboard_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.ReportProdInc))
            {
                return;
            }
            Cursor = Cursors.WaitCursor;
            WinDashboard win = new WinDashboard();

            win.Show();
            Cursor = Cursors.Default;
        }
Example #22
0
        private void escalationToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormPhoneEmpDefaultEscalationEdit FormE = new FormPhoneEmpDefaultEscalationEdit();

            FormE.ShowDialog();
            refreshCurrentTabHelper(PhoneEmpDefaults.Refresh(), Phones.GetPhoneList(), PhoneEmpSubGroups.GetAll());
            SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Escalation team changed");
        }
Example #23
0
        private void FillGrid()
        {
            EmailAddresses.RefreshCache();
            _listEmailAddresses = EmailAddresses.GetDeepCopy();
            //Add user specific email addresses to the list
            List <Userod> listUsers = new List <Userod>();

            if (Security.IsAuthorized(Permissions.SecurityAdmin, true) && !IsSelectionMode)
            {
                listUsers.AddRange(Userods.GetUsers());                //If authorized, get all non-hidden users.
            }
            else
            {
                listUsers.Add(Security.CurUser);                //Otherwise, just this user.
            }
            foreach (Userod user in listUsers)
            {
                EmailAddress userAddress = EmailAddresses.GetForUser(user.UserNum);
                if (userAddress != null)
                {
                    _listEmailAddresses.Insert(0, userAddress);
                }
            }
            gridMain.BeginUpdate();
            gridMain.ListGridColumns.Clear();
            GridColumn col;

            col = new GridColumn(Lan.g(this, "User Name"), 240);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Sender Address"), 270);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "User"), 135);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Default"), 50, HorizontalAlignment.Center);
            gridMain.ListGridColumns.Add(col);
            col = new GridColumn(Lan.g(this, "Notify"), 0, HorizontalAlignment.Center);
            gridMain.ListGridColumns.Add(col);
            gridMain.ListGridRows.Clear();
            GridRow row;

            foreach (EmailAddress emailAddress in _listEmailAddresses)
            {
                row = new GridRow();
                row.Cells.Add(emailAddress.EmailUsername);
                row.Cells.Add(emailAddress.SenderAddress);
                row.Cells.Add(Userods.GetName(emailAddress.UserNum));
                row.Cells.Add((emailAddress.EmailAddressNum == PrefC.GetLong(PrefName.EmailDefaultAddressNum))?"X":"");
                row.Cells.Add((emailAddress.EmailAddressNum == PrefC.GetLong(PrefName.EmailNotifyAddressNum))?"X":"");
                row.Tag = emailAddress;
                gridMain.ListGridRows.Add(row);
            }
            gridMain.EndUpdate();
        }
Example #24
0
 private void butColumnAdd_Click(object sender, EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.WikiListSetup))             //gives a message box if no permission
     {
         return;
     }
     SetIsEdited();
     WikiLists.AddColumn(WikiListCurName);
     _table             = WikiLists.GetByName(WikiListCurName);
     _listColumnHeaders = WikiListHeaderWidths.GetForList(WikiListCurName);
     FillGrid();
 }
Example #25
0
        private void gridWSNPAReasons_DoubleClick(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDefinitions FormD = new FormDefinitions(DefCat.WebSchedNewPatApptTypes);

            FormD.ShowDialog();
            FillGridWSNPAReasons();
            FillGridWebSchedNewPatApptTimeSlotsThreaded();
        }
Example #26
0
        private void butEdit_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDefinitions FormD = new FormDefinitions(DefCat.ProcButtonCats);

            FormD.ShowDialog();
            FillCategories();
            FillButtons();
        }
Example #27
0
 private void FormReferralSelect_Load(object sender, System.EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.ReferralAdd, true))
     {
         butAdd.Enabled = false;
     }
     checkShowPat.Checked    = IsShowPat;
     checkShowDoctor.Checked = IsShowDoc;
     checkShowOther.Checked  = IsShowOther;
     checkPreferred.Checked  = PrefC.GetBool(PrefName.ShowPreferedReferrals);
     FillTable();
     //labelResultCount.Text="";
 }
        private void setupToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.Setup))
            {
                return;
            }
            FormDashboardWidgetSetup FormDS = new FormDashboardWidgetSetup();

            if (FormDS.ShowDialog() == DialogResult.OK)
            {
                FillGrid();
            }
        }
Example #29
0
 ///<summary>Verify Security.CurUser is allowed to change this tile's status.</summary>
 private static bool CheckUserCanChangeStatus(Phone phoneCur)
 {
     if (Security.CurUser.EmployeeNum == phoneCur.EmployeeNum)            //User is changing their own tile. This is always allowed.
     {
         return(true);
     }
     if (Security.IsAuthorized(Permissions.TimecardsEditAll, true))             //User has time card edit permission so allow it.
     {
         return(true);
     }
     //User must enter target tile's password correctly.
     return(CheckSelectedUserPassword(phoneCur.EmployeeNum));
 }
Example #30
0
        private void butAdd_Click(object sender, System.EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.AutoNoteQuickNoteEdit))
            {
                return;
            }
            FormAutoNoteEdit FormA = new FormAutoNoteEdit();

            FormA.IsNew       = true;
            FormA.AutoNoteCur = new AutoNote();
            FormA.ShowDialog();
            FillList();
        }