コード例 #1
0
        public GetGoalDataResponse GetGoal(GetGoalDataRequest request)
        {
            GetGoalDataResponse result = null;

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

                GoalData goalData = repo.FindByID(request.Id) as GoalData;

                //if (patientGoalData != null)
                //{
                //    //Get all barriers for a given goal
                //    patientGoalData.BarriersData = getBarriersByPatientGoalId(request, patientGoalData.Id);

                //    //Get all tasks for a given goal
                //    patientGoalData.TasksData = getTasksByPatientGoalId(request, patientGoalData.Id);

                //    //Get all interventions for a given goal
                //    patientGoalData.InterventionsData = getInterventionsByPatientGoalId(request, patientGoalData.Id);
                //}

                result.GoalData = goalData;
                result.Version  = request.Version;
                return(result);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
ファイル: PatientGoalService.cs プロジェクト: rotovibe/engage
        public GetGoalDataResponse Get(GetGoalDataRequest request)
        {
            GetGoalDataResponse response = new GetGoalDataResponse();

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

                response         = Manager.GetGoal(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);
        }