Example #1
0
        public PutCohortPatientViewDataResponse InsertCohortPatientView(PutCohortPatientViewDataRequest request)
        {
            IPatientRepository repo = Factory.GetRepository(request, RepositoryType.CohortPatientView);

            PutCohortPatientViewDataResponse result = repo.Insert(request) as PutCohortPatientViewDataResponse;

            return(result);
        }
Example #2
0
        public PutCohortPatientViewDataResponse Put(PutCohortPatientViewDataRequest request)
        {
            PutCohortPatientViewDataResponse response = new PutCohortPatientViewDataResponse();

            try
            {
                if (string.IsNullOrEmpty(request.UserId))
                {
                    throw new UnauthorizedAccessException("PatientDD:Put()::Unauthorized Access");
                }

                response         = PatientManager.InsertCohortPatientView(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);
        }