Esempio n. 1
0
        private void updateRespiratoryRhythm(object sender, PropertyEnum.PropertyEnumEventArgs e)
        {
            if (!chkClampVitals.IsChecked ?? false || selStep == null)
            {
                return;
            }

            Patient p = ((ItemStep)selStep).Patient;

            Respiratory_Rhythms.Default_Vitals v = Respiratory_Rhythms.DefaultVitals(
                (Respiratory_Rhythms.Values)Enum.Parse(typeof(Respiratory_Rhythms.Values), e.Value));

            p.RR      = (int)II.Math.Clamp((double)p.RR, v.RRMin, v.RRMax);
            p.RR_IE_I = (int)II.Math.Clamp((double)p.RR_IE_I, v.RR_IE_I_Min, v.RR_IE_I_Max);
            p.RR_IE_E = (int)II.Math.Clamp((double)p.RR_IE_E, v.RR_IE_E_Min, v.RR_IE_E_Max);

            updatePropertyView();
        }
Esempio n. 2
0
        private void OnRespiratoryRhythmSelected(object sender, SelectionChangedEventArgs e)
        {
            if (!(bool)checkDefaultVitals.IsChecked || App.Patient == null)
            {
                return;
            }

            int   si = comboRespiratoryRhythm.SelectedIndex;
            Array ev = Enum.GetValues(typeof(Respiratory_Rhythms.Values));

            if (si < 0 || si > ev.Length - 1)
            {
                return;
            }

            Respiratory_Rhythms.Default_Vitals v = Respiratory_Rhythms.DefaultVitals(
                (Respiratory_Rhythms.Values)ev.GetValue(si));

            numRR.Value = (int)Utility.Clamp((double)numRR.Value, v.RRMin, v.RRMax);
        }