Пример #1
0
        private void ageDiagnosis_Validated(object sender, EventArgs e)
        {
            foreach (ClincalObservation co in PMHHx.Observations)
            {
                if (co.disease.Equals("Bilateral Oophorectomy"))
                {
                    if ((String.IsNullOrEmpty(ageDiagnosis.Text)) || (bothOvariesRemoved.Text != "Yes"))
                    {
                        PMHHx.Observations.RemoveFromList(co, SessionManager.Instance.securityContext);
                    }
                    else
                    {
                        co.ageDiagnosis = ageDiagnosis.Text;
                        HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
                        args.Persist = true;
                        args.updatedMembers.Add(co.GetMemberByName("ageDiagnosis"));
                        co.SignalModelChanged(args);
                    }
                    return;
                }
            }

            // add the disease...
            if (bothOvariesRemoved.Text.Equals("Yes"))
            {
                ClincalObservation co2 = new ClincalObservation(PMHHx);
                co2.disease = "Bilateral Oophorectomy";
                co2.SetDiseaseDetails();
                //SessionManager.Instance.MetaData.Diseases.SetDataFromDiseaseName(ref co2);
                co2.ageDiagnosis = ageDiagnosis.Text;
                HraModelChangedEventArgs args2 = new HraModelChangedEventArgs(null);
                args2.Persist = true;
                PMHHx.Observations.AddToList(co2, args2);
            }
        }
Пример #2
0
 private void comboBox8_Validated(object sender, EventArgs e)
 {
     if (comboBox8.Tag != null)
     {
         ClincalObservation       co   = (ClincalObservation)comboBox8.Tag;
         HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
         if (comboBox8.Text.Length > 0)
         {
             co.disease      = comboBox8.Text;
             co.ageDiagnosis = textBox4.Text;
             co.SetDiseaseDetails();
         }
         else
         {
             args.Delete = true;
         }
         co.SignalModelChanged(args);
     }
     else if (comboBox8.Text.Length > 0)
     {
         ClincalObservation co = new ClincalObservation(pmh);
         co.disease      = comboBox8.Text;
         co.ageDiagnosis = textBox4.Text;
         co.SetDiseaseDetails();
         HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
         pmh.Observations.AddToList(co, args);
         comboBox8.Tag = co;
     }
 }
Пример #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (pmh != null && sendingView != null)
            {
                ClincalObservation co = new ClincalObservation(pmh);
                co.disease = diseaseComboBox.Text;

                co.ageDiagnosis = AgeTextBox.Text;

                co.SetDiseaseDetails();
                HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
                args.Persist = true;

                pmh.Observations.AddToList(co, args);

                this.Close();
            }
        }