From: stevmon <ste...@si...> - 2004-07-26 21:52:55
|
I am not certain of the contact for my question. If this is not the correct place, please refer me to whomever - and TIA. I am having a problem with some messages that I don't think it is correct behavior of the HAPI engine and the testpanel application. We are trying to interface with a MedStar system to receive Orders message and populate the patient and exam exam tables used by another application. You should be able to duplicate the problem by pasting the following message into the testpanel application and parsing it. Here is an excerpt from the raw_messages.log file: MSH|^~\&|MedStar||||200407261635||ORM^O01^|1833|P^|2.3.1|||||||English| PID|001||0000004164||Patient5^Pending||20040404|F||Black|2342^23423^MIami^FL^44444^|||||S|||000000000||||||||||| PV1|001||^^^50||||^^^^|^^||||||||||||||||||||||||||||||||||||200405171500|||||||| ORC|NW||1770||||||||||||||50|||||||^^^^^ OBR|001||1770|Default 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 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 fails to parse the segments correctly. HOWEVER if I change the message type to ADT^O01 it will parse correctly - and if I change the message type to ORM^001 it will still parse the message correctly so the the PID, PV1, ORC and OBR segments can be retrieved correctly. Another excerpt from the logging file after I do this: MSH|^~\&|MedStar||||200407261635||ORM^001|1833|P|2.3.1|||||||English PID|001||0000004164||Patient5^Pending||20040404|F||Black|2342^23423^MIami^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 the process of changing the message type back and forth. I have added my own message handler based on the simple_server and that seems to work very well once the message is interpreted and parsed into components correctly. I am trying to get some other examples from elsewhere and have tried some messages found on the internet including so,e from linkmed.com. The ORM tag seems to cause some confusion but a simple edit to ADT and everything seems fine (in some cases, it does appear that I cannot 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 appreciate a rapid response very much! Thanks Stev |