Ejemplo n.º 1
0
        public GetPatientGoalByTemplateIdResponse GetPatientByTemplateIdGoal(GetPatientGoalByTemplateIdRequest request)
        {
            GetPatientGoalByTemplateIdResponse result = null;

            try
            {
                result = new GetPatientGoalByTemplateIdResponse();
                IGoalRepository repo = Factory.GetRepository(request, RepositoryType.PatientGoal);

                PatientGoalData patientGoalData = repo.FindByTemplateId(request.PatientId, request.TemplateId) as PatientGoalData;

                result.GoalData = patientGoalData;
                result.Version  = request.Version;
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        public GetPatientGoalByTemplateIdResponse Get(GetPatientGoalByTemplateIdRequest request)
        {
            GetPatientGoalByTemplateIdResponse response = new GetPatientGoalByTemplateIdResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("PatientGoalDD:Get()::Unauthorized Access");
                }

                response         = Manager.GetPatientByTemplateIdGoal(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);

                string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0";
                Common.Helper.LogException(int.Parse(aseProcessID), ex);
            }
            return(response);
        }