Esempio n. 1
0
        /// <summary>
        /// Constructor for the add patient window.
        ///
        /// Sets the field hmsLibrary and initialises it to the singleton instance of the hospital library class.
        ///
        /// Populates the consultants combo box with the hospital library consultants list.
        /// </summary>
        public AddPatient()
        {
            InitializeComponent();

            hmsLibrary = HospitalLibrary.Instance;

            cmbConsultants.ItemsSource = hmsLibrary.Consultants;
        }
        /// <summary>
        /// Constructor for the remove patient window.
        ///
        /// Sets the field hmsLibrary and initialises it to the singleton instance of the hospital library class.
        ///
        /// Populates the patients combo box with the hospital library patients list.
        /// </summary>
        public RemovePatient()
        {
            InitializeComponent();

            hmsLibrary = HospitalLibrary.Instance;

            cmbPatient.ItemsSource = hmsLibrary.Patients;
        }
        /// <summary>
        /// Constructor for the prescribe drug window.
        ///
        /// Sets the field hmsLibrary and initialises it to the singleton instance of the hospital library class.
        ///
        /// Populates the patients combo box with the hospital library patients list.
        /// Populates the doctors combo box with the hospital library doctors list.
        /// </summary>
        public PrescribeDrug()
        {
            InitializeComponent();

            hmsLibrary = HospitalLibrary.Instance;

            cmbPatient.ItemsSource = hmsLibrary.Patients;
            cmbDoctor.ItemsSource  = hmsLibrary.Doctors;
        }
Esempio n. 4
0
        /// <summary>
        /// Constructor for the record measurement window.
        ///
        /// Sets the field hmsLibrary and initialises it to the singleton instance of the hospital library class.
        ///
        /// Populates the patients combo box with the hospital library patients list.
        /// Populates the nurses combo box with the hospital library nurses list.
        /// </summary>
        public RecordMeasurement()
        {
            InitializeComponent();

            hmsLibrary = HospitalLibrary.Instance;

            cmbPatient.ItemsSource = hmsLibrary.Patients;
            cmbNurse.ItemsSource   = hmsLibrary.Nurses;
        }
        /// <summary>
        /// The constructor of the administer medication window.
        /// Initialises the hmsLibrary field to the singleton instance of the Hospital Library class.
        /// Populates the patient combo box with the patients stored in the patients list.
        /// Populates the Nurse combo box with the nurses stored in the nursesexceptancillary list.
        /// Sets the drug item sourse to null as this will be set depending on the patient combo boxes selected item.
        /// </summary>
        public AdministerMedication()
        {
            InitializeComponent();

            hmsLibrary = HospitalLibrary.Instance;                     // Calling singleton instance

            cmbPatient.ItemsSource = hmsLibrary.Patients;              // Populating with patients held in hospital library system.
            cmbNurse.ItemsSource   = hmsLibrary.NursesExceptAncillary; // Populate with nurses held in hospital library system.
            cmbDrug.ItemsSource    = null;                             // Setting drug combo box to null as this will be sourced when patient is selected.
        }
Esempio n. 6
0
        /// <summary>
        /// Main window constructor used to set hms library to the Hospital Library singleton instance.
        /// Populates the patients comboboxes as the patients stored in the hospital library.
        ///
        /// Disables the main tabs content to prevent unauthorised access.
        /// Message box shown to user before app opens to inform them on how to get sign in information.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            hmsLibrary = HospitalLibrary.Instance;

            cmbPatientTC.ItemsSource            = hmsLibrary.Patients; // Sets the patient combobox source to be the patients list.
            cmbPatientsPrescription.ItemsSource = hmsLibrary.Patients; // Sets patient combobox source to the patients list.

            tabPatientsContent.IsEnabled     = false;
            tabStaffContent.IsEnabled        = false;
            tabPrescriptionContent.IsEnabled = false;
            tabTCContent.IsEnabled           = false;

            MessageBox.Show("To use this prototype application, you will need to sign in. Check the Login Information Help on the Help Page tab for more information. Thanks.", "Before you start...", MessageBoxButton.OK, MessageBoxImage.Information);
        }