public DeletePatientSystemsDataResponse Delete(DeletePatientSystemsDataRequest request)
        {
            DeletePatientSystemsDataResponse response = new DeletePatientSystemsDataResponse();

            try
            {
                RequireUserId(request);
                Manager.DeletePatientSystems(request);
                response.Version = request.Version;
            }
            catch (Exception ex)
            {
                RaiseException(response, ex);
            }
            return(response);
        }
Beispiel #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; }
        }
Beispiel #3
0
        public void DeletePatientSystems_Test()
        {
            List <string> list = new List <string>();

            list.Add("55a01d11d43323224085d1f1");
            list.Add("55a01ef4d43323224085d1f2");

            DeletePatientSystemsDataRequest request = new DeletePatientSystemsDataRequest
            {
                Context        = context,
                ContractNumber = contractNumber,
                UserId         = userId,
                Version        = version,
                PatientId      = "546d0d0684ac0508e43299d2",
                Ids            = "55a01d11d43323224085d1f1,55a01ef4d43323224085d1f2"
            };

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

            Assert.IsNotNull(response);
        }