示例#1
0
        public GetAllPatientSystemDataResponse Get(GetAllPatientSystemDataRequest request)
        {
            var response = new GetAllPatientSystemDataResponse();

            try
            {
                RequireUserId(request);
                response.PatientSystemsOldData = Manager.GetAllPatientSystems();
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                RaiseException(response, ex);
            }
            return(response);
        }
示例#2
0
        public List <PatientSystemOldData> GetAllPatientSystems(IServiceContext context)
        {
            List <PatientSystemOldData> result = null;

            try
            {
                IRestClient client = new JsonServiceClient();
                //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{PatientId}/PatientSystems", "GET")]
                var url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/PatientSystems",
                                                               DDPatientSystemUrl,
                                                               "NG",
                                                               context.Version,
                                                               context.Contract), context.UserId);

                GetAllPatientSystemDataResponse dataDomainResponse = client.Get <GetAllPatientSystemDataResponse>(url);
                if (dataDomainResponse != null)
                {
                    result = dataDomainResponse.PatientSystemsOldData;
                }
                return(result);
            }
            catch (Exception ex) { throw ex; }
        }