Exemple #1
0
 private void menuItemAccount_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() < 0)
     {
         MsgBox.Show(this, "Please select a customer first.");
         return;
     }
     GotoModule.GotoAccount(PIn.Long(TableCustomers.Rows[gridMain.GetSelectedIndex()]["PatNum"].ToString()));
 }
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (e.Row < 0 || !Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            long patNum = PIn.Long(_tableTrans.Rows[e.Row]["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
        }
        private void menuItemGoTo_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length < 1 || !Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            long patNum = PIn.Long(_tableTrans.Rows[gridMain.SelectedIndices[0]]["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
        }
Exemple #4
0
        private void menuItemGoTo_Click(object sender, EventArgs e)
        {
            RecurringCharge charge = gridMain.SelectedTag <RecurringCharge>();

            if (charge == null || !Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            GotoModule.GotoAccount(charge.PatNum);
        }
        private void menuItemGoTo_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select one payment first.");
                return;
            }
            long patNum = ((Payment)gridMain.Rows[gridMain.SelectedIndices[0]].Tag).PatNum;

            FormOpenDental.S_Contr_PatientSelected(Patients.GetPat(patNum), false);
            GotoModule.GotoAccount(0);
        }
Exemple #6
0
 private void goToAccountToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (!Security.IsAuthorized(Permissions.AccountModule))
     {
         return;
     }
     if (gridMain.SelectedGridRows.Count == 0)
     {
         MsgBox.Show(this, "Please select a patient first.");
         return;
     }
     GotoModule.GotoAccount(((AgingPat)gridMain.SelectedGridRows[0].Tag).Pat.PatNum);
 }
        private void menuItemGridGoToAccount_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedIndices.Length != 1)
            {
                MsgBox.Show(this, "Please select exactly one patient.");
                return;
            }
            DataRow row    = (DataRow)gridMain.ListGridRows[gridMain.GetSelectedIndex()].Tag;
            long    patNum = PIn.Long(row["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
            SendToBack();
        }
Exemple #8
0
        private void userControlTasks1_GoToChanged(object sender, EventArgs e)
        {
            TaskObjectType gotoType   = userControlTasks1.GotoType;
            long           gotoKeyNum = userControlTasks1.GotoKeyNum;

            if (gotoType == TaskObjectType.Patient)
            {
                if (gotoKeyNum != 0)
                {
                    Patient pat = Patients.GetPat(gotoKeyNum);
                    //OnPatientSelected(pat);
                    if (IsTriage)
                    {
                        GotoModule.GotoChart(pat.PatNum);
                    }
                    else
                    {
                        GotoModule.GotoAccount(pat.PatNum);
                    }
                }
            }
            if (gotoType == TaskObjectType.Appointment)
            {
                if (gotoKeyNum != 0)
                {
                    Appointment apt = Appointments.GetOneApt(gotoKeyNum);
                    if (apt == null)
                    {
                        MsgBox.Show(this, "Appointment has been deleted, so it's not available.");
                        return;
                        //this could be a little better, because window has closed, but they will learn not to push that button.
                    }
                    DateTime dateSelected = DateTime.MinValue;
                    if (apt.AptStatus == ApptStatus.Planned || apt.AptStatus == ApptStatus.UnschedList)
                    {
                        //I did not add feature to put planned or unsched apt on pinboard.
                        MsgBox.Show(this, "Cannot navigate to appointment.  Use the Other Appointments button.");
                        //return;
                    }
                    else
                    {
                        dateSelected = apt.AptDateTime;
                    }
                    Patient pat = Patients.GetPat(apt.PatNum);
                    //OnPatientSelected(pat);
                    GotoModule.GotoAppointment(dateSelected, apt.AptNum);
                }
            }
            //DialogResult=DialogResult.OK;
        }
Exemple #9
0
        private void menuItemAccount_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select a patient first.");
                return;
            }
            long patNum = PIn.Long(gridMain.SelectedTag <DataRow>()["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
        }
Exemple #10
0
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            if (e.Row < 0)
            {
                MsgBox.Show(this, "Must select at least one recurring charge.");
                return;
            }
            long patNum = ((RecurringChargeData)gridMain.ListGridRows[e.Row].Tag).RecurringCharge.PatNum;

            GotoModule.GotoAccount(patNum);
        }
        private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Must select at least one recurring charge.");
                return;
            }
            long patNum = PIn.Long(table.Rows[gridMain.SelectedIndices[0]]["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
        }
Exemple #12
0
        private void butGotoAccount_Click(object sender, EventArgs e)
        {
            if (!Security.IsAuthorized(Permissions.AccountModule))
            {
                return;
            }
            if (gridMain.SelectedIndices.Length == 0)
            {
                MsgBox.Show(this, "Please select a patient first.");
                return;
            }
            WindowState = FormWindowState.Minimized;
            long patNum = PIn.Long(table.Rows[gridMain.SelectedIndices[0]]["PatNum"].ToString());

            GotoModule.GotoAccount(patNum);
        }
        ///<summary>Click method used by all gridMain right click options.
        ///We identify what logic to run by the menuItem.Tag.</summary>
        private void gridMain_RightClickHelper(object sender, EventArgs e)
        {
            int index = gridMain.GetSelectedIndex();

            if (index == -1)
            {
                return;
            }
            int menuCode = (int)((MenuItem)sender).Tag;

            switch (menuCode)
            {
            case 0:                    //Go to Account
                GotoModule.GotoAccount(((UnsentInsClaim)gridMain.Rows[index].Tag).PatNum);
                break;
            }
        }
Exemple #14
0
        private void menuItemGoTo_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedGridRows.Count != 1)
            {
                MsgBox.Show(this, "Please select one TSI transaction log first.");
                return;
            }
            object logIndex = gridMain.SelectedGridRows[0].Tag;          //Index is original location in _listTsiTransLogsAll

            if (!(logIndex is int) || (int)logIndex < 0 || (int)logIndex >= _listTsiTransLogsAll.Count)
            {
                return;
            }
            //FormOpenDental.S_Contr_PatientSelected(Patients.GetPat(_listTsiTransLogsAll[(int)logIndex].PatNum),false);
            GotoModule.GotoAccount(_listTsiTransLogsAll[(int)logIndex].PatNum);
            SendToBack();
        }
