Beispiel #1
0
 /**************************************************************************************************/
 private void FollowupListChanged(HraListChangedEventArgs e)
 {
     if (e.hraOperand != null)
     {
         PtFollowup theFollowup = (PtFollowup)e.hraOperand;
     }
 }
Beispiel #2
0
        private void FollowupListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task t = (Task)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        foreach (PtFollowup f in t.FollowUps)
                        {
                            timelineData.Add(f);
                        }
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        break;
                }
            }
        }
Beispiel #3
0
 /**************************************************************************************************/
 private void theClinObservationsChanged(HraListChangedEventArgs e)
 {
     FillStatusControls();
 }
Beispiel #4
0
        /**************************************************************************************************/
        private void AppointmentListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Appointment theAppt = (Appointment) e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        break;
                }
            }
        }
        /**************************************************************************************************/
        private void PendingGenTestListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                PendingGeneticTest theGenTest = (PendingGeneticTest)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        break;
                }
            }
        }
Beispiel #6
0
 /**************************************************************************************************/
 private void NationalityChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #7
0
 /**************************************************************************************************/
 private void GUIPreferenceListChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #8
0
        /**************************************************************************************************/
        private void FhxChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Person p = (Person)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        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);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        p.ReleaseListeners(this);
                        break;
                }

                fhx.SetIDsFromRelationships();
                pedigreeControl1.SetPedigreeFromFHx(fhx);

            }
        }
Beispiel #9
0
        /**************************************************************************************************/
        private void theTransvaginalImagingHxChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                TransvaginalImagingStudy theStudy = (TransvaginalImagingStudy)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        fastDataListView1.AddObject(theStudy);
                        fastDataListView1.SelectedObject = theStudy;
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        RemoveDxFromList(theStudy);
                        break;
                }
            }
        }
        /**************************************************************************************************/
        private void RaceEthnicityChanged(HraListChangedEventArgs e)
        {
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                checkedListBox1.SetItemChecked(i, false);
            }

            foreach (Race r in proband.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);
                        break;
                    }
                }
            }

            FillRaceEthnicityControls();
        }
Beispiel #11
0
 /**************************************************************************************************/
 private void GailModelChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #12
0
 /**************************************************************************************************/
 private void ClausModelChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #13
0
 /**************************************************************************************************/
 private void BracproCancerRiskChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #14
0
 /**************************************************************************************************/
 private void TcChanged_v7(HraListChangedEventArgs e)
 {
 }
Beispiel #15
0
        /**************************************************************************************************/
        private void ClinicalObservationListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null && selectedRelative != null)
            {
                ClincalObservation co = (ClincalObservation)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        PMHRow pmhRow = new PMHRow(co, this);
                        pmhRow.disease.Text = co.disease;
                        flowLayoutPanel1.Controls.Add(pmhRow);
                        pmhRow.disease.Focus(); // drive focus to the first input control jdg 11/16/12

                        //setup grouping
                        int selectedGroupID = 1;
                        String groupName = diseaseGroupComboBox.Text;
                        if (!String.IsNullOrEmpty(groupName))
                        {
                            selectedGroupID = this.diseases
                                .Where(t => ((DiseaseObject)t).groupingName.Equals(groupName))
                                .Select(t => ((DiseaseObject)t).groupingID)
                                .Distinct()
                                .SingleOrDefault();
                        }
                        pmhRow.setGroupID(selectedGroupID);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:

                        Control doomed = null;

                        foreach (Control c in flowLayoutPanel1.Controls.OfType<PMHRow>())
                        {
                            PMHRow targetRow = (PMHRow)c;
                            if (targetRow.GetCO() == co)
                                doomed = c;
                        }
                        if (doomed != null)
                            flowLayoutPanel1.Controls.Remove(doomed);

                        if (pmh.Observations.Count == 0)
                            noLabel.Visible = true;

                        break;
                }
            }
        }
        private void listChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Person target = (Person)e.hraOperand;
                FamilyHistoryRelativeRow fhrr = null;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        Application.DoEvents();
                        fhrr = new FamilyHistoryRelativeRow(target);
                        flowLayoutPanel1.Controls.Add(fhrr);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control toRemove = null;
                        foreach(Control c in flowLayoutPanel1.Controls)
                        {
                            fhrr = (FamilyHistoryRelativeRow)c;
                            if (fhrr.GetRelative().relativeID == target.relativeID)
                            {
                                toRemove = fhrr;
                                break;
                            }
                        }
                        if (toRemove != null)
                        {
                            flowLayoutPanel1.Controls.Remove(toRemove);
                        }
                        break;
                }

                foreach (Control c in flowLayoutPanel1.Controls)
                {
                    fhrr = (FamilyHistoryRelativeRow)c;
                    fhrr.SetDeleteButton();
                }
            }
        }
