public DTO.DeletePatientDataResponse DeletePatient(DTO.DeletePatientDataRequest request) { DeletePatientDataResponse response = new DeletePatientDataResponse(); IPatientRepository repo = Factory.GetRepository(request, RepositoryType.Patient); repo.Delete(request.Id); return(response); }
public void DeletePatient_Test() { //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{Id}/Delete", "DELETE")] string url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Delete", ddUrl, context, version, contractNumber, patientId), userId); DeletePatientDataResponse response = client.Delete <DeletePatientDataResponse>(url); Assert.IsNotNull(response); }
public DeletePatientDataResponse DeletePatient(DeletePatientDataRequest request) { DeletePatientDataResponse response = null; try { response = new DeletePatientDataResponse(); IPatientRepository patientRepo = Factory.GetRepository(request, RepositoryType.Patient); patientRepo.Delete(request); response.DeletedId = request.Id; response.Success = true; return(response); } catch (Exception ex) { throw ex; } }
public void DeletePatient() { PatientDataManager pm = new PatientDataManager { Factory = new PatientRepositoryFactory() }; DeletePatientDataRequest request = new DeletePatientDataRequest { Version = 1.0, UserId = "000000000000000000000000", ContractNumber = "InHealth001", Context = "NG", Id = "5325db1ad6a4850adcbba83a" }; DeletePatientDataResponse response = pm.DeletePatient(request); Assert.IsNotNull(response); }
public void Execute() { try { //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{Id}/Delete", "DELETE")] string patientUrl = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Delete", DDPatientServiceURL, "NG", request.Version, request.ContractNumber, request.Id), request.UserId); DeletePatientDataResponse patientDDResponse = client.Delete <DeletePatientDataResponse>(patientUrl); if (patientDDResponse != null && patientDDResponse.Success) { deletedId = patientDDResponse.DeletedId; } } catch (Exception ex) { throw new Exception("AD: PatientCommand Execute::" + ex.Message, ex.InnerException); } }
public DeletePatientDataResponse Delete(DeletePatientDataRequest request) { DeletePatientDataResponse response = new DeletePatientDataResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("PatientDD:PatientDelete()::Unauthorized Access"); } response = PatientManager.DeletePatient(request); response.Version = request.Version; } catch (Exception ex) { CommonFormatterUtil.FormatExceptionResponse(response, base.Response, ex); string aseProcessID = ConfigurationManager.AppSettings.Get("ASEProcessID") ?? "0"; Helpers.LogException(int.Parse(aseProcessID), ex); } return(response); }