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)";
            }
        }
示例#2
0
        public void createMedicalCard(MedicalCard medicalCardObj)
        {
            String query = String.Format("INSERT INTO Medical_cards (patientID) VALUES('{0}')", medicalCardObj.patientID);

            _database.executeQuery(query);
        }
示例#3
0
 public void printMedicalCardCopy(MedicalCard medCard)
 {
 }
示例#4
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);
        }