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 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); }
DeletePatientDataResponse IPatientDataManager.DeletePatient(DeletePatientDataRequest request) { throw new NotImplementedException(); }