Ejemplo n.º 1
0
Archivo: Form1.cs Proyecto: hr4e/csharp
        //add vitals in triage
        private void button10_Click(object sender, EventArgs e)
        {
            bool recordVital = false;
            if (textBox31.Text.Length != 0) recordVital = true;
            if (textBox30.Text.Length != 0) recordVital = true;
            if (textBox32.Text.Length != 0) recordVital = true;
            if (textBox25.Text.Length != 0) recordVital = true;

            if (recordVital)
            {
                TriageVitals tv = new TriageVitals();
                DateTime d = DateTime.Now;
                string hour = d.Hour.ToString();
                if (hour.Length == 1) hour = "0" + hour;
                string minute = d.Minute.ToString();
                if (minute.Length == 1) minute = "0" + minute;
                tv.situation = "(" + hour + ":" + minute + ") " + textBox24.Text;
                if (textBox25.Text.Length > 0)
                {
                    tv.t = textBox25.Text;
                }

                if (textBox32.Text.Length > 0)
                {
                    tv.p = textBox32.Text;
                }

                if (textBox30.Text.Length > 0)
                {
                    tv.bp = textBox30.Text;
                }

                if (textBox31.Text.Length > 0)
                {
                    tv.o2sat = textBox31.Text;
                }

                triageStatus.triageVitals.Add(tv);

                TriageDisplayListUpdate();
                TriageUpdateDisplay();
            }
        }
Ejemplo n.º 2
0
Archivo: Form1.cs Proyecto: hr4e/csharp
        private void LoadStoredTriageData()
        {
            triageStatus.triageVitals = new List<TriageVitals>();
            label75.Text = patientForm.encounterData.encounter.reason;

            #region add vitals
            foreach (VitalSign v in patientForm.encounterData.vitalSigns)
            {
                if (v.comment.Contains("Triage"))
                {
                    string situation = v.comment.Replace("Triage: ", "");
                    situation = situation.Substring(8);
                    bool triageVitalCreated = false;
                    int index = -1;

                    TriageVitals t = new TriageVitals();
                    for( int i = 0; i < triageStatus.triageVitals.Count; i++)
                    {
                        TriageVitals tv = triageStatus.triageVitals[i]; ;
                        if (tv.situation == situation)
                        {
                            triageVitalCreated = true;
                            t = tv;
                            index = i;
                            break;
                        }
                    }

                    if (!triageVitalCreated)
                    {
                        t = new TriageVitals();
                        t.situation = situation;
                    }

                    if (v.displayName == "Tempurature")
                    {
                        t.t = v.value;
                    }
                    else if (v.displayName == "pulse")
                    {
                        t.p = v.value;
                    }
                    else if (v.displayName == "blood pressure")
                    {
                        t.bp = v.value;
                    }
                    else if (v.displayName == "o2 saturation")
                    {
                        t.o2sat = v.value;
                    }

                    if (triageVitalCreated)
                    {
                        triageStatus.triageVitals[index] = t;
                    }
                    else triageStatus.triageVitals.Add(t);
                }
            }
            #endregion
        }