示例#1
0
        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);
        }
示例#2
0
 public void Add(MockPatient patient)
 {
     _patients.Add(patient);
 }