Beispiel #1
0
        public PutProgramToPatientResponse AssignPatientToProgram(PostPatientToProgramsRequest request, string primaryCM)
        {
            try
            {
                IRestClient client = new JsonServiceClient();
                string      url    = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/Programs/?ContractProgramId={5}",
                                                                          DDProgramServiceUrl,
                                                                          "NG",
                                                                          request.Version,
                                                                          request.ContractNumber,
                                                                          request.PatientId,
                                                                          request.ContractProgramId), request.UserId);

                DD.PutProgramToPatientResponse dataDomainResponse =
                    client.Put <DD.PutProgramToPatientResponse>(url, new DD.PutProgramToPatientRequest
                {
                    UserId        = request.UserId,
                    CareManagerId = !string.IsNullOrEmpty(primaryCM) ? primaryCM : null
                } as object);

                return(dataDomainResponse);
            }
            catch (Exception ex)
            {
                throw new Exception("AD:PlanElementEndpointUtil:RequestPatientProgramDetailsSummary()::" + ex.Message, ex.InnerException);
            }
        }
Beispiel #2
0
        public string GetPrimaryCareManagerForPatient(PostPatientToProgramsRequest request)
        {
            try
            {
                string      pcmId  = null;
                IRestClient client = new JsonServiceClient();
                string      url    = Common.Helper.BuildURL(string.Format("{0}/{1}/{2}/{3}/Patient/{4}/PrimaryCareManager",
                                                                          DDCareMemberUrl,
                                                                          "NG",
                                                                          request.Version,
                                                                          request.ContractNumber,
                                                                          request.PatientId), request.UserId);

                GetPrimaryCareManagerDataResponse dataDomainResponse =
                    client.Get <GetPrimaryCareManagerDataResponse>(url);

                if (dataDomainResponse != null)
                {
                    if (dataDomainResponse.CareMember != null)
                    {
                        pcmId = dataDomainResponse.CareMember.ContactId;
                    }
                }

                return(pcmId);
            }
            catch (Exception ex)
            {
                throw new Exception("AD:PlanElementEndpointUtil:GetPrimaryCareManagerForPatient()::" + ex.Message, ex.InnerException);
            }
        }
Beispiel #3
0
            public void Assign_With_CarememberId()
            {
                string     progId = "111111111111111111111111";
                INGManager ngm    = new NGManager {
                    EndpointUtils = new StubPlanElementEndpointUtils(), PlanElementUtils = new StubPlanElementUtils()
                };
                PostPatientToProgramsRequest request = new PostPatientToProgramsRequest
                {
                    PatientId         = "123456789012345678901234",
                    Context           = "NG",
                    ContractNumber    = "InHealth001",
                    ContractProgramId = "111111111111111111112222",
                    Token             = "123456789012345678909999",
                    UserId            = "123451234512345123455555",
                    Version           = 1.0
                };
                PostPatientToProgramsResponse response = ngm.PostPatientToProgram(request);

                Assert.AreEqual(progId, response.Program.Id);
            }
Beispiel #4
0
 public string GetPrimaryCareManagerForPatient(PostPatientToProgramsRequest request)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public PutProgramToPatientResponse AssignPatientToProgram(PostPatientToProgramsRequest request, string careManagerId)
 {
     throw new NotImplementedException();
 }