/// <summary>
        /// Checks if final diagnosis.
        /// </summary>
        /// <returns></returns>
        private bool checkIfFinalDiagnosis()
        {
            var db      = new CheckupDatabaseAccess();
            var checkup = db.GetCheckupFromAppointmentid(this.appointmentid);

            if (checkup.Count == 8 && !string.IsNullOrEmpty(checkup[6]))
            {
                this.finalDiagnosisTextBox.Text = checkup[6];
                return(true);
            }
            return(false);
        }
        /// <summary>
        /// Checks if checkup done.
        /// </summary>
        private void checkIfCheckupDone()
        {
            var db   = new CheckupDatabaseAccess();
            var data = db.GetCheckupFromAppointmentid(this.appointmentid);

            if (data.Count == 0)
            {
                this.finalDiagnosisTextBox.IsEnabled      = false;
                this.submitFinalDiagnosisButton.IsEnabled = false;
                this.enterTestsButton.IsEnabled           = false;
            }
        }
Пример #3
0
        /// <summary>
        /// Gets the checkup from appointmentid.
        /// </summary>
        /// <param name="appointmentid">The appointmentid.</param>
        /// <returns></returns>
        public static Checkup GetCheckupFromAppointmentid(int appointmentid)
        {
            var cdb         = new CheckupDatabaseAccess();
            var information = cdb.GetCheckupFromAppointmentid(appointmentid);

            if (information.Count != 8)
            {
                return(null);
            }
            var systolic       = int.Parse(information[0]);
            var diastolic      = int.Parse(information[1]);
            var temperature    = decimal.Parse(information[2]);
            var weight         = decimal.Parse(information[3]);
            var pulse          = int.Parse(information[4]);
            var diagnosis      = information[5];
            var finaldiagnosis = information[6];
            var checkupid      = int.Parse(information[7]);

            return(new Checkup(
                       checkupid, appointmentid, systolic, diastolic, temperature, weight, pulse, diagnosis, finaldiagnosis));
        }