private void updateStatDisplay() { PIMSController.MedStaffNotes.patientStats stats = patient.treatment.medStaffNotes.statList[patient.treatment.medStaffNotes.statList.Count - count]; dateTextBox.Text = stats.time.ToString(); heightTextBox.Text = stats.patientHeight.ToString(); weightTextBox.Text = stats.patientWeight.ToString(); bpTextBox.Text = (stats.bloodPressureSys + "/" + stats.bloodPressureDia).ToString(); heartRateTextBox.Text = stats.heartrate.ToString(); }
// Will fill the nurseNotesDataGridView with the list of nurse's notes private void fillNurseNotesDataGridView() { while (count <= Program.currentPatient.treatment.medStaffNotes.statList.Count) { PIMSController.MedStaffNotes.patientStats stats = Program.currentPatient.treatment.medStaffNotes.statList[Program.currentPatient.treatment.medStaffNotes.statList.Count - count]; nurseNotesDataGridView.Rows.Add(null, stats.idNum, stats.nurse, stats.time, stats.patientHeight, stats.patientWeight, (stats.bloodPressureSys + "/" + stats.bloodPressureDia).ToString(), stats.heartrate.ToString()); count++; } count = 0; }
private void viewModeToolStripMenuItem_Click(object sender, EventArgs e) { PIMSController.MedStaffNotes.patientStats stats = patient.treatment.medStaffNotes.statList[patient.treatment.medStaffNotes.statList.Count - count]; dateTextBox.Text = stats.time.ToString(); heightTextBox.Text = stats.patientHeight.ToString(); weightTextBox.Text = stats.patientWeight.ToString(); bpTextBox.Text = (stats.bloodPressureSys + "/" + stats.bloodPressureDia).ToString(); heartRateTextBox.Text = stats.heartrate.ToString(); foreach (Control ctrl in this.Controls) { if (ctrl is TextBox && ctrl != searchBox) { ((TextBox)ctrl).ReadOnly = true; ((TextBox)ctrl).BackColor = SystemColors.Control; } } }
// Default Constructor public NurseNotesForm(PIMSController.MedStaffNotes.patientStats stat) { tempStat = stat; InitializeComponent(); // If the current user is not a MedicalStaff // Don't allow the user to see the saveUpdatebutton if (!(Program.currentUser is PIMSController.MedStaff)) { saveUpdateButton.Visible = false; cancelButton.Visible = false; } // If the text == "Update Stat" // Do not allow Office staff user to see the cancelButton if (saveUpdateButton.Text == "Update Stat") { this.cancelButton.Visible = false; } // The text == "Save New Stat" // The MedicalStaff user might not want to enter in a new stat // Allow them to see the cancelButton if (saveUpdateButton.Text == "Save New Stat") { this.cancelButton.Visible = true; } // Do not allow user to edit nurseTextBox and dateTimePicker this.nurseTextBox.ReadOnly = true; this.dateTimePicker1.Enabled = true; // If we have stat's to add // Add them if (stat.idNum != 0) { if (Program.currentPatient.treatment.medStaffNotes.statList.Count > 0) { this.nurseTextBox.Text = stat.nurse; this.dateTimePicker1.Value = stat.time; this.heightTextBox.Text = stat.patientHeight.ToString(); this.diaTextBox.Text = stat.bloodPressureDia.ToString(); this.sysTextBox.Text = stat.bloodPressureDia.ToString(); this.weightTextBox.Text = stat.patientWeight.ToString(); this.diaTextBox.Text = stat.bloodPressureDia.ToString(); this.sysTextBox.Text = stat.bloodPressureSys.ToString(); this.heartRateTextBox.Text = stat.heartrate.ToString(); } // Make the patient's medical stats not editable makeReadOnly(); } // This is a new stat else { this.dateTimePicker1.Value = DateTime.Now; this.nurseTextBox.Text = Program.currentUser.name; // Make the patient's medical stats editable makeReadable(); saveUpdateButton.Text = "Save New Stat"; } }
// Default Constructor public NurseNotesForm(PIMSController.MedStaffNotes.patientStats stat) { tempStat = stat; InitializeComponent(); // If the current user is not a MedicalStaff // Don't allow the user to see the saveUpdatebutton if (!(Program.currentUser is PIMSController.MedStaff)) { saveUpdateButton.Visible = false; cancelButton.Visible = false; } // If the text == "Update Stat" // Do not allow Office staff user to see the cancelButton if (saveUpdateButton.Text == "Update Stat") { this.cancelButton.Visible = false; } // The text == "Save New Stat" // The MedicalStaff user might not want to enter in a new stat // Allow them to see the cancelButton if (saveUpdateButton.Text == "Save New Stat") { this.cancelButton.Visible = true; } // Do not allow user to edit nurseTextBox and dateTimePicker this.nurseTextBox.ReadOnly = true; this.dateTimePicker1.Enabled = true; // If we have stat's to add // Add them if (stat.idNum != 0) { if (Program.currentPatient.treatment.medStaffNotes.statList.Count > 0) { this.nurseTextBox.Text = stat.nurse; this.dateTimePicker1.Value = stat.time; this.heightTextBox.Text = stat.patientHeight.ToString(); this.diaTextBox.Text = stat.bloodPressureDia.ToString(); this.sysTextBox.Text = stat.bloodPressureDia.ToString(); this.weightTextBox.Text = stat.patientWeight.ToString(); this.diaTextBox.Text = stat.bloodPressureDia.ToString(); this.sysTextBox.Text = stat.bloodPressureSys.ToString(); this.heartRateTextBox.Text = stat.heartrate.ToString(); } // Make the patient's medical stats not editable makeReadOnly(); } // This is a new stat else { this.dateTimePicker1.Value = DateTime.Now; this.nurseTextBox.Text = Program.currentUser.name; // Make the patient's medical stats editable makeReadable(); saveUpdateButton.Text = "Save New Stat"; } }