Exemple #15
0
        ///<summary>Click method used by all gridClaimDetails right click options.</summary>
        private void gridClaimDetails_RightClickHelper(object sender, EventArgs e)
        {
            int index = gridClaimDetails.GetSelectedIndex();

            if (index == -1)           //Should not happen, menu item is only enabled when exactly 1 row is selected.
            {
                return;
            }
            Hx835_Claim claimPaid     = (Hx835_Claim)gridClaimDetails.ListGridRows[index].Tag;
            int         menuItemIndex = ((MenuItem)sender).Index;  //sender is the selected menuItem

            #region Go To Account
            if (menuItemIndex == 0)
            {
                if (claimPaid.ClaimNum != 0)
                {
                    Claim claim = Claims.GetClaim(claimPaid.ClaimNum);
                    if (claim != null)
                    {
                        GotoModule.GotoAccount(claim.PatNum);
                        return;
                    }
                }
                PtTableSearchParams ptTableSearchParams = new PtTableSearchParams(false, claimPaid.PatientName.Lname, claimPaid.PatientName.Fname, "", "", false,
                                                                                  "", "", "", "", "", 0, false, false, DateTime.MinValue, 0, "", "", "", "", "", "", "");
                DataTable ptTable = Patients.GetPtDataTable(ptTableSearchParams);              //Mimics FormPatientSelect.cs
                if (ptTable.Rows.Count == 0)
                {
                    MsgBox.Show(this, "Patient could not be found.  Please manually attach to a claim and try again.");
                }
                else if (ptTable.Rows.Count == 1)
                {
                    GotoModule.GotoAccount(PIn.Long(ptTable.Rows[0]["PatNum"].ToString()));
                }
                else
                {
                    MsgBox.Show(this, "Multiple patients with same name found.  Please manually attach to a claim and try again.");
                }
            }
            #endregion
            #region Add Tracking Status
            else if (menuItemIndex == 1)
            {
                Claim claim          = claimPaid.GetClaimFromDb();
                bool  isAttachNeeded = (!claimPaid.IsAttachedToClaim);
                if (claim == null)               //Not found in db.
                {
                    claim = ClaimSelectionHelper(claimPaid);
                    if (claim != null)                   //A claim was selected.
                    {
                        isAttachNeeded = true;           //Hard attach selected claim to db claim, since user manually picked matching claim.
                    }
                }
                if (claim == null)               //Claim not found and user did not select one.
                {
                    return;
                }
                CreateAttachForClaim(claimPaid, claim.ClaimNum, isAttachNeeded);
                if (FormClaimEdit.AddClaimCustomTracking(claim, claimPaid.GetRemarks()))                //A tracking status was chosen and the tracking status contains an error code.
                {
                    DetachClaimHelper(new List <int> {
                        index
                    });                                                            //Detach claim from ERA for convenience.
                }
                FillClaimDetails();
            }
            #endregion
        }
Exemple #16
0
 private void gridMain_CellClick(object sender, ODGridClickEventArgs e)
 {
     GotoModule.GotoAccount(PIn.Long(Table.Rows[e.Row]["PatNum"].ToString()));
 }
Exemple #17
0
 /// <summary>Go to the selected patient's account.</summary>
 private void goToAccountToolStripMenuItem_Click(object sender, EventArgs e)
 {
     RpUnfinalizedInsPay.UnfinalizedInsPay unfinalPay = (RpUnfinalizedInsPay.UnfinalizedInsPay)gridMain.Rows[gridMain.SelectedIndices[0]].Tag;
     GotoModule.GotoAccount(unfinalPay.PatientCur.PatNum);
 }
 private void butGoToAccount_Click(object sender, EventArgs e)
 {
     //Button is only enabled if _patCur is not null.
     GotoModule.GotoAccount(_patCur.PatNum);
 }