/**************************************************************************************************/ private void ListLoaded(HraListLoadedEventArgs e) { foreach (Provider u in SessionManager.Instance.MetaData.ApptProviders) { comboBox1.Items.Add(u); } }
private void FhxLoaded(HraListLoadedEventArgs e) { lock (proband.FHx) { foreach (Person p in proband.FHx) { p.PMH.GeneticTests.AddHandlersWithLoad(null, GtLoaded, null); } } }
private void FHLoaded(HraListLoadedEventArgs e) { loadingCircle1.Active = true; loadingCircle1.Visible = true; foreach (Person fm in SessionManager.Instance.GetActivePatient().FHx.Relatives) { fm.RP.AddHandlersWithLoad(null, RelativeRPLoaded, null); } }
/**************************************************************************************************/ private void NCCNLoaded(HraListLoadedEventArgs list_e) { fastDataListView1.Enabled = true; loadingCircle1.Enabled = false; loadingCircle1.Visible = false; //Application.DoEvents(); fastDataListView1.ClearObjects(); fastDataListView1.SetObjects(proband.RP.NCCNGuideline); fastDataListView1.Columns[1].Width = -2; // fastDataListView1.Sort(olvColumn7, SortOrder.Descending); //for (int i=0; i< fastDataListView1.Items.Count; i++) //{ // //fastDataListView1.Items[i].BackColor = Color.Red; // //lvi.BackColor = Color.Red; // BrightIdeasSoftware.OLVListItem olv = (BrightIdeasSoftware.OLVListItem)fastDataListView1.GetItem(i); // olv.BackColor = Color.Red; //} }
/**************************************************************************************************/ private void UsersReadyForParagraphEditor(HraListLoadedEventArgs e) { User u = (User)SessionManager.Instance.MetaData.Users .FirstOrDefault(l => ((User)l).userLogin == userLogin); this.Hide(); if (u != null) { SessionManager.Instance.ActiveUser = u; AdminMainForm amf = new AdminMainForm(); amf.ShowDialog(); } else { MessageBox.Show( "User " + userLogin + " is not in the riskApps database.", "Unable to login."); } this.Close(); }
private void AppointmentListLoaded(HraListLoadedEventArgs e) { if (fastDataListView1.ModelFilter != null) { CompositeAllFilter currentFilter = (CompositeAllFilter) fastDataListView1.ModelFilter; currentFilter.Filters.Clear(); } lock (appts) { //loadingCircle1.Enabled = false; //loadingCircle1.Visible = false; //CompositeAllFilter currentFilter = null; //OlderApptFilter oaf = new OlderApptFilter(); //List<IModelFilter> listOfFilters = new List<IModelFilter>(); //listOfFilters.Add(oaf); //add the filter //currentFilter = new CompositeAllFilter(listOfFilters); //fastDataListView1.ModelFilter = currentFilter; Appointment a = ((Appointment) (fastDataListView1.SelectedObject)); bool found = false; fastDataListView1.ClearObjects(); fastDataListView1.SetObjects(appts); if (a != null) { foreach (object o in fastDataListView1.Objects) { if (((Appointment) o).apptID == ((Appointment) a).apptID) { fastDataListView1.SelectedObject = o; found = true; break; } } } if (found == false) { SessionManager.Instance.ClearActivePatient(); } fastDataListView1.Visible = true; //label1.Text = appts.Count.ToString() + " Total"; label1.Text = fastDataListView1.Items.Count.ToString() + " Results"; } }
private void TaskListLoadedForPopup(HraListLoadedEventArgs e) { RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient(); if (p != null) { Task t = new Task(p, "Task", "Pending", SessionManager.Instance.ActiveUser.ToString(), DateTime.Now); HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); args.Persist = true; p.Tasks.AddToList(t, args); TaskView tv = new TaskView(t); tv.ShowDialog(); p.Tasks.ReleaseListeners(this); RefreshQueue(); } }
private void PendingGenTestListLoaded(HraListLoadedEventArgs e) { loadingCircle1.Enabled = false; loadingCircle1.Visible = false; loadingCircle1.Active = false; fastDataListView1.SetObjects(pendingGenTests); if (pendingGenTests.Count > 0) { fastDataListView1.SelectedObject = pendingGenTests[0]; fastDataListView1.SelectObject(pendingGenTests[0], true); } label1.Text = pendingGenTests.Count.ToString() + " Patients"; foreach (OLVColumn c in fastDataListView1.Columns) { int w = c.Width; c.Width = -2; if (c.Width < w) c.Width = w; } }
/**************************************************************************************************/ private void ListLoaded(HraListLoadedEventArgs e) { //objectListView1.SetObjects(templates.Where(g => string.IsNullOrEmpty(((DocumentTemplate)g).htmlPath) == false)); if (string.IsNullOrEmpty(routine)==false) { foreach (DocumentTemplate dt in templates) { if (supported.Contains(dt.routineName)) { if (string.Compare(routine, dt.routineName, true) == 0 || string.Compare(dt.routineName, "surveySummary", true) == 0) { objectListView2.AddObject(dt); } else { objectListView1.AddObject(dt); } } } } else { foreach (DocumentTemplate dt in templates) { if (dt.suggested == 1 || string.Compare(dt.routineName, "surveySummary", true) == 0) { objectListView2.AddObject(dt); } else { if (string.IsNullOrEmpty(dt.htmlPath) == false) { objectListView1.AddObject(dt); } } } } }
/**************************************************************************************************/ private void NationalityLoaded(HraListLoadedEventArgs e) { for (int i = 0; i < checkedListBox2.Items.Count; i++) { checkedListBox2.SetItemChecked(i, false); } checkedListBox2.Enabled = true; foreach (Nation n in selectedRelative.Nationality) { for (int i = 0; i < checkedListBox2.Items.Count; i++) { if (string.Compare(checkedListBox2.Items[i].ToString(), n.nation, true) == 0) { checkedListBox2.SetItemChecked(i, true); //checkedListBox2.SetItemCheckState(i, CheckState.Checked); break; } } } }
/**************************************************************************************************/ private void loadFinished(HraListLoadedEventArgs e) { FamilialVariants = new Dictionary<GeneticTestResult,List<Person>>(); FamilialVariants.Clear(); pedigreeTitleBlock1.SetVariantLabel(""); pedigreeTitleBlock1.NameText = fhx.proband.name; pedigreeTitleBlock1.MRN = fhx.proband.unitnum; pedigreeTitleBlock1.DOB = fhx.proband.dob; pedigreeComment1.proband = SessionManager.Instance.GetActivePatient(); pedigreeComment1.Text = fhx.proband.family_comment; fhx.SetIDsFromRelationships(); pedigreeControl1.SetPedigreeFromFHx(fhx); lock (SessionManager.Instance.GetActivePatient().FHx) { //bd note collection modified foreach (Person p in SessionManager.Instance.GetActivePatient().FHx) { p.PMH.Observations.AddHandlersWithLoad(ClinicalObservationListChanged, ClinicalObservationListLoaded, ClinicalObservationChanged); p.PMH.GeneticTests.AddHandlersWithLoad(GeneticTestListChanged, GeneticTestListLoaded, GeneticTestChanged); p.Ethnicity.AddHandlersWithLoad(null, null, null); p.Nationality.AddHandlersWithLoad(null, null, null); } } }
/**************************************************************************************************/ private void GeneticTestListLoaded(HraListLoadedEventArgs e) { if (e.sender != null) { GeneticTestList theList = (GeneticTestList)(e.sender); if (theList.Count > 0) { foreach (GeneticTest gt in theList) { ProcessGeneticTest(); } } } }
/**************************************************************************************************/ private void FollowupListLoaded(HraListLoadedEventArgs e) { //if (task.FollowUps.Count == 0) //{ // if (task.Task_Type == "Patient Followup" || task.Task_Type == "To Do") // { // PtFollowup newFollowup = new PtFollowup(task); // HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); // args.Persist = false; // task.FollowUps.AddToList(newFollowup, args); // } //} //else //{ foreach (PtFollowup theFollowup in task.FollowUps.OrderBy(f => ((PtFollowup)f).Date)) { PtFollowupRow ptr = new PtFollowupRow(theFollowup); ptr.SetScrollState(false); ptr.Width = FollowupFlowPanel.Width - 30; FollowupFlowPanel.Controls.Add(ptr); } //} }
private void TestsLoaded(HraListLoadedEventArgs e) { this.setupGrouping(); this.setupPanels(); }
/**************************************************************************************************/ private void GeneticTestListLoaded(HraListLoadedEventArgs e) { FillControls(); }
/**************************************************************************************************/ private void ClinicalObservationListLoaded(HraListLoadedEventArgs e) { if (e.sender != null) { ClinicalObservationList theList = (ClinicalObservationList)(e.sender); if (theList.Count > 0) { foreach (ClincalObservation co in theList) { co.AddHandlersWithLoad(ClinicalObservationChanged, null, null); } pedigreeLegend1.AddObservations(theList); } if (currentPrefs != null) { //currentPrefs.GUIPreference_LegendHeight = pedigreeLegend1.Height; //currentPrefs.GUIPreference_LegendWidth = pedigreeLegend1.Width; if (currentPrefs.GUIPreference_ShowLegend) pedigreeLegend1.CheckForEmpty(); else pedigreeLegend1.Visible = false; } } }
private void TaskListLoaded(HraListLoadedEventArgs e) { RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient(); if (p != null) { string assignedBy = ""; if (SessionManager.Instance.ActiveUser != null) { if (string.IsNullOrEmpty(SessionManager.Instance.ActiveUser.ToString()) == false) { assignedBy = SessionManager.Instance.ActiveUser.ToString(); } } Task t = new Task(p, "Task", "Pending", assignedBy, DateTime.Now); HraModelChangedEventArgs args = new HraModelChangedEventArgs(null); args.Persist = true; p.Tasks.AddToList(t, args); TaskView tv = new TaskView(t); tv.ShowDialog(); p.Tasks.ReleaseListeners(this); RefreshQueue(); } }
/**************************************************************************************************/ private void GUIPreferenceListLoaded(HraListLoadedEventArgs e) { currentPrefs = getBestFitExistingGuiPreference(false); SettingsForm.preferences = currentPrefs; pedigreeControl1.currentPrefs = currentPrefs; pedigreeControl1.currentPrefs.GUIPreference_height = pedigreeControl1.Height; pedigreeControl1.currentPrefs.GUIPreference_width = pedigreeControl1.Width; ApplyPrefs(); }
/**************************************************************************************************/ private void TaskListLoaded(HraListLoadedEventArgs e) { FillControls(); }
/**************************************************************************************************/ private void EthnicityListLoaded(HraListLoadedEventArgs e) { for (int i = 0; i < checkedListBox1.Items.Count; i++) { checkedListBox1.SetItemChecked(i, false); } checkedListBox1.Enabled = true; foreach (Race r in selectedRelative.Ethnicity) { for (int i = 0; i < checkedListBox1.Items.Count; i++) { if (string.Compare(checkedListBox1.Items[i].ToString(), r.race, true) == 0) { checkedListBox1.SetItemChecked(i, true); //checkedListBox1.SetItemCheckState(i, CheckState.Checked); break; } } } }
public void AddHandlersWithLoad(ListChangedEventHandler listChangedEventHandler, LoadFinishedEventHandler loadFinishedEventHandler, ListItemChangedEventHandler itemChangedEventHandler) { #if (CHATTY_DEBUG) string msg = "*** HRA LIST AddHandlersWithLoad on : " + this.ToString() + System.Environment.NewLine; if (listChangedEventHandler != null) { msg += "By: " + listChangedEventHandler.Target.ToString(); } else if (loadFinishedEventHandler != null) { msg += "By: " + loadFinishedEventHandler.Target.ToString(); } else if (itemChangedEventHandler != null) { msg += "By: " + itemChangedEventHandler.Target.ToString(); } Logger.Instance.DebugToLog(msg); #endif if (listChangedEventHandler != null) { if (ListChanged == null) { ListChanged += listChangedEventHandler; } else { bool ok = true; foreach (Delegate d in ListChanged.GetInvocationList()) { if (d.Target == listChangedEventHandler.Target) { ok = false; } } if (ok) { ListChanged += listChangedEventHandler; } } } if (loadFinishedEventHandler != null) { if (LoadFinished == null) { LoadFinished += loadFinishedEventHandler; } else { bool ok = true; foreach (Delegate d in LoadFinished.GetInvocationList()) { if (d.Target == loadFinishedEventHandler.Target) { ok = false; } } if (ok) { LoadFinished += loadFinishedEventHandler; } } } if (itemChangedEventHandler != null) { if (ListItemChanged == null) { ListItemChanged += itemChangedEventHandler; } else { bool ok = true; foreach (Delegate d in ListItemChanged.GetInvocationList()) { if (d.Target == loadFinishedEventHandler.Target) { ok = false; } } if (ok) { ListItemChanged += itemChangedEventHandler; } } } if (loaded) { if (loadFinishedEventHandler != null) { HraListLoadedEventArgs args = new HraListLoadedEventArgs(); args.sender = this; args.workerArgs = new RunWorkerCompletedEventArgs(this, null, false); loadFinishedEventHandler.Invoke(args); } } else { LoadList(); } }
private void AppointmentListLoaded(HraListLoadedEventArgs e) { if (fastDataListView1.ModelFilter != null) { CompositeAllFilter currentFilter = (CompositeAllFilter)fastDataListView1.ModelFilter; currentFilter.Filters.Clear(); } lock (appts) { Appointment a = ((Appointment)(fastDataListView1.SelectedObject)); bool found = false; fastDataListView1.ClearObjects(); fastDataListView1.SetObjects(appts); if (a != null) { foreach (object o in fastDataListView1.Objects) { if (((Appointment)o).apptID == ((Appointment)a).apptID) { fastDataListView1.SelectedObject = o; found = true; break; } } } if (found == false) { SessionManager.Instance.ClearActivePatient(); } fastDataListView1.Visible = true; //label1.Text = appts.Count.ToString() + " Total"; label1.Text = fastDataListView1.Items.Count.ToString() + " Results"; } }
/**************************************************************************************************/ private void ClinicalObservationListLoaded(HraListLoadedEventArgs e) { if (e.sender != null) { ClinicalObservationList col = (ClinicalObservationList)(e.sender); SetNewRelativePMH(listView1, col.OwningPMH); } }
/**************************************************************************************************/ private void PediatricCDSLoaded(HraListLoadedEventArgs list_e) { loadingCircle1.Visible = false; loadingCircle1.Enabled = false; fastDataListView1.ClearObjects(); fastDataListView1.AddObjects(proband.PediatricCDS); try { label1.Text = proband.PediatricCDS.Max(g => ((PediatricRule)g).PediatricRule_created).ToString(); } catch (Exception ee) { Logger.Instance.WriteToLog(ee.ToString()); } label1.Visible = true; }
private void loadFinished(HraListLoadedEventArgs e) { FillControls(); }
private void ActivePatientTasksLoaded(HraListLoadedEventArgs e) { Patient p = SessionManager.Instance.GetActivePatient(); if (p!=null) { TaskList tasks = p.Tasks; if (tasks!=null) { foreach (Task task in tasks .Where(t => ((Task)t).Task_Type == "Task" && ((Task)t).Task_Status == "Pending") .OrderByDescending(t => ((Task)t).Task_Date)) { AddTab(task); } } } fastDataListView1.Focus(); }
/**************************************************************************************************/ private void TaskListLoaded(HraListLoadedEventArgs e) { }
private void UserGroupsLoaded(HraListLoadedEventArgs e) { //comboBox1.Items.Clear(); //comboBox1.Items.Add(SessionManager.Instance.ActiveUser.ToString()); //int numadded = 0; //foreach (UserGroupMembership group in SessionManager.Instance.MetaData.UserGroups) //{ // if (SessionManager.Instance.ActiveUser.userLogin == group.userLogin) // { // numadded++; // comboBox1.Items.Add(group.userGroup); // } //} //if (numadded > 1) //{ // comboBox1.Items.Add("All my groups"); //} //comboBox1.Items.Add("Entire Clinic"); }
/**************************************************************************************************/ private void theLabsLoaded(HraListLoadedEventArgs e) { fastDataListView1.AddObjects(proband.labsHx); if (InitialDx != null) { if (proband.labsHx.Contains(InitialDx as LabResult)) { fastDataListView1.SelectObject(InitialDx); } } else { if (fastDataListView1.SelectedObject == null) { if (fastDataListView1.Items.Count > 0) fastDataListView1.SelectedIndex = 0; } } }
/**************************************************************************************************/ private void TaskListLoaded(HraListLoadedEventArgs e) { flowLayoutPanel1.Controls.Clear(); tasks.Sort( Task.CompareTasksByReverseDate); foreach (Task t in tasks) { PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t); ptsr.Width = flowLayoutPanel1.Width - 10; flowLayoutPanel1.Controls.Add(ptsr); } }
/**************************************************************************************************/ private void theTransvaginalImagingHxLoaded(HraListLoadedEventArgs e) { fastDataListView1.AddObjects(proband.transvaginalImagingHx); if (InitialDx != null) { if (proband.transvaginalImagingHx.Contains(InitialDx as TransvaginalImagingStudy)) { fastDataListView1.SelectObject(InitialDx); } } else { if (fastDataListView1.SelectedObject == null) { if (fastDataListView1.Items.Count > 0) fastDataListView1.SelectedIndex = 0; } } }