Beispiel #17
0
        /**************************************************************************************************/
        private void theLabsChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                RiskApps3.Model.PatientRecord.Labs.LabResult theStudy = (RiskApps3.Model.PatientRecord.Labs.LabResult)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        fastDataListView1.AddObject(theStudy);
                        fastDataListView1.SelectedObject = theStudy;
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        RemoveDxFromList(theStudy);
                        break;
                }
            }
        }
Beispiel #18
0
        /**************************************************************************************************/
        private void GeneticTestListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                GeneticTest geneticTest = (GeneticTest)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:

                        GeneticTestingRowExpandable newRow = new GeneticTestingRowExpandable(this, geneticTest);
                        flowLayoutPanel1.Controls.Add(newRow);

                        //setup grouping
                        int selectedGroupID = 1;
                        String groupName = testGroupComboBox.Text;
                        if (!String.IsNullOrEmpty(groupName))
                        {
                            selectedGroupID = this.testList
                                    .Where(t => ((GeneticTestObject)t).groupingName.Equals(groupName))
                                    .Select(t => ((GeneticTestObject)t).groupingID)
                                    .Distinct()
                                    .SingleOrDefault();
                        }
                        newRow.setGroupID(selectedGroupID);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control doomed = null;
                        foreach (Control c in flowLayoutPanel1.Controls)
                        {
                            GeneticTestingRowExpandable targetRow = (GeneticTestingRowExpandable)c;
                            if (targetRow.GetGeneticTest() == geneticTest)
                                doomed = c;
                        }
                        if (doomed != null)
                            flowLayoutPanel1.Controls.Remove(doomed);

                        if (pmh.GeneticTests.Count == 0)
                            noLabel.Visible = true;

                        break;
                }
            }
        }
Beispiel #19
0
        /**************************************************************************************************/
        private void ClinicalObservationListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                ClincalObservation co = (ClincalObservation)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        co.AddHandlersWithLoad(ClinicalObservationChanged, null, null);
                        if (!String.IsNullOrEmpty(co.disease))
                        {
                            pedigreeLegend1.AddSingleObservation(co, true);
                            if (currentPrefs != null)
                            {
                                currentPrefs.GUIPreference_LegendX = pedigreeLegend1.Location.X;
                                currentPrefs.GUIPreference_LegendY = pedigreeLegend1.Location.Y;
                                currentPrefs.GUIPreference_LegendWidth = pedigreeLegend1.Size.Width;
                                currentPrefs.GUIPreference_LegendHeight = pedigreeLegend1.Size.Height;
                            }
                        }

                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        bool remove = true;
                        foreach (Person p in proband.FHx)
                        {
                            foreach (ClincalObservation dx in p.PMH.Observations)
                            {
                                if (string.Compare(co.ClinicalObservation_diseaseDisplayName, dx.ClinicalObservation_diseaseDisplayName, true) == 0 &&
                                    string.Compare(co.ClinicalObservation_diseaseShortName, dx.ClinicalObservation_diseaseShortName) == 0)
                                {
                                    remove = false;
                                }
                            }
                        }
                        if (remove)
                        {
                            pedigreeLegend1.RemoveObservation(co);
                            if (currentPrefs != null)
                            {
                                currentPrefs.GUIPreference_LegendX = pedigreeLegend1.Location.X;
                                currentPrefs.GUIPreference_LegendY = pedigreeLegend1.Location.Y;
                                currentPrefs.GUIPreference_LegendWidth = pedigreeLegend1.Size.Width;
                                currentPrefs.GUIPreference_LegendHeight = pedigreeLegend1.Size.Height;
                            }
                        }

                        co.ReleaseListeners(this);
                        break;
                }

                if (currentPrefs != null)
                {
                    //currentPrefs.GUIPreference_LegendHeight = pedigreeLegend1.Height;
                    //currentPrefs.GUIPreference_LegendWidth = pedigreeLegend1.Width;

                    if (currentPrefs.GUIPreference_ShowLegend)
                        pedigreeLegend1.CheckForEmpty();
                    else
                        pedigreeLegend1.Visible = false;
                }
            }
        }
Beispiel #20
0
        /**************************************************************************************************/
        private void FollowupListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                PtFollowup theFollowup = (PtFollowup) e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        PtFollowupRow ptr = new PtFollowupRow(theFollowup);
                        ptr.Width = FollowupFlowPanel.Width - 30;
                        FollowupFlowPanel.Controls.Add(ptr);
                        FollowupFlowPanel.Controls.SetChildIndex(ptr, 0);
                        //SetSplitterDist(ptr.Height + ptr.Margin.Top);

                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control doomed = null;
                        foreach (Control row in FollowupFlowPanel.Controls)
                        {
                            PtFollowupRow r = (PtFollowupRow) row;
                            if (r.GetFollowup() == theFollowup)
                            {
                                doomed = row;
                            }
                        }
                        if (doomed != null)
                        {
                            FollowupFlowPanel.Controls.Remove(doomed);
                            splitContainer1.SplitterDistance -= doomed.Height;
                        }
                        break;
                }
            }
        }
