public Examination(int id, TypeOfExamination typeOfExamination, DateTime dateAndTime, Model.Users.Doctor doctor, Room room, PatientCard patientCard) { this.IdExamination = id; this.Type = typeOfExamination; this.DateAndTime = dateAndTime; if (doctor != null) { this.doctor = new Model.Users.Doctor(doctor); } else { this.doctor = new Model.Users.Doctor(); } if (room != null) { this.room = new Room(room); } else { this.room = new Room(); } if (patientCard != null) { this.patientCard = new PatientCard(patientCard); } else { this.patientCard = new PatientCard(); } }
public Examination(Examination examination) { this.IdExamination = examination.IdExamination; this.Type = examination.Type; this.DateAndTime = examination.DateAndTime; this.doctor = new Users.Doctor(examination.doctor); this.room = new Room(examination.room); this.patientCard = new Secretary.PatientCard(examination.patientCard); }
public Model.Secretary.PatientCard NewPatientCard(Model.Secretary.PatientCard patientCard) { List <PatientCard> patientCards = ReadFromFile(); PatientCard searchPatientCard = GetPatientCard(patientCard.patient.Jmbg); if (searchPatientCard != null) { return(null); } patientCards.Add(patientCard); WriteInFile(patientCards); return(patientCard); }
public PatientCard(PatientCard patientCard) { if (patientCard.patient == null) { this.patient = new Users.Patient(); } else { this.patient = new Users.Patient(patientCard.patient); } this.BloodType = patientCard.BloodType; this.RhFactor = patientCard.RhFactor; this.Alergies = patientCard.Alergies; this.MedicalHistory = patientCard.MedicalHistory; this.HasInsurance = patientCard.HasInsurance; this.Lbo = patientCard.Lbo; this.examinationList = patientCard.examinationList; }
public Model.Secretary.PatientCard SetPatientCard(Model.Secretary.PatientCard card) { List <PatientCard> patientCards = ReadFromFile(); foreach (PatientCard patientCard in patientCards) { if (patientCard.patient.Jmbg.Equals(card.patient.Jmbg)) { patientCard.patient = card.patient; patientCard.Alergies = card.Alergies; patientCard.BloodType = card.BloodType; patientCard.HasInsurance = card.HasInsurance; patientCard.Lbo = card.Lbo; patientCard.examinationList = card.examinationList; patientCard.MedicalHistory = card.MedicalHistory; patientCard.RhFactor = card.RhFactor; break; } } WriteInFile(patientCards); return(card); }