示例#1
0
        public void TestUpdatePIDMultipleNames()
        {
            var actual = new ADT_A01().PID;

            this.patient.Names.Add(new EntityName(NameUseKeys.Search, "Norgate", "Andrew"));

            NotifierBase.UpdatePID(this.patient, actual, this.configuration);

            Assert.AreEqual("M", actual.Sex.Value);
            Assert.AreEqual("19700101000000.000-0500", actual.DateTimeOfBirth.TimeOfAnEvent.Value);

            var mothersName = actual.GetMotherSMaidenName(0);

            Assert.AreEqual("Smith", mothersName.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Mary L A", mothersName.GivenName.Value);

            var nameRepOne = actual.GetPatientName(0);

            Assert.AreEqual("Khanna", nameRepOne.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Nityan David", nameRepOne.GivenName.Value);

            var nameRepTwo = actual.GetPatientName(1);

            Assert.AreEqual("Norgate", nameRepTwo.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Andrew", nameRepTwo.GivenName.Value);
        }
示例#2
0
        public void TestUpdatePIDGenderConceptKeyMale()
        {
            var actual = new ADT_A01().PID;

            this.patient.GenderConcept    = null;
            this.patient.GenderConceptKey = Guid.Parse("f4e3a6bb-612e-46b2-9f77-ff844d971198");

            this.patient.Names.Add(new EntityName(NameUseKeys.Search, "Norgate", "Andrew"));

            NotifierBase.UpdatePID(this.patient, actual, this.configuration);

            Assert.AreEqual("M", actual.Sex.Value);
            Assert.AreEqual("19700101000000.000-0500", actual.DateTimeOfBirth.TimeOfAnEvent.Value);

            var mothersName = actual.GetMotherSMaidenName(0);

            Assert.AreEqual("Smith", mothersName.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Mary L A", mothersName.GivenName.Value);

            var nameRepOne = actual.GetPatientName(0);

            Assert.AreEqual("Khanna", nameRepOne.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Nityan David", nameRepOne.GivenName.Value);

            var nameRepTwo = actual.GetPatientName(1);

            Assert.AreEqual("Norgate", nameRepTwo.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Andrew", nameRepTwo.GivenName.Value);
        }
示例#3
0
        public void TestUpdatePIDGenderConceptKeyUndifferentiated()
        {
            var actual = new ADT_A01().PID;

            this.patient.GenderConcept    = null;
            this.patient.GenderConceptKey = Guid.Parse("ae94a782-1485-4241-9bca-5b09db2156bf");

            this.patient.Names.Add(new EntityName(NameUseKeys.Search, "Norgate", "Andrew"));

            NotifierBase.UpdatePID(this.patient, actual, this.configuration);

            Assert.AreEqual("U", actual.Sex.Value);
            Assert.AreEqual("19700101000000.000-0500", actual.DateTimeOfBirth.TimeOfAnEvent.Value);

            var mothersName = actual.GetMotherSMaidenName(0);

            Assert.AreEqual("Smith", mothersName.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Mary L A", mothersName.GivenName.Value);

            var nameRepOne = actual.GetPatientName(0);

            Assert.AreEqual("Khanna", nameRepOne.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Nityan David", nameRepOne.GivenName.Value);

            var nameRepTwo = actual.GetPatientName(1);

            Assert.AreEqual("Norgate", nameRepTwo.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Andrew", nameRepTwo.GivenName.Value);
        }
示例#4
0
        public void TestUpdatePID()
        {
            var actual = new ADT_A01().PID;

            Configuration.TargetConfiguration configuration = new Configuration.TargetConfiguration("Test", "llp://localhost:2100", "PAT_IDENTITY_SRC", "UnitTestDevice");

            configuration.NotificationDomainConfigurations.Add(new Configuration.NotificationDomainConfiguration("TestNotificationDomain"));

            NotifierBase.UpdatePID(this.patient, actual, configuration);

            Assert.AreEqual("M", actual.Sex.Value);
            Assert.AreEqual("19700101000000.000-0500", actual.DateTimeOfBirth.TimeOfAnEvent.Value);

            var mothersName = actual.GetMotherSMaidenName(0);

            Assert.AreEqual("Smith", mothersName.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Mary L A", mothersName.GivenName.Value);

            var name = actual.GetPatientName(0);

            Assert.AreEqual("Khanna", name.FamilyLastName.FamilyName.Value);
            Assert.AreEqual("Nityan David", name.GivenName.Value);
        }