Example #1
0
        /**************************************************************************************************/
        private void reCreateListOfRelativesToConsider()
        {
            flowLayoutPanel1.Controls.Clear();

            //For V3, we'll list all alive relatives >=18 y.o. (or age unavailable) w/BrcaPro Score >= 10% and no existing gen tests in descending order
            List<Person> familyMembers = SessionManager.Instance.GetActivePatient().FHx.Relatives;

            //Is this the coolest statement or what?
            List<Person> filteredList = familyMembers
                .Where(x => (x.vitalStatus != "Dead") && (x.RP.RiskProfile_BrcaPro_1_2_Mut_Prob >= 10.0) && (x.PMH.GeneticTests.Count == 0) && AgeGE18(x.age))
                .OrderByDescending(x => x.RP.RiskProfile_BrcaPro_1_2_Mut_Prob)
                .ToList();

            //Add the control rows.
            foreach (Person p in filteredList)
            {
                RelativeToConsiderRow r = new RelativeToConsiderRow(this);
                r.SetLabels(p.relativeID, String.Format("{0:#0.0}", Math.Round(p.RP.RiskProfile_BrcaPro_1_2_Mut_Prob ?? -1, 1)), p.name, p.relationship);
                flowLayoutPanel1.Controls.Add(r);
            }

            loadingCircle1.Active = false;
            loadingCircle1.Visible = false;
        }
        private void reCreateListOfRelativesToConsider()
        {
            if (this.InvokeRequired)
            {
                reCreateListOfRelativesToConsiderCallback rmc = new reCreateListOfRelativesToConsiderCallback(reCreateListOfRelativesToConsider);
                this.Invoke(rmc, null);
            }
            else
            {
                flowLayoutPanel1.Controls.Clear();
                flowLayoutPanel2.Controls.Clear();

                mutBRCA.Text = decorateNullableScore(proband.RP.RiskProfile_BrcaPro_1_2_Mut_Prob);
                mutMyriad.Text = decorateNullableScore(proband.RP.RiskProfile_Myriad_Brca_1_2);
                mutTC.Text = decorateNullableScore(proband.RP.RiskProfile_TyrerCuzick_Brca_1_2);
                mutTC7.Text = decorateNullableScore(proband.RP.RiskProfile_TyrerCuzick_v7_Brca_1_2);
                MMRProLabel.Text = decorateNullableScore(proband.RP.RiskProfile_MmrPro_1_2_6_Mut_Prob);
                label10.Text = (proband.RP.PREMM == null) ? "PREMM2" : "PREMM";
                PremmLabel.Text = decorateNullableScore((proband.RP.PREMM2 != null) ? proband.RP.RiskProfile_PREMM2 : proband.RP.RiskProfile_PREMM);

                //For V3, we'll list all alive relatives >=18 y.o. (or age unavailable) w/BrcaPro Score >= 10% and no existing gen tests in descending order
                List<Person> familyMembers = SessionManager.Instance.GetActivePatient().FHx.Relatives;

                //Is this the coolest statement or what?
                List<Person> filteredList = familyMembers
                    .Where(x => (x.vitalStatus != "Dead") && (x.RP.RiskProfile_BrcaPro_1_2_Mut_Prob >= 10.0) && (x.PMH.GeneticTests.Count == 0) && AgeGE18(x.age))
                    .OrderByDescending(x => x.RP.RiskProfile_BrcaPro_1_2_Mut_Prob)
                    .ToList();

                //Add the control rows.
                foreach (Person p in filteredList)
                {
                    RelativeToConsiderRow r = new RelativeToConsiderRow(this);
                    r.Width = flowLayoutPanel1.Width - 6;
                    //r.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    //        | System.Windows.Forms.AnchorStyles.Right)));
                    r.SetLabels(p.relativeID, String.Format("{0:#0.0}", Math.Round(p.RP.RiskProfile_BrcaPro_1_2_Mut_Prob ?? -1, 1)), p.name, p.relationship);
                    flowLayoutPanel1.Controls.Add(r);
                }

                //Is this the coolest statement or what?
                List<Person> filteredMmrList = familyMembers
                    .Where(x => (x.vitalStatus != "Dead") && (x.RP.RiskProfile_MmrPro_1_2_6_Mut_Prob >= 10.0 || x.RP.RiskProfile_PREMM >= 10.0) && (x.PMH.GeneticTests.Count == 0) && AgeGE18(x.age))
                    .OrderByDescending(x => x.RP.RiskProfile_MmrPro_1_2_6_Mut_Prob)
                    .ToList();

                //Add the control rows.
                foreach (Person p in filteredMmrList)
                {
                    RelativeToConsiderRow r = new RelativeToConsiderRow(this);
                    r.Width = flowLayoutPanel1.Width - 6;
                    //        r.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    //| System.Windows.Forms.AnchorStyles.Right)));
                    r.ShowDisposition = false;
                    r.SetLabels(p.relativeID, String.Format("{0:#0.0}", Math.Round(p.RP.RiskProfile_MmrPro_1_2_6_Mut_Prob ?? -1, 1)), p.name, p.relationship);
                    flowLayoutPanel2.Controls.Add(r);
                }

                loadingCircle1.Active = false;
                loadingCircle1.Visible = false;
            }
        }