예제 #1
0
        private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
        {
            MessageBox.Show("Feeding type set to: " + feedTypeCombo.Text);
            feedTypeDisplay.Text = feedTypeCombo.Text;
            // Match each option of the combobox to one of our feeding types
            // Windows Form App has validation to ensure values are one of the form options
            // If somehow this doesn't happen, don't set any feed type
            switch (feedTypeCombo.SelectedIndex)
            {
            case 0:
                patientData.set_feed(FeedType.NG);
                break;

            case 1:
                patientData.set_feed(FeedType.NJ);
                break;

            case 2:
                patientData.set_feed(FeedType.PEG);
                break;

            case 3:
                patientData.set_feed(FeedType.J);
                break;

            default:
                return;
            }
            // Internally and visually set the feeding rate to the appropriate amount
            // 240ml/hr for Gastric feeding (NG & PEG, indices 0 & 2)
            // 150ml/hr for Jejunal feeding (NJ & J, indices 1 & 3)
            if (feedTypeCombo.SelectedIndex % 2 == 0)
            {
                patientData.set_max_rate(240);
                MaxRateNumeric.Value = 240;
            }
            else
            {
                patientData.set_max_rate(150);
                MaxRateNumeric.Value = 150;
            }

            FeedRateDisplay.Text = MaxRateNumeric.Value.ToString();
        }
예제 #2
0
        private void feedTypeCombo_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Match each option of the combobox to one of our feeding types
            // Windows Form App has validation to ensure values are one of the form options
            // If somehow this doesn't happen, don't set any feed type
            switch (feedTypeCombo.SelectedIndex)
            {
            case 0:
                patientData.set_feed(FeedType.NG);
                break;

            case 1:
                patientData.set_feed(FeedType.NJ);
                break;

            case 2:
                patientData.set_feed(FeedType.PEG);
                break;

            case 3:
                patientData.set_feed(FeedType.J);
                break;

            default:
                return;
            }
            // Internally and visually set the feeding rate to the appropriate amount
            // 240ml/hr for Gastric feeding (NG & PEG, indices 0 & 2)
            // 150ml/hr for Jejunal feeding (NJ & J, indices 1 & 3)
            if (feedTypeCombo.SelectedIndex % 2 == 0)
            {
                patientData.set_max_rate(240);
                MaxRateNumeric.Value = 240;
            }
            else
            {
                patientData.set_max_rate(150);
                MaxRateNumeric.Value = 150;
            }
            // Flip one switch for enabling the continue button
            this.feed_set = true;
            // Enable the continue button if both buttons set, implied and because feed_set is guaranteed true
            this.loadMainButton.Enabled = total_set;
        }