public IActionResult Post(DoctorAppointment appointment) { DoctorAppointment doctorAppointment = regularAppointmentService.CreateRegular(appointment); if (doctorAppointment == null) { return(BadRequest()); } return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(doctorAppointment))); }
public IActionResult CancelAppointment(int appointmentId) { DoctorAppointment appointment = regularAppointmentService.CancelAppointment(appointmentId); if (appointment == null) { return(BadRequest()); } return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(appointment))); }
public IActionResult RecommendAppointmentSchedule(RecommendedAppointmentDto dto) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetRecommendedAppointmentAsync(dto)))); }
public IActionResult GetAppointmentsForPatientInFuture(int id) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAppointmentsForPatientInFuture(id)))); }
public IActionResult GetAll() { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAll()))); }
public IActionResult DoesDoctorHaveAnAppointmentAtSpecificTime(int doctorId) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAppointmentsForDoctor(doctorId)))); }
public async Task <IActionResult> GetAvailableAppointmentsAsync(AvailableAppointmentsSearchDto dto) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(await regularAppointmentService.GetAllAvailableAppointmentsForDateAsync(dto.Date, dto.DoctorId, dto.PatientId)))); }
public IActionResult GetWithSurveys(int id) { return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.FindAllValidAppointmentsWithSurvey(regularAppointmentService.GetAppointmentsForPatient(id), SurveyService.GetAllSurveysForPatientId(id))))); }