public IActionResult AddEPrescription(EPrescriptionDto dto) { EPrescription eprescription = EPrescriptionMapper.EPrescriptionDtoToEPrescription(dto); App.Instance().EPrescriptionService.AddEntity(eprescription); return(Ok()); }
public IActionResult FindPrescriptionsByComment([FromQuery(Name = "patientId")] int patientId, [FromQuery(Name = "comment")] string comment) { List <EPrescriptionDto> result = new List <EPrescriptionDto>(); App.Instance().EPrescriptionService.FindEPrescriptionsForCommentParameter(patientId, comment).ToList().ForEach(eprescription => result.Add(EPrescriptionMapper.EPrescriptionToEPresctriptionDto(eprescription))); return(Ok(result)); }
public IActionResult FindePrescriptionsByDate([FromQuery(Name = "patientId")] int patientId, [FromQuery(Name = "date")] string date) { List <EPrescriptionDto> result = new List <EPrescriptionDto>(); App.Instance().EPrescriptionService.FindEPrescriptionsForDateParameter(patientId, date).ToList().ForEach(eprescription => result.Add(EPrescriptionMapper.EPrescriptionToEPresctriptionDto(eprescription))); return(Ok(result)); }
public IActionResult GetEPrescriptionsForPatient(int patientID) { List <EPrescriptionDto> eprescriptionsForPatient = new List <EPrescriptionDto>(); App.Instance().EPrescriptionService.GetEPrescriptionsForPatient(patientID).ToList().ForEach(eprescription => eprescriptionsForPatient.Add(EPrescriptionMapper.EPrescriptionToEPresctriptionDto(eprescription))); return(Ok(eprescriptionsForPatient)); }
public IActionResult GetAllEPrescription() { List <EPrescriptionDto> result = new List <EPrescriptionDto>(); App.Instance().EPrescriptionService.GetAllEntities().ToList().ForEach(eprescription => result.Add(EPrescriptionMapper.EPrescriptionToEPresctriptionDto(eprescription))); return(Ok(result)); }