Exemplo n.º 1
0
        private void InitInterface()
        {
            // Initiate ICommands for KeyBindings
            icLoadFile = new ActionCommand(() => LoadFile());
            icSaveFile = new ActionCommand(() => SaveFile());

            // Populate UI strings per language selection
            wdwPatientEditor.Title = App.Language.Dictionary ["PE:WindowTitle"];
            menuFile.Header        = App.Language.Dictionary ["PE:MenuFile"];
            menuLoad.Header        = App.Language.Dictionary ["PE:MenuLoadSimulation"];
            menuSave.Header        = App.Language.Dictionary ["PE:MenuSaveSimulation"];
            menuExit.Header        = App.Language.Dictionary ["PE:MenuExitProgram"];

            menuSettings.Header    = App.Language.Dictionary ["PE:MenuSettings"];
            menuSetLanguage.Header = App.Language.Dictionary ["PE:MenuSetLanguage"];

            menuHelp.Header  = App.Language.Dictionary ["PE:MenuHelp"];
            menuAbout.Header = App.Language.Dictionary ["PE:MenuAboutProgram"];

            lblGroupDevices.Content        = App.Language.Dictionary ["PE:Devices"];
            lblDeviceMonitor.Content       = App.Language.Dictionary ["PE:CardiacMonitor"];
            lblDevice12LeadECG.Content     = App.Language.Dictionary ["PE:12LeadECG"];
            lblDeviceDefibrillator.Content = App.Language.Dictionary ["PE:Defibrillator"];
            lblDeviceIABP.Content          = App.Language.Dictionary ["PE:IABP"];
            //lblDeviceVentilator.Content = App.Language.Dictionary["PE:Ventilator"];
            //lblDeviceEFM.Content = App.Language.Dictionary["PE:EFM"];
            //lblDeviceIVPump.Content = App.Language.Dictionary["PE:IVPump"];
            //lblDeviceLabResults.Content = App.Language.Dictionary["PE:LabResults"];

            lblGroupMirroring.Content = App.Language.Dictionary ["PE:MirrorPatientData"];
            lblMirrorStatus.Content   = App.Language.Dictionary ["PE:Status"];
            radioInactive.Content     = App.Language.Dictionary ["PE:Inactive"];
            radioServer.Content       = App.Language.Dictionary ["PE:Server"];
            radioClient.Content       = App.Language.Dictionary ["PE:Client"];
            lblAccessionKey.Content   = App.Language.Dictionary ["PE:AccessionKey"];
            lblAccessPassword.Content = App.Language.Dictionary ["PE:AccessPassword"];
            lblAdminPassword.Content  = App.Language.Dictionary ["PE:AdminPassword"];
            btnApplyMirroring.Content = App.Language.Dictionary ["BUTTON:ApplyChanges"];

            lblGroupVitalSigns.Content = App.Language.Dictionary ["PE:VitalSigns"];
            lblHR.Content              = String.Format("{0}:", App.Language.Dictionary ["PE:HeartRate"]);
            lblNIBP.Content            = String.Format("{0}:", App.Language.Dictionary ["PE:BloodPressure"]);
            lblRR.Content              = String.Format("{0}:", App.Language.Dictionary ["PE:RespiratoryRate"]);
            lblSPO2.Content            = String.Format("{0}:", App.Language.Dictionary ["PE:PulseOximetry"]);
            lblT.Content               = String.Format("{0}:", App.Language.Dictionary ["PE:Temperature"]);
            lblCardiacRhythm.Content   = String.Format("{0}:", App.Language.Dictionary ["PE:CardiacRhythm"]);
            checkDefaultVitals.Content = App.Language.Dictionary ["PE:UseDefaultVitalSignRanges"];

            lblGroupHemodynamics.Content = App.Language.Dictionary ["PE:AdvancedHemodynamics"];
            lblETCO2.Content             = String.Format("{0}:", App.Language.Dictionary ["PE:EndTidalCO2"]);
            lblCVP.Content  = String.Format("{0}:", App.Language.Dictionary ["PE:CentralVenousPressure"]);
            lblASBP.Content = String.Format("{0}:", App.Language.Dictionary ["PE:ArterialBloodPressure"]);
            lblPSP.Content  = String.Format("{0}:", App.Language.Dictionary ["PE:PulmonaryArteryPressure"]);
            lblICP.Content  = String.Format("{0}:", App.Language.Dictionary ["PE:IntracranialPressure"]);
            lblIAP.Content  = String.Format("{0}:", App.Language.Dictionary ["PE:IntraabdominalPressure"]);

            lblGroupRespiratoryProfile.Content = App.Language.Dictionary ["PE:RespiratoryProfile"];
            lblRespiratoryRhythm.Content       = String.Format("{0}:", App.Language.Dictionary ["PE:RespiratoryRhythm"]);
            lblMechanicallyVentilated.Content  = String.Format("{0}:", App.Language.Dictionary ["PE:MechanicallyVentilated"]);
            lblInspiratoryRatio.Content        = String.Format("{0}:", App.Language.Dictionary ["PE:InspiratoryExpiratoryRatio"]);

            lblGroupCardiacProfile.Content       = App.Language.Dictionary ["PE:CardiacProfile"];
            lblPacemakerCaptureThreshold.Content = String.Format("{0}:", App.Language.Dictionary ["PE:PacemakerCaptureThreshold"]);
            lblPulsusParadoxus.Content           = String.Format("{0}:", App.Language.Dictionary ["PE:PulsusParadoxus"]);
            lblPulsusAlternans.Content           = String.Format("{0}:", App.Language.Dictionary ["PE:PulsusAlternans"]);
            lblCardiacAxis.Content       = String.Format("{0}:", App.Language.Dictionary ["PE:CardiacAxis"]);
            grpSTSegmentElevation.Header = App.Language.Dictionary ["PE:STSegmentElevation"];
            grpTWaveElevation.Header     = App.Language.Dictionary ["PE:TWaveElevation"];

            lblGroupObstetricProfile.Content = App.Language.Dictionary ["PE:ObstetricProfile"];
            lblFHR.Content            = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartRate"]);
            lblFHRRhythms.Content     = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartRhythms"]);
            lblFHRVariability.Content = String.Format("{0}:", App.Language.Dictionary ["PE:FetalHeartVariability"]);
            lblUCFrequency.Content    = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionFrequency"]);
            lblUCDuration.Content     = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionDuration"]);
            lblUCIntensity.Content    = String.Format("{0}:", App.Language.Dictionary ["PE:UterineContractionIntensity"]);

            lblParametersApply.Content = App.Language.Dictionary ["BUTTON:ApplyChanges"];
            lblParametersReset.Content = App.Language.Dictionary ["BUTTON:ResetParameters"];

            List <string> cardiacRhythms     = new List <string> (),
                          cardiacAxes        = new List <string> (),
                          respiratoryRhythms = 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)]);
            }
            comboCardiacRhythm.ItemsSource = cardiacRhythms;

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

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

            foreach (Patient.Intensity.Values v in Enum.GetValues(typeof(Patient.Intensity.Values)))
            {
                intensityScale.Add(App.Language.Dictionary [Patient.Intensity.LookupString(v)]);
            }
            comboFHRVariability.ItemsSource = intensityScale;
            comboUCIntensity.ItemsSource    = intensityScale;

            foreach (FetalHeartDecelerations.Values v in Enum.GetValues(typeof(FetalHeartDecelerations.Values)))
            {
                fetalHeartRhythms.Add(App.Language.Dictionary [FetalHeartDecelerations.LookupString(v)]);
            }
            listFHRRhythms.ItemsSource = fetalHeartRhythms;

            // Populate status bar with updated version information and make visible
            BackgroundWorker bgw           = new BackgroundWorker();
            string           latestVersion = "";

            bgw.DoWork             += delegate { latestVersion = App.Server.Get_LatestVersion(); };
            bgw.RunWorkerCompleted += delegate {
                if (Utility.IsNewerVersion(Utility.Version, latestVersion))
                {
                    txtUpdateAvailable.Text = String.Format(App.Language.Dictionary ["STATUS:UpdateAvailable"], latestVersion).Trim();
                }
                else
                {
                    statusUpdateAvailable.Visibility = Visibility.Collapsed;
                }
            };
            bgw.RunWorkerAsync();
        }
Exemplo n.º 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;
        }