コード例 #1
0
        public bool DeleteInterventionRequest(PostDeletePatientGoalRequest request, string id)
        {
            try
            {
                bool result = false;

                IRestClient client = new JsonServiceClient();

                string url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Goal/{5}/Intervention/{6}/Delete/",
                                                                  DDPatientGoalsServiceUrl,
                                                                  "NG",
                                                                  request.Version,
                                                                  request.ContractNumber,
                                                                  request.PatientId,
                                                                  request.PatientGoalId,
                                                                  id), request.UserId);

                DeleteInterventionDataResponse response = client.Delete <DeleteInterventionDataResponse>(
                    url);

                if (response != null)
                {
                    result = true;
                }

                return(result);
            }
            catch (WebServiceException ex)
            {
                throw new WebServiceException("AD:DeleteInterventionRequest()::" + ex.Message, ex.InnerException);
            }
        }
コード例 #2
0
ファイル: GoalsManager.cs プロジェクト: rotovibe/engage
        public PostDeletePatientGoalResponse DeletePatientGoal(PostDeletePatientGoalRequest request)
        {
            try
            {
                PostDeletePatientGoalResponse pgr = new PostDeletePatientGoalResponse();
                bool result = false;

                // we can thread here if we want!
                // save goals
                GoalsEndpointUtil.DeleteGoalRequest(request);

                // save barriers
                GoalsUtil.DeletePatientGoalBarriers(request);

                // save tasks
                GoalsUtil.DeletePatientGoalTasks(request);

                // save interventions
                GoalsUtil.DeletePatientGoalInterventions(request);

                pgr.Result = result;

                return(pgr);
            }
            catch (Exception ex)
            {
                throw new Exception("AD:DeletePatientGoal()::" + ex.Message, ex.InnerException);
            }
        }
コード例 #3
0
ファイル: GoalsUtil.cs プロジェクト: rotovibe/engage
        internal static bool DeletePatientGoalInterventions(PostDeletePatientGoalRequest request)
        {
            bool result = false;

            try
            {
                result = GoalsEndpointUtil.DeleteInterventionRequest(request, request.PatientGoalId);
                return(result);
            }
            catch (Exception ex)
            {
                throw new Exception("AD:DeletePatientGoalInterventions()::" + ex.Message, ex.InnerException);
            }
        }
コード例 #4
0
        public PostDeletePatientGoalResponse Post(PostDeletePatientGoalRequest request)
        {
            PostDeletePatientGoalResponse response = null;
            GoalsManager          gm     = new GoalsManager();
            ValidateTokenResponse result = null;

            try
            {
                request.Token = base.Request.Headers["Token"] as string;
                result        = Security.IsUserValidated(request.Version, request.Token, request.ContractNumber);
                if (result.UserId.Trim() != string.Empty)
                {
                    request.UserId = result.UserId;
                    response       = gm.DeletePatientGoal(request);
                }
                else
                {
                    throw new UnauthorizedAccessException();
                }
            }
            catch (Exception ex)
            {
                CommonFormatter.FormatExceptionResponse(response, base.Response, ex);
                if ((ex is WebServiceException) == false)
                {
                    gm.LogException(ex);
                }
            }
            finally
            {
                if (result != null)
                {
                    AuditHelper.LogAuditData(request, result.SQLUserId, null, System.Web.HttpContext.Current.Request, request.GetType().Name);
                }
            }
            return(response);
        }
コード例 #5
0
 public bool DeleteInterventionRequest(PostDeletePatientGoalRequest request, string id)
 {
     throw new NotImplementedException();
 }
コード例 #6
0
 public bool DeleteGoalRequest(PostDeletePatientGoalRequest request)
 {
     throw new NotImplementedException();
 }