예제 #1
0
        public virtual void ShouldMapRequestMessageBean()
        {
            XmlToModelResult xmlToJavaResult      = new Hl7SourceMapper().MapToTeal(this.messageSource);
            UpdatePasswordRequestMessageBean teal = (UpdatePasswordRequestMessageBean)xmlToJavaResult.GetMessageObject();

            Assert.IsNotNull(teal, "message Bean");
            Assert.IsTrue(xmlToJavaResult.GetHl7Errors().IsEmpty());
            Assert.AreEqual("NLPN_TE100200CA", teal.ControlActEventBean.Code.CodeValue, "controlActEvent.code");
            Assert.AreEqual("Panacea", teal.ControlActEventBean.RegistrationBean.AssignedDevice.AssignedRepository, "assignedDevice.assignedRespository"
                            );
            Assert.AreEqual("somewhere", teal.ControlActEventBean.RegistrationBean.AssignedDevice.RepresentedRepositoryJurisdiction,
                            "assignedDevice.representedRepositoryJurisdiction");
            Assert.AreEqual("newPassw0rd", teal.ControlActEventBean.RegistrationBean.Record.Text, "password text");
        }
예제 #2
0
        public virtual XmlToModelResult TransformFromHl7(VersionNumber version, XmlDocument hl7Message, TimeZoneInfo dateTimeZone
                                                         , TimeZoneInfo dateTimeTimeZone, GenericCodeResolverRegistry codeResolverRegistryOverride)
        {
            CodeResolverRegistry.SetThreadLocalVersion(version);
            CodeResolverRegistry.SetThreadLocalCodeResolverRegistryOverride(codeResolverRegistryOverride);
            XmlToModelResult result = new Hl7SourceMapper().MapToTeal(new Hl7MessageSource(version, hl7Message, dateTimeZone, dateTimeTimeZone
                                                                                           , this.service));

            if (this.performAdditionalCdaValidationWhenUnmarshalling)
            {
                PerformAdditionalCdaValidation(version, hl7Message, result);
            }
            CodeResolverRegistry.ClearThreadLocalVersion();
            CodeResolverRegistry.ClearThreadLocalCodeResolverRegistryOverride();
            return(result);
        }
예제 #3
0
        public virtual void ShouldMapPatientReferralSummariesQueryResponseMessageBean()
        {
            XmlToModelResult xmlResult          = new Hl7SourceMapper().MapToTeal(this.messageSource);
            FindCandidatesQueryMessageBean teal = (FindCandidatesQueryMessageBean)xmlResult.GetMessageObject();

            Assert.IsNotNull(teal, "message Bean");
            Assert.AreEqual("1ee83ff1-08ab-4fe7-b573-ea777e9bad51", teal.MessageIdentifier.Root, "id");
            Assert.AreEqual("P", teal.ProcessingCode.CodeValue, "processingId");
            Assert.AreEqual("Panacea Pharmacy", teal.Sender.SoftwareName, "sender.softwareName");
            Assert.AreEqual("987.654.321.0", teal.Sender.TelecommunicationAddress.Address, "sender.telecommunicationAddress");
            Assert.IsNotNull(teal.Receiver.DeviceId, "receiver.deviceId");
            Assert.AreEqual("123.255.255.10", teal.Receiver.TelecommunicationAddress.Address, "receiver.telecommunicationAddress");
            Assert.AreEqual("PRPA_TE101103CA", teal.ControlActEventBean.Code.CodeValue, "controlActEvent.code");
            Assert.AreEqual("J", teal.ControlActEventBean.QueryByParameter.ParameterList.PersonNames[0].GivenName, "criteria first name"
                            );
            Assert.AreEqual("Smith", teal.ControlActEventBean.QueryByParameter.ParameterList.PersonNames[0].FamilyName, "criteria last name"
                            );
        }