Beispiel #21
0
        /**************************************************************************************************/
        private void GeneticTestListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                GeneticTest gt = (GeneticTest)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        gt.AddHandlersWithLoad(GeneticTestChanged, null, null);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        lock (FamilialVariants)
                        {
                            FamilialVariants = this.fhx.ReloadFamilialVariants();

                            if(true)
                            {
                                string label = "";
                                bool found = false;
                                foreach (GeneticTestResult pos in FamilialVariants.Keys)
                                {
                                    label += pos.geneName + " " + pos.mutationName + " " + pos.resultSignificance + "\n";
                                }
                                pedigreeTitleBlock1.SetVariantLabel(label);
                            }
                        }
                        gt.ReleaseListeners(this);
                        break;
                }
            }
        }
        /**************************************************************************************************/
        private void TaskListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task theTask = (Task) e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        CommunicationEntry ce = new CommunicationEntry();
                        ce.title = theTask.Task_Type;
                        ce.Tag = theTask;
                        ce.author = theTask.Task_AssignedBy;
                        ce.date = theTask.Task_Date;
                        objectListView1.AddObject(ce);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        object doomed = null;
                        ;
                        foreach (object o in objectListView1.Objects)
                        {
                            CommunicationEntry doomed_ce = (CommunicationEntry) o;
                            if (doomed_ce.Tag == theTask)
                            {
                                doomed = o;
                            }
                        }
                        if (doomed != null)
                        {
                            if (splitContainer1.Panel2.Controls.Contains(taskViewUC))
                            {
                                if (taskViewUC.Task == theTask)
                                {
                                    taskViewUC.Release();
                                    splitContainer1.Panel2.Controls.Remove(taskViewUC);

                                }

                            }
                            objectListView1.RemoveObject(doomed);

                        }
                        break;
                }
            }
        }
Beispiel #23
0
        /**************************************************************************************************/
        private void EthnicityListChanged(HraListChangedEventArgs e)
        {
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
            {
                checkedListBox1.SetItemChecked(i, false);
            }

            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);
                        break;
                    }
                }
            }
        }
Beispiel #24
0
 /**************************************************************************************************/
 private void ClinicalObservationListChanged(HraListChangedEventArgs e)
 {
     if (e.hraOperand != null)
     {
         ClincalObservation col = (ClincalObservation)(e.hraOperand);
         SetNewRelativePMH(listView1, col.owningPMH);
     }
 }
Beispiel #25
0
 /**************************************************************************************************/
 private void PediatricCDSChanged(HraListChangedEventArgs e)
 {
 }
Beispiel #26
0
 private void listChanged(HraListChangedEventArgs e)
 {
     FillControls();
 }
Beispiel #27
0
        private void ActivePatientTaskListChanged(HraListChangedEventArgs e)
        {
            Task t = (Task)e.hraOperand;

            switch (e.hraListChangeType)
            {
                case HraListChangedEventArgs.HraListChangeType.ADD:
                    if (t.Task_Type == "Task" && t.Task_Status == "Pending")
                    {
                        AddTab(t);
                    }
                    break;
                case HraListChangedEventArgs.HraListChangeType.DELETE:

                    RemoveTabPage(t.taskID);

                    break;
            }
        }
Beispiel #28
0
        /**************************************************************************************************/
        private void TaskListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task t = (Task)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        break;
                }
            }
        }
        /**************************************************************************************************/
        private void TaskListChanged(HraListChangedEventArgs e)
        {
            if (e.hraOperand != null)
            {
                Task t = (Task)e.hraOperand;

                switch (e.hraListChangeType)
                {
                    case HraListChangedEventArgs.HraListChangeType.ADD:
                        PendingTaskSummaryRow ptsr = new PendingTaskSummaryRow(t);
                        ptsr.Width = flowLayoutPanel1.Width - 10;
                        flowLayoutPanel1.Controls.Add(ptsr);
                        break;
                    case HraListChangedEventArgs.HraListChangeType.DELETE:
                        Control doomedptsr = null;
                        foreach (Control c in flowLayoutPanel1.Controls)
                        {
                            if (((PendingTaskSummaryRow)c).GetTask() == t)
                            {
                                doomedptsr = c;
                            }
                        }
                        if (doomedptsr != null)
                            flowLayoutPanel1.Controls.Remove(doomedptsr);
                        break;
                }
            }
        }
Beispiel #30
0
 /**************************************************************************************************/
 private void CCRATCancerRiskChanged(HraListChangedEventArgs e)
 {
 }