public SyncPatientInfoDataResponse SyncPatient(SyncPatientInfoDataRequest request) { var response = new SyncPatientInfoDataResponse(); try { var repo = Factory.GetRepository(request, RepositoryType.Patient); var isSuccessful = repo.SyncPatient(request); response.IsSuccessful = isSuccessful; } catch (Exception ex) { throw ex; } return(response); }
public SyncPatientInfoDataResponse Put(SyncPatientInfoDataRequest request) { var response = new SyncPatientInfoDataResponse(); try { if (string.IsNullOrEmpty(request.UserId)) { throw new UnauthorizedAccessException("PatientDD:SyncPatientInfoDataRequest()::Unauthorized Access"); } response = PatientManager.SyncPatient(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); }