Exemplo n.º 1
0
        }                               // Default constructor for serialization

        public PastMedicalHistory(Person owner)
        {
            RelativeOwningPMH = owner;

            Observations = new ClinicalObservationList(this);

            GeneticTests = new GeneticTestList(this);
        }
Exemplo n.º 2
0
 /**************************************************************************************************/
 private void ClinicalObservationListLoaded(HraListLoadedEventArgs e)
 {
     if (e.sender != null)
     {
         ClinicalObservationList col = (ClinicalObservationList)(e.sender);
         SetNewRelativePMH(listView1, col.OwningPMH);
     }
 }
Exemplo n.º 3
0
        public void AddObservations(ClinicalObservationList dxList)
        {
            if (flowLayoutPanel.InvokeRequired)
            {
                AddObservationsCallback aoc = new AddObservationsCallback(AddObservations);
                object[] args = new object[1];
                args[0] = dxList;
                this.Invoke(aoc, args);
            }
            else
            {
                lock (dxList)
                {
                    foreach (ClincalObservation co in dxList)
                    {
                        bool add = true;
                        foreach (Control c in flowLayoutPanel.Controls)
                        {
                            PedigreeLegendRow plr            = (PedigreeLegendRow)c;
                            string            plrDisplayName = plr.GetObservationisplayName();
                            string            plrShortName   = plr.GetObservationisplayShortName();
                            if (string.Compare(co.ClinicalObservation_diseaseDisplayName, plrDisplayName, true) == 0 &&
                                string.Compare(co.ClinicalObservation_diseaseShortName, plrShortName) == 0)
                            {
                                add = false;
                                break;
                            }
                        }
                        if (add)
                        {
                            if (string.IsNullOrEmpty(co.disease) == false)
                            {
                                PedigreeLegendRow plr = new PedigreeLegendRow();
                                plr.SetObservation(co);
                                flowLayoutPanel.Controls.Add(plr);

                                this.Height = flowLayoutPanel.Location.Y + plr.Location.Y + plr.Height + legendPadding;
                                this.Refresh();
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
 public void AddObservations(ClinicalObservationList dxList)
 {
     if (flowLayoutPanel.InvokeRequired)
     {
         AddObservationsCallback aoc = AddObservations;
         object[] args = new object[1];
         args[0] = dxList;
         this.Invoke(aoc, args);
     }
     else
     {
         lock (dxList)
         {
             foreach (ClincalObservation co in dxList)
             {
                 AddClinicalObservation(co);
             }
             CheckForEmpty();
         }
         CalculateOptimalDimensions();
     }
 }
Exemplo n.º 5
0
        public void FillStatusControls()
        {
            if (loadingCircle1.InvokeRequired)
            {
                FillStatusControlsCallback aoc = new FillStatusControlsCallback(FillStatusControls);
                this.Invoke(aoc);
            }
            else
            {
                Font f = new Font("Tahoma", 8.0f, FontStyle.Bold);

                objectListView1.ColumnsInDisplayOrder[1].Renderer = null;
                //TODO how to modify column style???

                List <PatientStatusRow> listPSR = new List <PatientStatusRow>();
                listPSR.Add(new PatientStatusRow("Hx:", String.IsNullOrEmpty(proband.follupSatus.Diseases) ? "No Known Diseases" : proband.follupSatus.Diseases));
                listPSR.Add(new PatientStatusRow("Risk of Mutation:", (proband.follupSatus.MaxBRCAProMyriadScore != null) ? ((double)proband.follupSatus.MaxBRCAProMyriadScore).ToString("##.#") + "%" : "N/A"));
                listPSR.Add(new PatientStatusRow("Lifetime Risk Breast Cancer:", (proband.follupSatus.MaxLifetimeScore != null) ? ((double)proband.follupSatus.MaxLifetimeScore).ToString("##.#") + "%" : "N/A"));

                string brcaTestFamily = "";
                if (String.IsNullOrEmpty(proband.follupSatus.BreastFamilyGene))
                {
                    brcaTestFamily = "No Testing In Family";
                }
                else if (proband.follupSatus.BreastFamilyGene.Contains(","))
                {
                    brcaTestFamily = proband.follupSatus.BreastFamilyMutationSignificance.Replace("BRCA1: Negative, BRCA2: Negative", "Negative");
                }
                else
                {
                    brcaTestFamily = proband.follupSatus.BreastFamilyGene + ": " + proband.follupSatus.BreastFamilyMutationSignificance;
                }

                listPSR.Add(new PatientStatusRow("BRCA Test, Family:", brcaTestFamily));
                listPSR.Add(new PatientStatusRow("BRCA Test, Patient:", String.IsNullOrEmpty(proband.follupSatus.BreastProbandResult) ? "No Testing In Family" : proband.follupSatus.BreastProbandResult));
                listPSR.Add(new PatientStatusRow("Atypia/LCIS:", proband.follupSatus.AtypiaLCIS));
                objectListView1.SetObjects(listPSR);


                //Get relevant surgeries from disease history
                observations = proband.PMH.Observations;
                lock (observations)
                {
                    String breastSurgeryStatusStr = "Breasts Intact";

                    ClincalObservation co = (ClincalObservation)(observations.SingleOrDefault(v => ((ClincalObservation)v).disease == "Bilateral Mastectomy"));
                    if (co != null)
                    {
                        breastSurgeryStatusStr = "Bilateral Mastectomy";
                    }
                    else
                    {
                        co = (ClincalObservation)(observations.SingleOrDefault(v => ((ClincalObservation)v).disease == "Unilateral Mastectomy"));
                        if (co != null)
                        {
                            breastSurgeryStatusStr = "Unilateral Mastectomy";
                        }
                    }
                    if (breastSurgeryStatusStr == "Breasts Intact")
                    {
                        co = (ClincalObservation)(observations.SingleOrDefault(v => ((ClincalObservation)v).disease == "Mastectomy"));
                        if (co != null)
                        {
                            breastSurgeryStatusStr = "Mastectomy";
                        }
                    }

                    breastSurgeryStatus.Text = breastSurgeryStatusStr;

                    String ovarySurgeryStatusStr = "Ovaries Intact";

                    co = (ClincalObservation)(observations.SingleOrDefault(v => ((ClincalObservation)v).disease == "Bilateral Oophorectomy"));
                    if (co != null)
                    {
                        ovarySurgeryStatusStr = "Bilateral Oophorectomy";
                    }


                    ovarySurgeryStatus.Text = ovarySurgeryStatusStr;
                }

                //////////////////////
                breastSurgeryRec.Text = SessionManager.Instance.MetaData.BrOvCdsRecs.GetRecTextFromID(proband.cdsBreastOvary.ProphMastRec);
                breastChemoRec.Text   = SessionManager.Instance.MetaData.BrOvCdsRecs.GetRecTextFromID(proband.cdsBreastOvary.ChemoRec);
                ovarySurgeryRec.Text  = SessionManager.Instance.MetaData.BrOvCdsRecs.GetRecTextFromID(proband.cdsBreastOvary.ProphOophRec);
                ovaryChemoRec.Text    = SessionManager.Instance.MetaData.BrOvCdsRecs.GetRecTextFromID(proband.cdsBreastOvary.OCRec);


                //set long lasting tooltips Breast
                ttBreastSurgeryValue.SetToolTip(breastSurgeryRec, breastSurgeryRec.Text);
                setToolTip30SecDelay(ttBreastSurgeryValue);
                ttBreastChemoValue.SetToolTip(breastChemoRec, breastChemoRec.Text);
                setToolTip30SecDelay(ttBreastChemoValue);

                //set long lasting tooltips Ovary
                ttOvarySurgeryValue.SetToolTip(ovarySurgeryRec, ovarySurgeryRec.Text);
                setToolTip30SecDelay(ttOvarySurgeryValue);
                ttOvaryChemoValue.SetToolTip(ovaryChemoRec, ovaryChemoRec.Text);
                setToolTip30SecDelay(ttOvaryChemoValue);

                if (proband.transvaginalImagingHx.IsLoaded &&
                    proband.follupSatus.HraState == HraObject.States.Ready &&
                    proband.labsHx.IsLoaded &&
                    proband.breastImagingHx.IsLoaded)
                {
                    loadingCircle1.Active  = false;
                    loadingCircle1.Visible = false;
                }
            }
        }