Exemplo n.º 1
0
            public void Get_Response_AssignOn_Test()
            {
                string   patientId = "5325dad4d6a4850adcbba776";
                string   programId = "534d9bffd6a48504b058a2cf";
                string   userId    = "0000000000000000000000001";
                DateTime now       = System.DateTime.UtcNow.Date;

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);
                DateTime assignbyDate = ((DateTime)response.Program.AssignDate).Date;

                Assert.AreEqual(now, assignbyDate);
            }
Exemplo n.º 2
0
            public void AD_Get_With_Module_Description_Test()
            {
                string patientId      = "5325dad4d6a4850adcbba776";
                string programId      = "534d9bffd6a48504b058a2cf";
                string userId         = "0000000000000000000000000";
                string desc           = "BSHSI - Outreach & Enrollment";
                string ModuleSourceId = "532b5585a381168abe00042c";

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);
                Module module = response.Program.Modules.Find(m => m.SourceId == ModuleSourceId);
                string mDesc  = module.Description.Trim();

                Assert.AreEqual(desc, mDesc, true);
            }
Exemplo n.º 3
0
            public void Get_With_Attributes_Test()
            {
                string patientId = "5325dab8d6a4850adcbba71a";
                string programId = "534d9217d6a48504b0586f68";
                string userId    = "0000000000000000000000000";

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);

                Assert.IsNotNull(response.Program.Attributes);
            }
Exemplo n.º 4
0
            public void Get_With_No_Steps_Test()
            {
                string patientId = "5325dab8d6a4850adcbba71a";
                string programId = "534d9217d6a48504b0586f68";
                string userId    = "0000000000000000000000000";

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);

                Assert.AreEqual(0, response.Program.Modules[0].Actions[0].Steps.Count);
            }
Exemplo n.º 5
0
            public void Get_With_Description_Test()
            {
                string patientId = "5325dad4d6a4850adcbba776";
                string programId = "534d9bffd6a48504b058a2cf";
                string userId    = "0000000000000000000000000";

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);

                Assert.IsNotNull(response.Program.Description);
            }
Exemplo n.º 6
0
            public void Get_Response_AssignById_Test()
            {
                string patientId = "5325dad4d6a4850adcbba776";
                string programId = "534d9bffd6a48504b058a2cf";
                string userId    = "0000000000000000000000000";

                INGManager ngm = new NGManager {
                    PlanElementUtils = new StubPlanElementUtils(), EndpointUtils = new StubPlanElementEndpointUtils()
                };

                GetPatientProgramDetailsSummaryRequest request = new GetPatientProgramDetailsSummaryRequest
                {
                    Version          = 1.0,
                    ContractNumber   = "InHealth001",
                    PatientId        = patientId,
                    PatientProgramId = programId,
                    UserId           = userId
                };

                GetPatientProgramDetailsSummaryResponse response = ngm.GetPatientProgramDetailsSummary(request);
                string assignbyid = response.Program.AssignById;

                Assert.AreEqual(userId, assignbyid);
            }