public GetRecentPatientsResponse GetRecentPatients(GetRecentPatientsRequest request) { GetRecentPatientsResponse response = new GetRecentPatientsResponse(); List <CohortPatient> cohortpatients = new List <CohortPatient>(); cohortpatients.Add(new CohortPatient { Id = "abc", MiddleName = "e", LastName = "lopez", FirstName = "eric", Gender = "M", DOB = "01/02/1978", PreferredName = "", Suffix = "Jr" }); cohortpatients.Add(new CohortPatient { Id = "efg", MiddleName = "e", LastName = "johnson", FirstName = "miles", Gender = "M", DOB = "01/02/1978", PreferredName = "", Suffix = "II" }); cohortpatients.Add(new CohortPatient { Id = "hij", MiddleName = "r", LastName = "miles", FirstName = "raul", Gender = "M", DOB = "01/02/1978", PreferredName = "", Suffix = "Sr" }); cohortpatients.Add(new CohortPatient { Id = "lmn", MiddleName = "t", LastName = "hopkins", FirstName = "john", Gender = "M", DOB = "01/02/1978", PreferredName = "", Suffix = "IV" }); cohortpatients.Add(new CohortPatient { Id = "opq", MiddleName = "w", LastName = "kennedy", FirstName = "peter", Gender = "M", DOB = "01/02/1943", PreferredName = "", Suffix = "X" }); response.Patients = new List <CohortPatient>(); response.ContactId = request.ContactId; response.Limit = 5; response.Patients = cohortpatients; return(response); }
public void GetRecentPatients_Limit_Test() { INGManager ngm = new StubNGManager(); // { PlanElementUtils = new StubPlanElementUtils(), EndPointUtils = new StubPlanElementEndpointUtils() }; GetRecentPatientsRequest request = new GetRecentPatientsRequest { Version = version, ContractNumber = contractNumber, UserId = userId, Context = context, ContactId = contactId }; GetRecentPatientsResponse response = ngm.GetRecentPatients(request); Assert.IsTrue(response.Limit >= response.Patients.Count); }
public void GetRecentPatientsForAContact_Test() { INGManager ngm = new StubNGManager(); // { PlanElementUtils = new StubPlanElementUtils(), EndPointUtils = new StubPlanElementEndpointUtils() }; GetRecentPatientsRequest request = new GetRecentPatientsRequest { Version = version, ContractNumber = contractNumber, UserId = userId, Context = context, ContactId = contactId }; GetRecentPatientsResponse response = ngm.GetRecentPatients(request); Assert.AreEqual(response.ContactId, request.ContactId); }
public void GetRecentPatients_Test() { // Arrange double version = 1.0; string contractNumber = "InHealth001"; string token = "1234"; NGManager ngManager = new NGManager() { PlanElementUtils = new PlanElementUtils() }; GetRecentPatientsRequest request = new GetRecentPatientsRequest { ContractNumber = contractNumber, Token = token, Version = version, ContactId = "5325c821072ef705080d3488", UserId = "5325c821072ef705080d3488" }; // Act GetRecentPatientsResponse response = ngManager.GetRecentPatients(request); //Assert Assert.IsTrue(response != null); }