public MedicationController(HealthRecordAppContext db) { this.db = db; if (this.db.Medications.Count() == 0) { this.db.Medications.Add(new Medication() { id = 1, name = "Romycin", dosage = "250mg" }); this.db.Medications.Add(new Medication() { id = 2, name = "Penicillin", dosage = "150mg" }); this.db.Medications.Add(new Medication() { id = 3, name = "Ibuprofen", dosage = "200mg" }); this.db.Medications.Add(new Medication() { id = 4, name = "Zithromax", dosage = "150mg" }); } this.db.SaveChanges(); }
public IllnessController(HealthRecordAppContext db) { this.db = db; if (this.db.Illnesses.Count() == 0) { this.db.Illnesses.Add(new Illness() { id = 1, name = "Conjunctivitis" }); this.db.Illnesses.Add(new Illness() { id = 2, name = "Appendicitis" }); this.db.Illnesses.Add(new Illness() { id = 3, name = "Bronchitis" }); this.db.Illnesses.Add(new Illness() { id = 4, name = "Pneumonia" }); } this.db.SaveChanges(); }
public PatientController(HealthRecordAppContext db) { this.db = db; if (this.db.Patient.Count() == 0) { this.db.Patient.Add(new Patient() { id = 1, first_name = "John", last_name = "Smith", middle_initial = 'M', date_of_birth = DateTime.Now, social_security_number = "877-91-9101" }); this.db.Patient.Add(new Patient() { id = 2, first_name = "Eric", last_name = "Smith", middle_initial = 'L', date_of_birth = DateTime.Now, social_security_number = "845-91-9101" }); this.db.Patient.Add(new Patient() { id = 3, first_name = "Alex", last_name = "Richards", middle_initial = 'K', date_of_birth = DateTime.Now, social_security_number = "847-91-9111" }); this.db.Patient.Add(new Patient() { id = 4, first_name = "Holly", last_name = "Klander", middle_initial = 'O', date_of_birth = DateTime.Now, social_security_number = "194-145-194" }); } this.db.SaveChanges(); }
public DoctorController(HealthRecordAppContext db) { this.db = db; if (this.db.Doctors.Count() == 0) { this.db.Doctors.Add(new Doctor() { id = 1, first_name = "Jeff", last_name = "Smith", social_security_number = "234-22-3432", specialty = "Anesthesiology" }); this.db.Doctors.Add(new Doctor() { id = 2, first_name = "Eric", last_name = "Harlem", social_security_number = "167-93-8279", specialty = "Oncology" }); this.db.Doctors.Add(new Doctor() { id = 3, first_name = "Alex", last_name = "Weiss", social_security_number = "627-93-9367", specialty = "Cytopathology" }); this.db.Doctors.Add(new Doctor() { id = 4, first_name = "Lisa", last_name = "Kodish", social_security_number = "536-74-3457", specialty = "Pediatric Pathology" }); } this.db.SaveChanges(); }
public AppointmentController(HealthRecordAppContext db) { this.db = db; if (this.db.Appointments.Count() == 0) { this.db.Appointments.Add(new Appointment() { id = 1, appointment_date = DateTime.Now, reason = "Patient back pain!", doctor = this.db.Doctors.Find(1), patient = this.db.Patient.Find(1) }); this.db.Appointments.Add(new Appointment() { id = 2, appointment_date = DateTime.Now, reason = "Patient's Ear Hurts!", doctor = this.db.Doctors.Find(2), patient = this.db.Patient.Find(3) }); this.db.Appointments.Add(new Appointment() { id = 3, appointment_date = DateTime.Now, reason = "Patient's Left Eye Swollen Shut!", doctor = this.db.Doctors.Find(1), patient = this.db.Patient.Find(3) }); this.db.Appointments.Add(new Appointment() { id = 4, appointment_date = DateTime.Now, reason = "Patient Internal Bleeding!", doctor = this.db.Doctors.Find(2), patient = this.db.Patient.Find(1) }); } this.db.SaveChanges(); }