Ejemplo n.º 1
0
        public ActionResult <TreatmentHistoryViewModel> GetTreatmentHistory(int medicalChartId, int treatmentHistoryId)
        {
            if (!_treatmentHistoryService.Exist(medicalChartId, treatmentHistoryId))
            {
                return(NotFound());
            }

            var treatmentHistoryDTO = _treatmentHistoryService.Get(medicalChartId, treatmentHistoryId);

            return(TreatmentHistoryMapper.DTOtoTreatmentHistoryVM(treatmentHistoryDTO));
        }
Ejemplo n.º 2
0
        public ActionResult <IEnumerable <TreatmentHistoryViewModel> > GetTreatmentHistories(int medicalChartId)
        {
            if (!_medicalChartService.Exist(medicalChartId))
            {
                return(NotFound());
            }

            return(_medicalChartService
                   .GetTreatmentHistories(medicalChartId)
                   .Select(th => TreatmentHistoryMapper.DTOtoTreatmentHistoryVM(th))
                   .ToList());
        }