Esempio n. 1
0
        public void ParseORRo02ToXml()
        {
            string Message = @"MSH|^~\&|INVISION|DHC|SUNQUEST LAB||200607100719||ORR^O02|ORDR|T|2.3.1|LAB
PID|0001||3017864||HILBERT^MARY||19440823|F||W||||||||40244246
PV1|0001|O|LW||||888883^DOCTOR, UNASSIGNED||||||||||888883|O|000000031540
ORC|NA|00003^00001|F1492|||||||||888883
OBR||00003^00001|F1492|RESPC^CULTURE RESPIRATORY ROUTINE|||||||L|||||||||F1492|||||||^ONCE&ONCE^^200607070600^200607070600^ROUTINE
";

            PipeParser Parser = new PipeParser();

            IMessage m = Parser.Parse(Message);

            ORR_O02 msg = m as ORR_O02;

            XMLParser xmlParser = new DefaultXMLParser();

            string recoveredMessage = xmlParser.Encode(msg);

            Assert.AreNotEqual(string.Empty, recoveredMessage);

            XmlDocument orrDoc = new XmlDocument();

            orrDoc.LoadXml(recoveredMessage);
            Assert.IsNotNull(orrDoc);
        }
Esempio n. 2
0
        /// <summary>
        /// Get NTE Records from ORR_O02
        /// </summary>
        public static IEnumerable GetNTERecords(this ORR_O02 message)
        {
            object[] result = message.GetRecords("NTERepetitionsUsed", "GetNTE");

            if ((result != null) && (result.Count() > 0))
            {
                for (int i = 0; i < result.Count(); i++)
                {
                    yield return(result[i]);
                }
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Add a new ORR_O02 to NTE
 /// </summary>
 public static NTE AddNTE(this ORR_O02 message)
 {
     return(message.GetNTE(message.NTERepetitionsUsed));
 }
Esempio n. 4
0
 /// <summary>
 /// Get all NTE Records from ORR_O02
 /// </summary>
 public static List <NTE> GetAllNTERecords(this ORR_O02 message)
 {
     return(message.GetAllRecords <NTE>("NTERepetitionsUsed", "GetNTE"));
 }