public void DeletePatientAllergy(DeletePatientAllergyRequest request) { try { IRestClient client = new JsonServiceClient(); //[Route("/{Context}/{Version}/{ContractNumber}/PatientAllergy/{Id}", "DELETE")] var url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/PatientAllergy/{4}", DDAllergyUrl, "NG", request.Version, request.ContractNumber, request.Id), request.UserId); DeletePatientAllergyDataResponse dataDomainResponse = client.Delete <DeletePatientAllergyDataResponse>(url); } catch (WebServiceException ex) { throw ex; } }
public void DeletePatientAllergy_Test() { DeletePatientAllergyDataRequest request = new DeletePatientAllergyDataRequest { Context = context, ContractNumber = contractNumber, Id = "54ef4da084ac050d0c615d5c", UserId = userId, Version = version }; //[Route("/{Context}/{Version}/{ContractNumber}/PatientAllergy/{Id}", "DELETE")] DeletePatientAllergyDataResponse response = client.Delete <DeletePatientAllergyDataResponse>( string.Format("{0}/{1}/{2}/{3}/PatientAllergy/{4}?UserId={5}", url, context, version, contractNumber, request.Id, request.UserId)); Assert.IsNotNull(response); }
public DeletePatientAllergyDataResponse Delete(DeletePatientAllergyDataRequest request) { DeletePatientAllergyDataResponse response = new DeletePatientAllergyDataResponse { Version = request.Version }; try { RequireUserId(request); response = Manager.Delete(request); } catch (Exception ex) { RaiseException(response, ex); } return(response); }
public DeletePatientAllergyDataResponse Delete(DeletePatientAllergyDataRequest request) { DeletePatientAllergyDataResponse response = null; try { response = new DeletePatientAllergyDataResponse(); var repo = AllergyRepositoryFactory.GetAllergyRepository(request, RepositoryType.PatientAllergy); if (!string.IsNullOrEmpty(request.Id)) { repo.Delete(request); } return(response); } catch (Exception ex) { throw ex; } }