public void TestSimpleProbabilisticMpi() { var mockPatientStore = new MockPatientStore(); mockPatientStore.Add(new MockPatient { Key = "1", LastName = "Jones", FirstName = "Jim" }); mockPatientStore.Add(new MockPatient { Key = "2", LastName = "Jones", FirstName = "Mark" }); var mpiConfiguration = CreateMpiConfiguration(); var probabilisticMpiCache = new ProbabilisticMpiCache(mockPatientStore, mpiConfiguration); var testPatient = new MockPatient { LastName = "Jones", FirstName = "Mark" }; var mpiMatchRecords = probabilisticMpiCache.GetProbabilisticMatches(testPatient.ToSearchVector()); Assert.IsNotNull(mpiMatchRecords); Assert.AreEqual(1, mpiMatchRecords.Count); // add another match mockPatientStore.Add(new MockPatient { Key = "3", LastName = "Jones", FirstName = "Marm" }); mpiMatchRecords = probabilisticMpiCache.GetProbabilisticMatches(testPatient.ToSearchVector()); Assert.IsNotNull(mpiMatchRecords); Assert.AreEqual(2, mpiMatchRecords.Count); }
public void Add(MockPatient patient) { _patients.Add(patient); }