/// <summary> Tests dh patient 1111111. </summary> public void TestDHPatient1111111() { NHapi.Base.Parser.PipeParser Parser = new NHapi.Base.Parser.PipeParser(); NHapi.Base.Model.IMessage m = Parser.Parse(GetDHPatient1111111()); NHapi.Model.V231.Message.ORF_R04 orfR04 = m as NHapi.Model.V231.Message.ORF_R04; Assert.IsNotNull(orfR04); object range = orfR04.GetQUERY_RESPONSE().GetORDER().GetOBSERVATION().OBX.GetObservationValue(1); NHapi.Base.Parser.XMLParser xmlParser = new NHapi.Base.Parser.DefaultXMLParser(); string recoveredMessage = xmlParser.Encode(orfR04); Assert.IsNotNull(recoveredMessage); Assert.IsFalse(recoveredMessage.IndexOf("NTE") > -1, "Returned Message added ORC segment."); }
public void ParseORFR04() { string Message = @"MSH|^~\&|Query Result Locator|Query Facility Name|Query Application Name|ST ELSEWHERE HOSPITAL|20051024074506||ORF^R04|432|P|2.3.1| MSA|AA|123456789| QRD|20060228160421|R|I||||10^RD&Records&0126|38923^^^^^^^^&TCH||| QRF||20050101000000|| PID|||38923^^^ST ELSEWHERE HOSPITAL Medical Record Numbers& MEDIC AL RECORD NUMBER&ST ELSEWHERE HOSPITAL^MR^ST ELSEWHERE HOSPITAL||Bombadill^Tom||19450605|M|||1&Main Street^^Littleton^CO^80122||^^^^^303^4376329^22| OBR|1|0015566|DH2211223|83036^HEMOGLOBIN A1C^^83036^HEMOGLOBIN A1C|||20040526094000|||||||20040526094000||J12345^JENS^JENNY^^^DR^MD^^^^^^^112233&TCH||||| TP QUEST DIAGNOSTICS-TAMPA 4225 E. FOWLER AVE TAMPA FL 33617|20030622070400|||F| OBX|1|NM|50026400^HEMOGLOBIN A1C^^50026400^HEMOGLOBIN A1C||12|^% TOTAL HGB|4.0 - 6.0|H|||F|||20040510094000|TP^^L|"; NHapi.Base.Parser.PipeParser Parser = new NHapi.Base.Parser.PipeParser(); NHapi.Base.Model.IMessage m = Parser.Parse(Message); NHapi.Model.V231.Message.ORF_R04 orfR04 = m as NHapi.Model.V231.Message.ORF_R04; Assert.IsNotNull(orfR04); Assert.AreEqual("12", orfR04.GetQUERY_RESPONSE().GetORDER().GetOBSERVATION().OBX.GetObservationValue()[0].Data.ToString()); }