public bool DeleteGoalRequest(PostDeletePatientGoalRequest request) { try { bool result = false; IRestClient client = new JsonServiceClient(); string url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Goal/{5}/Delete/", DDPatientGoalsServiceUrl, "NG", request.Version, request.ContractNumber, request.PatientId, request.PatientGoalId), request.UserId); DeletePatientGoalDataResponse response = client.Delete <DeletePatientGoalDataResponse>( url); if (response != null) { result = true; } return(result); } catch (WebServiceException ex) { throw new WebServiceException("AD:DeleteGoalRequest()::" + ex.Message, ex.InnerException); } }
public DeletePatientGoalDataResponse DeletePatientGoal(DeletePatientGoalDataRequest request) { try { DeletePatientGoalDataResponse result = new DeletePatientGoalDataResponse(); IGoalRepository repo = Factory.GetRepository(request, RepositoryType.PatientGoal); repo.Delete(request); result.Deleted = true; return(result); } catch (Exception ex) { throw ex; } }
public void Update_Goal_Task() { string url = "http://localhost:8888/PatientGoal"; string patientId = "52a0da34fe7a5915485bdfd6"; string contractNumber = "InHealth001"; string context = "NG"; string version = "v1"; string id = "52fc609fd43323258c5c8c71"; string patientGoaldId = "52fd2d6cd433231c845e7d25"; IRestClient client = new JsonServiceClient(); DeletePatientGoalDataResponse response = client.Delete <DeletePatientGoalDataResponse>( string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Goal/{5}/Delete/?UserId={6}", url, context, version, contractNumber, patientId, patientGoaldId, patientId)); }
public DeletePatientGoalDataResponse Delete(DeletePatientGoalDataRequest request) { DeletePatientGoalDataResponse response = new DeletePatientGoalDataResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("PatientGoalDD:Get()::Unauthorized Access"); } response = Manager.DeletePatientGoal(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); }