Example #1
0
        private void updatePACatheterRhythm(object sender, PropertyEnum.PropertyEnumEventArgs e)
        {
            if (selStep == null)
            {
                return;
            }

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

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

            p.PSP = (int)II.Math.Clamp((double)p.PSP, v.PSPMin, v.PSPMax);
            p.PDP = (int)II.Math.Clamp((double)p.PDP, v.PDPMin, v.PDPMax);

            updatePropertyView();
        }
Example #2
0
        private void initPropertyView()
        {
            // Populate enum string lists for readable display
            List <string> cardiacRhythms     = new List <string> (),
                          respiratoryRhythms = new List <string> (),
                          pulmonaryRhythms   = new List <string> (),
                          cardiacAxes        = new List <string> (),
                          intensityScale     = new List <string> (),
                          fetalHeartRhythms  = new List <string> ();

            foreach (Cardiac_Rhythms.Values v in Enum.GetValues(typeof(Cardiac_Rhythms.Values)))
            {
                cardiacRhythms.Add(App.Language.Dictionary [Cardiac_Rhythms.LookupString(v)]);
            }

            foreach (Respiratory_Rhythms.Values v in Enum.GetValues(typeof(Respiratory_Rhythms.Values)))
            {
                respiratoryRhythms.Add(App.Language.Dictionary [Respiratory_Rhythms.LookupString(v)]);
            }

            foreach (PulmonaryArtery_Rhythms.Values v in Enum.GetValues(typeof(PulmonaryArtery_Rhythms.Values)))
            {
                pulmonaryRhythms.Add(App.Language.Dictionary [PulmonaryArtery_Rhythms.LookupString(v)]);
            }

            foreach (Cardiac_Axes.Values v in Enum.GetValues(typeof(Cardiac_Axes.Values)))
            {
                cardiacAxes.Add(App.Language.Dictionary [Cardiac_Axes.LookupString(v)]);
            }

            // Initiate controls for editing Patient values
            pstrStepName.Init(PropertyString.Keys.StepName);
            pstrStepName.PropertyChanged += updateProperty;

            pstrStepDescription.Init(PropertyString.Keys.StepDescription);
            pstrStepDescription.PropertyChanged += updateProperty;

            pintHR.Init(PropertyInt.Keys.HR, 5, 0, 500);
            pintHR.PropertyChanged += updateProperty;

            pbpNBP.Init(PropertyBP.Keys.NSBP,
                        5, 0, 300,
                        5, 0, 200);
            pbpNBP.PropertyChanged += updateProperty;

            pintRR.Init(PropertyInt.Keys.RR, 2, 0, 100);
            pintRR.PropertyChanged += updateProperty;

            pintSPO2.Init(PropertyInt.Keys.SPO2, 2, 0, 100);
            pintSPO2.PropertyChanged += updateProperty;

            pdblT.Init(PropertyDouble.Keys.T, 0.2, 0, 100);
            pdblT.PropertyChanged += updateProperty;

            penmCardiacRhythms.Init(PropertyEnum.Keys.Cardiac_Rhythms,
                                    Enum.GetNames(typeof(Cardiac_Rhythms.Values)), cardiacRhythms);
            penmCardiacRhythms.PropertyChanged += updateProperty;
            penmCardiacRhythms.PropertyChanged += updateCardiacRhythm;

            penmRespiratoryRhythms.Init(PropertyEnum.Keys.Respiratory_Rhythms,
                                        Enum.GetNames(typeof(Respiratory_Rhythms.Values)), respiratoryRhythms);
            penmRespiratoryRhythms.PropertyChanged += updateProperty;
            penmRespiratoryRhythms.PropertyChanged += updateRespiratoryRhythm;

            pintETCO2.Init(PropertyInt.Keys.ETCO2, 2, 0, 100);
            pintETCO2.PropertyChanged += updateProperty;

            pintCVP.Init(PropertyInt.Keys.CVP, 1, -100, 100);
            pintCVP.PropertyChanged += updateProperty;

            pbpABP.Init(PropertyBP.Keys.ASBP,
                        5, 0, 300,
                        5, 0, 200);
            pbpABP.PropertyChanged += updateProperty;

            penmPACatheterRhythm.Init(PropertyEnum.Keys.PACatheter_Rhythms,
                                      Enum.GetNames(typeof(PulmonaryArtery_Rhythms.Values)), pulmonaryRhythms);
            penmPACatheterRhythm.PropertyChanged += updateProperty;
            penmPACatheterRhythm.PropertyChanged += updatePACatheterRhythm;

            pbpPBP.Init(PropertyBP.Keys.PSP,
                        5, 0, 200,
                        5, 0, 200);
            pbpPBP.PropertyChanged += updateProperty;

            pintICP.Init(PropertyInt.Keys.ICP, 1, -100, 100);
            pintICP.PropertyChanged += updateProperty;

            pintIAP.Init(PropertyInt.Keys.IAP, 1, -100, 100);
            pintIAP.PropertyChanged += updateProperty;

            pchkMechanicallyVentilated.Init(PropertyCheck.Keys.MechanicallyVentilated);
            pchkMechanicallyVentilated.PropertyChanged += updateProperty;

            pdblInspiratoryRatio.Init(PropertyFloat.Keys.RRInspiratoryRatio, 0.1, 0.1, 10);
            pdblInspiratoryRatio.PropertyChanged += updateProperty;

            pdblExpiratoryRatio.Init(PropertyFloat.Keys.RRExpiratoryRatio, 0.1, 0.1, 10);
            pdblExpiratoryRatio.PropertyChanged += updateProperty;

            pintPacemakerThreshold.Init(PropertyInt.Keys.PacemakerThreshold, 5, 0, 200);
            pintPacemakerThreshold.PropertyChanged += updateProperty;

            pchkPulsusParadoxus.Init(PropertyCheck.Keys.PulsusParadoxus);
            pchkPulsusParadoxus.PropertyChanged += updateProperty;

            pchkPulsusAlternans.Init(PropertyCheck.Keys.PulsusAlternans);
            pchkPulsusAlternans.PropertyChanged += updateProperty;

            penmCardiacAxis.Init(PropertyEnum.Keys.Cardiac_Axis,
                                 Enum.GetNames(typeof(Cardiac_Axes.Values)), cardiacAxes);
            penmCardiacAxis.PropertyChanged += updateProperty;

            pecgSTSegment.Init(PropertyECGSegment.Keys.STElevation);
            pecgSTSegment.PropertyChanged += updateProperty;

            pecgTWave.Init(PropertyECGSegment.Keys.TWave);
            pecgTWave.PropertyChanged += updateProperty;

            pintProgressFrom.Init(PropertyInt.Keys.ProgressFrom, 1, -1, 1000);
            pintProgressFrom.PropertyChanged += updateProperty;

            pintProgressTo.Init(PropertyInt.Keys.ProgressTo, 1, -1, 1000);
            pintProgressTo.PropertyChanged += updateProperty;

            pintProgressTimer.Init(PropertyInt.Keys.ProgressTimer, 1, -1, 1000);
            pintProgressTimer.PropertyChanged += updateProperty;
        }