Exemplo n.º 1
0
        public IActionResult GetAvailable2(SearchAppointmentsDTO appoitmentsDTO)
        {
            PriorityParameters parameters =
                AppointmentMapper.SearchAppointmentsDTOToPriorityParameters(appoitmentsDTO);
            List <Appointment> appointments     = _appointmentService.GetAvailableByStrategy(parameters).ToList();
            List <AvailableAppointmentsDTO> dto = AppointmentMapper.AppointmentsToAvailableAppointmentsDTOWithDoctor(appointments);

            return(Ok(dto));
        }
Exemplo n.º 2
0
 public static PriorityParameters SearchAppointmentsDTOToPriorityParameters(SearchAppointmentsDTO dto)
 {
     return(new PriorityParameters
     {
         DoctorId = dto.DoctorId,
         ChosenStartDate = dto.StartInterval,
         ChosenEndDate = dto.EndInterval,
         Priority = IntToPriorityType(dto.Priority),
         SpecializationId = dto.SpecializationId
     });
 }