/// <see cref="VisitDAL.CreateVisit(Visit)"/> public bool CreateVisit(Visit visit) { if (visit == null) { throw new ArgumentNullException("visit cannot be null"); } return(VisitDAL.CreateVisit(visit)); }
/// <see cref="VisitDAL.GetVisitsByPatient(Patient)"/> public List <Visit> GetVisitsByPatient(Patient patient) { if (patient == null) { throw new ArgumentNullException("patient cannot be null"); } return(VisitDAL.GetVisitsByPatient(patient)); }
/// <see cref="VisitDAL.GetVisitByAppointment(Appointment)"/> public List <VisitDTO> GetVisitByAppointment(Appointment appointment) { if (appointment == null) { throw new ArgumentNullException("appointment cannot be null"); } return(VisitDAL.GetVisitByAppointment(appointment)); }
private void buttonSaveVisit_Click(object sender, EventArgs e) { if (this.comboBoxVisitDoctor.SelectedValue == null) { MessageBox.Show("Please select a doctor"); return; } this.labelSymptomsError.Visible = false; int patientId = this.patient.PatientID.Value; DateTime apptDateTime = this.dateTimePickerVisit.Value; int doctorId = Int32.Parse(this.comboBoxVisitDoctor.SelectedValue.ToString()); int bpSystolic = (int)this.numericUpDownSystolic.Value; int bpDiastolic = (int)this.numericUpDownDiastolic.Value; decimal temperature = this.numericUpDownTemperature.Value; decimal weight = this.numericUpDownWeight.Value; int pulse = (int)this.numericUpDownPulse.Value; string symptoms = this.textBoxSymptoms.Text; string diagnoses = this.textBoxDiagnoses.Text; bool finalDiagnosisMade = this.checkBoxFinalDiagnosis.Checked; if (string.IsNullOrWhiteSpace(diagnoses)) { diagnoses = null; } if (string.IsNullOrWhiteSpace(symptoms)) { this.labelSymptomsError.Visible = true; return; } bool isSuccessful; if (this.visitUpdateMode) { isSuccessful = VisitDAL.UpdateVisit(patientId, apptDateTime, bpSystolic, bpDiastolic, temperature, weight, pulse, symptoms, nurseUserId, doctorId, diagnoses, finalDiagnosisMade); } else { isSuccessful = VisitDAL.AddVisit(patientId, apptDateTime, bpSystolic, bpDiastolic, temperature, weight, pulse, symptoms, this.nurseUserId, doctorId, diagnoses, finalDiagnosisMade); } if (isSuccessful) { this.clearVisitInfoFields(); this.groupBoxVisitInfo.Enabled = false; this.currentlyEditingVisit = false; this.loadVisits(); } else { MessageBox.Show("An error occured when adding a visit"); } }
public ResponseStatus GetVisits(Container_List_Visit conta_List_Visit) { ResponseStatus resp = ResponseStatus.NONE; visitDal = new VisitDAL(); resp = visitDal.GetApplys(conta_List_Visit.paginate); conta_List_Visit.list_Visit = visitDal.List_Visit; visitDal.ReturnUnitToPool(); return(resp); }
/// <summary> /// Initalizes DAL objects /// </summary> public HealthcareController() { visitDAL = new VisitDAL(); appointmentDAL = new AppointmentDAL(); doctorDAL = new DoctorDAL(); personDAL = new PersonDAL(); loginDAL = new LoginDAL(); patientDAL = new PatientDAL(); nurseDAL = new NurseDAL(); testDAL = new TestDAL(); specialtyDAL = new SpecialityDAL(); }
private void loadVisits() { this.listViewVisits.Items.Clear(); List <Visit> visits = VisitDAL.GetAllVisitsForPatient(this.patient.PatientID.Value); foreach (Visit visit in visits) { string formattedDateTime = visit.AppointmentDateTime.ToShortDateString() + " " + visit.AppointmentDateTime.ToShortTimeString(); ListViewItem row = new ListViewItem(new[] { formattedDateTime }); row.Tag = visit; this.listViewVisits.Items.Add(row); } }
private void buttonMakeVisit_Click(object sender, EventArgs e) { this.visitUpdateMode = false; if (VisitDAL.HasMatchingVisit(this.patient.PatientID.Value, this.dateTimeAppointmentDate.Value)) { MessageBox.Show("You cannot create multiple visits for an appointment"); } else if (this.listViewAppointments.SelectedItems.Count > 0) { this.currentlyEditingVisit = true; this.tabControlPatientInfo.SelectTab(2); this.comboBoxVisitDoctor.SelectedIndex = this.comboBoxAppointmentDoctor.SelectedIndex; this.groupBoxVisitInfo.Enabled = true; this.dateTimePickerVisit.Value = this.dateTimeAppointmentDate.Value; } else { MessageBox.Show("Please select an appointment to convert to a visit"); } }
//Gets a visit based on the apptID public static Visit GetVisit(int apptID) { return(VisitDAL.GetVisit(apptID)); }
//returns a boolean that is true if the visit was sucessfully updated public static bool UpdateVisit(Visit oldVisit, Visit newVisit) { return(VisitDAL.UpdateVisit(oldVisit, newVisit)); }
//gets the diagnoses based on the diagnoses code public static string GetDiagnoses(string diagnosesCode) { return(VisitDAL.GetDiagnoses(diagnosesCode)); }
// Adds the person public int AddVisit(Visit visit) { return(VisitDAL.AddVisit(visit)); }
/// <summary> /// Constructor for the AppointmentController class. /// </summary> public AppointmentController() { this.appointmentSource = new AppointmentDAL(); this.visitSource = new VisitDAL(); }
/// <summary> /// Constructor for the VisitController class. /// </summary> public VisitController() { this.visitSource = new VisitDAL(); }
/// <summary> /// /// </summary> /// <param name="patientId"></param> /// <returns></returns> public List <VisitDTO> GetVisitsByPatientId(int patientId) { return(VisitDAL.GetPatientsVisits(patientId)); }
/// <see cref="VisitDAL.GetVisits"/> public List <Visit> GetVisits() { return(VisitDAL.GetVisits()); }