コード例 #1
0
        public IActionResult Post(DoctorAppointment appointment)
        {
            DoctorAppointment doctorAppointment = regularAppointmentService.CreateRegular(appointment);

            if (doctorAppointment == null)
            {
                return(BadRequest());
            }
            return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(doctorAppointment)));
        }
コード例 #2
0
        public IActionResult CancelAppointment(int appointmentId)
        {
            DoctorAppointment appointment = regularAppointmentService.CancelAppointment(appointmentId);

            if (appointment == null)
            {
                return(BadRequest());
            }
            return(Ok(ViewAppointmentAdapter.AppointmentToViewAppointmenDto(appointment)));
        }
コード例 #3
0
 public IActionResult RecommendAppointmentSchedule(RecommendedAppointmentDto dto)
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetRecommendedAppointmentAsync(dto))));
 }
コード例 #4
0
 public IActionResult GetAppointmentsForPatientInFuture(int id)
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAppointmentsForPatientInFuture(id))));
 }
コード例 #5
0
 public IActionResult GetAll()
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAll())));
 }
コード例 #6
0
 public IActionResult DoesDoctorHaveAnAppointmentAtSpecificTime(int doctorId)
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.GetAppointmentsForDoctor(doctorId))));
 }
コード例 #7
0
 public async Task <IActionResult> GetAvailableAppointmentsAsync(AvailableAppointmentsSearchDto dto)
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(await regularAppointmentService.GetAllAvailableAppointmentsForDateAsync(dto.Date, dto.DoctorId, dto.PatientId))));
 }
コード例 #8
0
 public IActionResult GetWithSurveys(int id)
 {
     return(Ok(ViewAppointmentAdapter.AppointmentListToViewAppointmenDtoList(regularAppointmentService.FindAllValidAppointmentsWithSurvey(regularAppointmentService.GetAppointmentsForPatient(id), SurveyService.GetAllSurveysForPatientId(id)))));
 }