public void Execute() { try { //We get the patient's care team var getCareTeamRequest = new GetCareTeamRequest() { ContactId = _contactId, ContractNumber = _request.ContractNumber, UserId = _request.UserId, Version = _request.Version }; var careTeamData = _contactEndpointUtil.GetCareTeam(getCareTeamRequest); if (careTeamData!=null) { _careTeam = Mapper.Map<CareTeam>(careTeamData); // We send a request to the data domain to delete care team by care tam Id var request = new DeleteCareTeamRequest() { ContactId = _careTeam.ContactId, Id = _careTeam.Id, ContractNumber = _request.ContractNumber, UserId = _request.UserId, Version = _request.Version }; _contactEndpointUtil.DeleteCareTeam(request); } } catch (Exception ex) { throw new Exception("AD: CareTeamCommand Execute::" + ex.Message, ex.InnerException); } }
public DeleteCareTeamDataResponse DeleteCareTeam(DeleteCareTeamRequest request) { DeleteCareTeamDataResponse response = null; try { IRestClient client = new JsonServiceClient(); // '/{Context}/{Version}/{ContractNumber}/Contacts/{ContactId}/CareTeams var url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Contacts/{4}/CareTeams/{5}", DDContactServiceUrl, "NG", request.Version, request.ContractNumber, request.ContactId, request.Id), request.UserId); response = client.Delete <DeleteCareTeamDataResponse>(url); } catch (WebServiceException wse) { throw new WebServiceException("AD:DeleteCareTeam()::" + wse.Message, wse.InnerException); } return(response); }
public DeleteCareTeamResponse DeleteCareTeam(DeleteCareTeamRequest request) { DeleteCareTeamResponse response = null; return(response); }