示例#1
0
 public void DeletePatientSystems(DeletePatientSystemsRequest request)
 {
     try
     {
         EndpointUtil.DeletePatientSystems(request);
     }
     catch (Exception ex) { throw ex; }
 }
示例#2
0
        public void DeletePatientSystems(DeletePatientSystemsRequest request)
        {
            try
            {
                IRestClient client = new JsonServiceClient();
                //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{PatientId}/PatientSystems/{Ids}", "DELETE")]
                var url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/PatientSystems/{5}",
                                                               DDPatientSystemUrl,
                                                               "NG",
                                                               request.Version,
                                                               request.ContractNumber,
                                                               request.PatientId,
                                                               request.Ids), request.UserId);

                DeletePatientSystemsDataResponse dataDomainResponse = client.Delete <DeletePatientSystemsDataResponse>(url);
            }
            catch (Exception ex) { throw ex; }
        }
示例#3
0
        public void DeletePatientSystems_Test()
        {
            DeletePatientSystemsRequest request = new DeletePatientSystemsRequest
            {
                ContractNumber = contractNumber,
                UserId         = userId,
                Version        = version,
                Token          = token,
                PatientId      = "5325da9ed6a4850adcbba6ce",
                Ids            = "55a038f7d43325251c8fbdb8,55a038f8d43325251c8fbdbf"
            };

            JsonServiceClient.HttpWebRequestFilter = x =>
                                                     x.Headers.Add(string.Format("{0}: {1}", "Token", token));

            //[Route("/{Version}/{ContractNumber}/Patient/{PatientId}PatientSystems/{Ids}", "DELETE")]
            DeletePatientSystemsResponse response = client.Delete <DeletePatientSystemsResponse>(string.Format("{0}/{1}/{2}/Patient/{3}/PatientSystems/{4}", url, version, contractNumber, request.PatientId, request.Ids));

            Assert.IsNotNull(response);
        }
示例#4
0
        public DeletePatientSystemsResponse Delete(DeletePatientSystemsRequest request)
        {
            DeletePatientSystemsResponse response = new DeletePatientSystemsResponse();
            ValidateTokenResponse        result   = null;

            try
            {
                if (base.Request != null)
                {
                    request.Token = base.Request.Headers["Token"] as string;
                }
                result = Security.IsUserValidated(request.Version, request.Token, request.ContractNumber);
                if (result.UserId.Trim() != string.Empty)
                {
                    request.UserId = result.UserId;
                    PatientSystemManager.DeletePatientSystems(request);
                }
                else
                {
                    throw new UnauthorizedAccessException();
                }
            }
            catch (Exception ex)
            {
                CommonFormatterUtil.FormatExceptionResponse(response, base.Response, ex);
                if ((ex is WebServiceException) == false)
                {
                    PatientSystemManager.LogException(ex);
                }
            }
            finally
            {
                if (result != null)
                {
                    string browser     = (base.Request != null) ? base.Request.UserAgent : unknownBrowserType;
                    string hostAddress = (base.Request != null) ? base.Request.UserHostAddress : unknownUserHostAddress;
                    AuditUtil.LogAuditData(request, result.SQLUserId, null, browser, hostAddress, request.GetType().Name);
                }
            }
            return(response);
        }
 public void DeletePatientSystems(DeletePatientSystemsRequest request)
 {
     throw new NotImplementedException();
 }