Exemplo n.º 1
0
        private static List <Schema.Model.MessageStructure> LoadMessageList()
        {
            List <Schema.Model.MessageStructure> MessageStructureList = new List <Model.MessageStructure>();
            MessageParser oMessageParser = new MessageParser();
            List <string> FilenameList   = oMessageParser.Run(LoadXMLDocument(HL7v2Xsd.Filename.Messages));

            foreach (var Filename in FilenameList)
            {
                MessageTypeParser oMessageTypeParser = new MessageTypeParser();
                MessageStructureList.Add(oMessageTypeParser.Run(LoadXMLDocument(Filename), oSegmentDictionary));
            }
            return(MessageStructureList);
        }
Exemplo n.º 2
0
        private static List <Schema.Model.MessageStructure> LoadMessageList(string MessageType, string MessageEvent)
        {
            List <Schema.Model.MessageStructure> MessageStructureList = new List <Model.MessageStructure>();
            MessageParser oMessageParser = new MessageParser();
            List <string> FilenameList   = oMessageParser.Run(LoadXMLDocument(HL7v2Xsd.Filename.Messages));
            var           FileName       = FilenameList.SingleOrDefault(x => x == String.Format("{0}_{1}.xsd", MessageType, MessageEvent));

            if (FileName != null)
            {
                MessageTypeParser oMessageTypeParser = new MessageTypeParser();
                MessageStructureList.Add(oMessageTypeParser.Run(LoadXMLDocument(FileName), oSegmentDictionary));
            }
            return(MessageStructureList);
        }