Пример #1
0
        public void updatePatientMedicalCard(Patient patient, MedicalCard medicalCardObj)
        {
            String query = String.Format("UPDATE Patients SET medicalCardID={0} WHERE patientID={1}", medicalCardObj.getMedicalCardIDFromDb(), patient.getPatientIDFromDb());

            _database.executeQuery(query);
        }
        public void registerNewPatient()
        {
            DateTime now = DateTime.Now;
            _patient = new Patient(Name, Surname, Gender, DateOfBirth, Convert.ToInt32(MobileNumber), Email, now);
            _receptionist = new Receptionist();

            try
            {
                _receptionist.registerNewPatient(_patient);
                _medicalCard = new MedicalCard(_patient.getPatientIDFromDb());
                _receptionist.createMedicalCard(_medicalCard);
                _receptionist.updatePatientMedicalCard(_patient, _medicalCard);
                CloseAction.Invoke();
            }
            catch (MySqlException ex)
            {
                ErrorMessage = "Problem with writing data(MySQLException)";
            }
        }
Пример #3
0
        public String getLabTestResults(Patient patient)
        {
            String query = String.Format("SELECT result FROM Samples WHERE patient_id={0} AND doctor_id={1} AND tested=TRUE", patient.getPatientIDFromDb(), this.doctorID);

            String result = this._database.selectSingleQuery(query);

            return result;
        }