Beispiel #1
0
        public IActionResult GetSearchedReports(ReportSearchDTO dto)
        {
            try
            {
                ReportValidator.Validate(dto);
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }


            List <Report>    reports    = _reportSearchService.GetSearchedReports(dto.Doctor, dto.startDate, dto.endDate, dto.type);
            List <ReportDTO> reportDTOs = ReportMapper.ListExaminationSurgeryToReport(reports);

            return(Ok(reportDTOs));
        }
Beispiel #2
0
 public static void Validate(ReportSearchDTO dto)
 {
     IsNameValid(dto.Doctor);
     IsTypeValid(dto.type);
 }