Beispiel #1
0
        public Examination AppendExamination(Examination examination, MedicalRecord medicalRecord)
        {
            foreach (Prescription p in examination.Prescription)
            {
                DrugStateChange oldState = p.drug.drugStateChange;
                DrugStateChange newState = new DrugStateChange(DateTime.Now, oldState.TotalNumber - (int)p.Number, oldState.Threshold, oldState.DrugId);
                DrugStateChangeRepository.GetInstance().Create(newState);
                p.drug.drugStateChange = newState;
                DrugRepository.GetInstance().Update(p.drug);
                PrescriptionRepository.GetInstance().Create(p);
            }

            foreach (Referral r in examination.Referral)
            {
                ReferralRepository.GetInstance().Create(r);
            }
            examination = ExaminationRepository.GetInstance().Create(examination);

            medicalRecord.AddExamination(examination);
            MedicalRecordRepository.GetInstance().Update(medicalRecord);
            return(examination);
        }
Beispiel #2
0
 public MedicalRecord GetMedicalRecordById(uint id)
 {
     return(MedicalRecordRepository.GetInstance().Read(id));
 }
Beispiel #3
0
 public MedicalRecord GetMedicalRecordByPatient(Patient patient)
 {
     return(MedicalRecordRepository.GetInstance().Read(patient.MedRecordId));
 }
Beispiel #4
0
        public MedicalRecord GetMedicalRecordByAppointment(Appointment appoinment)
        {
            MedicalRecord medicalRecord = MedicalRecordRepository.GetInstance().Read(appoinment.MedicalRecordId);

            return(medicalRecord);
        }
Beispiel #5
0
 public MedicalRecord EditMedicalRecord(MedicalRecord medRecord)
 {
     return(MedicalRecordRepository.GetInstance().Update(medRecord));
 }
Beispiel #6
0
 public MedicalRecord AddMedicalRecord(MedicalRecord medRecord)
 {
     return(MedicalRecordRepository.GetInstance().Create(medRecord));
 }