예제 #1
0
        public DTO.DeletePatientDataResponse DeletePatient(DTO.DeletePatientDataRequest request)
        {
            DeletePatientDataResponse response = new DeletePatientDataResponse();
            IPatientRepository        repo     = Factory.GetRepository(request, RepositoryType.Patient);

            repo.Delete(request.Id);
            return(response);
        }
예제 #2
0
        public void DeletePatient_Test()
        {
            //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{Id}/Delete", "DELETE")]
            string url = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Delete",
                                                              ddUrl,
                                                              context,
                                                              version,
                                                              contractNumber,
                                                              patientId), userId);
            DeletePatientDataResponse response = client.Delete <DeletePatientDataResponse>(url);

            Assert.IsNotNull(response);
        }
예제 #3
0
        public DeletePatientDataResponse DeletePatient(DeletePatientDataRequest request)
        {
            DeletePatientDataResponse response = null;

            try
            {
                response = new DeletePatientDataResponse();

                IPatientRepository patientRepo = Factory.GetRepository(request, RepositoryType.Patient);
                patientRepo.Delete(request);
                response.DeletedId = request.Id;
                response.Success   = true;
                return(response);
            }
            catch (Exception ex) { throw ex; }
        }
예제 #4
0
        public void DeletePatient()
        {
            PatientDataManager pm = new PatientDataManager {
                Factory = new PatientRepositoryFactory()
            };
            DeletePatientDataRequest request = new DeletePatientDataRequest
            {
                Version        = 1.0,
                UserId         = "000000000000000000000000",
                ContractNumber = "InHealth001",
                Context        = "NG",
                Id             = "5325db1ad6a4850adcbba83a"
            };
            DeletePatientDataResponse response = pm.DeletePatient(request);

            Assert.IsNotNull(response);
        }
예제 #5
0
 public void Execute()
 {
     try
     {
         //[Route("/{Context}/{Version}/{ContractNumber}/Patient/{Id}/Delete", "DELETE")]
         string patientUrl = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Delete",
                                                                  DDPatientServiceURL,
                                                                  "NG",
                                                                  request.Version,
                                                                  request.ContractNumber,
                                                                  request.Id), request.UserId);
         DeletePatientDataResponse patientDDResponse = client.Delete <DeletePatientDataResponse>(patientUrl);
         if (patientDDResponse != null && patientDDResponse.Success)
         {
             deletedId = patientDDResponse.DeletedId;
         }
     }
     catch (Exception ex)
     {
         throw new Exception("AD: PatientCommand Execute::" + ex.Message, ex.InnerException);
     }
 }
예제 #6
0
        public DeletePatientDataResponse Delete(DeletePatientDataRequest request)
        {
            DeletePatientDataResponse response = new DeletePatientDataResponse();

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

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