private void gridMain_CellClick(object sender, ODGridClickEventArgs e) { long sheetNum = (long)gridMain.Rows[e.Row].Tag; Sheet sheet = Sheets.GetSheet(sheetNum); GotoModule.GotoFamily(sheet.PatNum); }
/// <summary>Helper method to send given appt to pinboard. /// Refreshes Appointment module. /// Also does some appointment and security validation.</summary> public static void CopyAptToPinboardHelper(Appointment appt) { GotoModule.PinToAppt(new List <long>() { appt.AptNum }, appt.PatNum); }
private void SendPinboard_Click() { if (grid.SelectedIndices.Length == 0) { MsgBox.Show("Please select an appointment first."); return; } _listAptSelected.Clear(); int patsRestricted = 0; for (int i = 0; i < grid.SelectedIndices.Length; i++) { if (PatRestrictionL.IsRestricted(_listUnschedApt[grid.SelectedIndices[i]].PatNum, PatRestrict.ApptSchedule, true)) { patsRestricted++; continue; } _listAptSelected.Add(_listUnschedApt[grid.SelectedIndices[i]].AptNum); } if (patsRestricted > 0) { if (_listAptSelected.Count == 0) { MsgBox.Show("All selected appointments have been skipped due to patient restriction " + PatRestrictions.GetPatRestrictDesc(PatRestrict.ApptSchedule) + "."); return; } MessageBox.Show("Appointments skipped due to patient restriction " + PatRestrictions.GetPatRestrictDesc(PatRestrict.ApptSchedule) + ": " + patsRestricted + "."); } GotoModule.PinToAppt(_listAptSelected, 0); //This will send all appointments in _listAptSelected to the pinboard, and will select the patient attached to the last appointment in _listAptSelected. }
private void gridMain_CellClick(object sender, ODGridClickEventArgs e) { if (gridMain.SelectedGridRows.Count == 0) //When deselecting with CTR+Click. { return; } GotoModule.GotoChart(PIn.Long(gridMain.SelectedTag <DataRow>()["PatNum"].ToString())); }
private void gridMain_CellClick(object sender, ODGridClickEventArgs e) { //get the day for the row that was clicked on. DateTime rowDate = ((ScheduleOpening)gridMain.ListGridRows[e.Row].Tag).DateTimeAvail; //move the calendar day on the appt module to the day that was clicked on. GotoModule.GotoAppointment(rowDate.Date, _appt.AptNum); //if clinics, move to the clinic as well? }
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 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 < 1 || !Security.IsAuthorized(Permissions.AccountModule)) { return; } long patNum = PIn.Long(_tableTrans.Rows[gridMain.SelectedIndices[0]]["PatNum"].ToString()); GotoModule.GotoAccount(patNum); }
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); }
///<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); }
private void mainGridMenuItemPatChart_Click(object sender, EventArgs e) { List <GridRow> listSelected = gridMain.SelectedGridRows; if (listSelected.Count == 1) { long aptNum = PIn.Long(listSelected[0].Tag.ToString()); Appointment apt = Appointments.GetOneApt(aptNum); GotoModule.GotoChart(apt.PatNum); DialogResult = DialogResult.OK; } }
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); }
///<summary>If multiple patients are selected in UnchedList, will select the last patient to remain consistent with sending to pinboard behavior.</summary> private void SeeChart_Click() { if (grid.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select an appointment first."); return; } Patient pat = Patients.GetPat(_listUnschedApt[grid.SelectedIndices[grid.SelectedIndices.Length - 1]].PatNum); //If multiple selected, just take the last one to remain consistent with SendPinboard_Click. FormOpenDental.S_Contr_PatientSelected(pat, false); GotoModule.GotoChart(pat.PatNum); }
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(); }
private void SeeChart_Click() { if (gridMain.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select an appointment first."); return; } //Only one can be selected at a time in this grid, but just in case we change it in the future it will select the last one in the list to be consistent with other patient selections. Patient pat = Patients.GetPat(_listPlannedAppts[gridMain.SelectedIndices[gridMain.SelectedIndices.Length - 1]].PatNum); FormOpenDental.S_Contr_PatientSelected(pat, false); GotoModule.GotoChart(pat.PatNum); }
///<summary>Removes the selected appoinments from the class wide list of appointments, sends the appointments to the pinboard, ///and then refreshes the grid so that the user can see that they are "taking care" of the conflicts.</summary> private void SendPinboard_Click() { if(gridConflicts.SelectedIndices.Length==0) { MsgBox.Show(this,"Please select an appointment first."); return; } List<long> listSelectedAptNums=new List<long>(); for(int i=0;i<gridConflicts.SelectedIndices.Length;i++) { listSelectedAptNums.Add(((Appointment)gridConflicts.ListGridRows[gridConflicts.SelectedIndices[i]].Tag).AptNum); } _listAppts.RemoveAll(x => listSelectedAptNums.Contains(x.AptNum)); FillGrid(); GotoModule.PinToAppt(listSelectedAptNums,0); //Pins all appointments to the pinboard that were in listAptSelected. }
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; }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { if (table.Rows[e.Row]["DocNum"].ToString() != "0") { long docNum = PIn.Long(table.Rows[e.Row]["DocNum"].ToString()); GotoModule.GotoImage(PatNum, docNum); return; } //Sheets long sheetNum = PIn.Long(table.Rows[e.Row]["SheetNum"].ToString()); Sheet sheet = Sheets.GetSheet(sheetNum); FormSheetFillEdit.ShowForm(sheet, FormSheetFillEdit_FormClosing); }
private void butGotoFamily_Click(object sender, EventArgs e) { if (!Security.IsAuthorized(Permissions.FamilyModule)) { return; } if (gridMain.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select a radiology order first."); return; } Procedure proc = (Procedure)gridMain.ListGridRows[gridMain.GetSelectedIndex()].Tag; GotoModule.GotoFamily(proc.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); }
private void menuItemFamily_Click(object sender, EventArgs e) { if (!Security.IsAuthorized(Permissions.FamilyModule)) { return; } if (gridMain.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select a patient first."); return; } long patNum = PIn.Long(table.Rows[gridMain.SelectedIndices[0]]["PatNum"].ToString()); GotoModule.GotoFamily(patNum); }
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); }
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 (gridMain.SelectedIndices.Length != 1) { return; } if (!Security.IsAuthorized(Permissions.ChartModule)) { return; } long goToPatNum = PIn.Long(gridMain.Rows[e.Row].Tag.ToString()); SendToBack(); GotoModule.GotoChart(goToPatNum); }
private void gridMain_CellDoubleClick(object sender, ODGridClickEventArgs e) { //Images //Hold onto docNum so Image module refresh persists selection when closing FormPatientForms. DocNum = PIn.Long(table.Rows[e.Row]["DocNum"].ToString()); //Set to 0 if not a Document, i.e. a Sheet. if (DocNum != 0) { GotoModule.GotoImage(PatNum, DocNum); return; } //Sheets long sheetNum = PIn.Long(table.Rows[e.Row]["SheetNum"].ToString()); Sheet sheet = Sheets.GetSheet(sheetNum); FormSheetFillEdit.ShowForm(sheet, FormSheetFillEdit_FormClosing); }
private void butGotoFamily_Click(object sender, EventArgs e) { if (!Security.IsAuthorized(Permissions.FamilyModule)) { return; } if (gridMain.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select a patient first."); return; } WindowState = FormWindowState.Minimized; long patNum = PIn.Long(gridMain.SelectedTag <DataRow>()["PatNum"].ToString()); GotoModule.GotoFamily(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; } }
private void SendPinboard_Click() { if (gridMain.SelectedIndices.Length == 0) { MsgBox.Show(this, "Please select an appointment first."); return; } List <long> listAppts = new List <long>(); for (int i = 0; i < gridMain.SelectedIndices.Length; i++) { listAppts.Add(_listPlannedAppts[gridMain.SelectedIndices[i]].AptNum); //Will only be one unless multiselect is enabled in the future _listPlannedAppts.RemoveAt(gridMain.SelectedIndices[i]); } GotoModule.PinToAppt(listAppts, 0); //This will send all appointments in _listAptSelected to the pinboard, and will select the patient attached to the last appointment in _listAptSelected. FillGrid(); }
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(); }