Example #1
0
        private Interaction DetermineInteraction(string messageId, ICollection <string> templateIdsFromDocument, VersionNumber version
                                                 , MessageDefinitionService service, Hl7Errors errors)
        {
            Interaction result = null;

            if (service.IsCda(version))
            {
                result = ObtainCdaInteraction(templateIdsFromDocument, version, service, errors);
            }
            else
            {
                result = ObtainHl7v3Interaction(messageId, version, service, errors);
            }
            return(result);
        }
Example #2
0
        public Hl7MessageSource(VersionNumber version, XmlDocument document, TimeZoneInfo dateTimeZone, TimeZoneInfo dateTimeTimeZone
                                , MessageDefinitionService service)
        {
            this.document = document;
            this.isR2     = service.IsR2(version);
            this.isCda    = service.IsCda(version);
            string messageIdFromDocument = GetMessageIdFromDocument();
            ICollection <string> templateIdsFromDocument = GetTemplateIdsFromDocument();

            this.result  = new XmlToModelResult();
            this.context = new ConversionContext(service, version, dateTimeZone, dateTimeTimeZone, messageIdFromDocument, templateIdsFromDocument
                                                 , result);
            if (this.context.GetInteraction() != null)
            {
                this.messagePart = InitMessagePart();
            }
        }