Example #1
0
        public IActionResult AddEPrescription(EPrescriptionDto dto)
        {
            EPrescription eprescription = EPrescriptionMapper.EPrescriptionDtoToEPrescription(dto);

            App.Instance().EPrescriptionService.AddEntity(eprescription);
            return(Ok());
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }
Example #4
0
        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));
        }
Example #5
0
        public IActionResult GetAllEPrescription()
        {
            List <EPrescriptionDto> result = new List <EPrescriptionDto>();

            App.Instance().EPrescriptionService.GetAllEntities().ToList().ForEach(eprescription => result.Add(EPrescriptionMapper.EPrescriptionToEPresctriptionDto(eprescription)));
            return(Ok(result));
        }