From: Alan S. <ala...@bt...> - 2004-07-27 09:41:00
|
I would guess the problem is the extra trailing ^ in MSH:9 as HL7 =20 defines this as a two component field. Alan Shields On 26 Jul 2004, at 22:52, stevmon wrote: > I am not certain of the contact for my question.=A0 If this is not = the =20 > correct place, please refer me to whomever - and TIA. > > I am having a problem with some messages that I don't think it is =20 > correct behavior of the HAPI engine and the testpanel application.=A0 = We =20 > are trying to interface with a MedStar system to receive Orders =20 > message and populate the patient and exam exam tables used by another =20= > application.=A0 You should be able to duplicate the problem by pasting = =20 > the following message into the testpanel application and parsing it.=A0 = =20 > Here is an excerpt from the raw_messages.log file: > > =20 > = MSH|^~\&|MedStar||||200407261635||ORM^O01^|1833|P^|2.3.1|||||||English| > =20 > = PID|001||0000004164||Patient5^Pending||20040404|F||Black|2342^23423^MIa=20= > mi^FL^44444^|||||S|||000000000||||||||||| > =20 > = PV1|001||^^^50||||^^^^|^^||||||||||||||||||||||||||||||||||||2004051715=20= > 00|||||||| > ORC|NW||1770||||||||||||||50|||||||^^^^^ > OBR|001||1770|Default =20 > reason||||||||||||^^^|||||||||||^^^200405171500|||||||||||||||||| > > > MSH|^~\&|||||20040726153600.968-0600||ACK|233|P|2.3.1 > MSA|AE|1833|Couldn't Read PID Message Header: PID does not exist in =20= > the group ca.uhn.hl7v2.m > ERR|^^^207&Application Internal Error&HL70357 > > If I copy and past the raw message into the testpanel application, it = =20 > fails to parse the segments correctly.=A0 HOWEVER if I change the =20 > message type to ADT^O01 it will parse correctly - and if I change the =20= > message type to ORM^001 it will still parse the message correctly so =20= > the the PID, PV1, ORC and OBR segments can be retrieved correctly.=A0 =20= > Another excerpt from the logging file after I do this: > > MSH|^~\&|MedStar||||200407261635||ORM^001|1833|P|2.3.1|||||||English > =20 > = PID|001||0000004164||Patient5^Pending||20040404|F||Black|2342^23423^MIa=20= > mi^FL^44444|||||S|||000000000 > PV1|001||^^^50|||||||||||||||||||||||||||||||||||||||||200405171500 > ORC|NW||1770||||||||||||||50 > OBR|001||1770|Default reason|||||||||||||||||||||||^^^200405171500 > > > MSH|^~\&|||||20040726154142.218-0600||ACK|234|P|2.3.1 > MSA|AA|1833 > > Note that the message that is logged has been slightly altered during = =20 > the process of changing the message type back and forth.=A0 I have = added =20 > my own message handler based on the simple_server and that seems to =20= > work very well once the message is interpreted and parsed into =20 > components correctly. > > I am trying to get some other examples from elsewhere and have tried =20= > some messages found on the internet including so,e from linkmed.com.=A0 = =20 > The ORM tag seems to cause some confusion but a simple edit to ADT and = =20 > everything seems fine (in some cases, it does appear that I cannot =20 > toggle back to ORM or the message will fail to parse again.) > > As usuall this project needs to get done very soon and I would =20 > appreciate a rapid response very much! > > Thanks > Stev=20= |