Our current project is using Mirth as a front-end to a Ruby on Rails application. Right now I'm working out how to get any HL7 message in and process it into an HTTP POST call.
What I'm working towards is getting in a message like this
and making an HTTP POST call like this
Is there a built-in JavaScript function that will help me to step through the message like this?
I'm thinking it has to be done in JavaScript because I want every message, no matter what type, to be processed and passed on. So converting from in JavaScript msg['PID']['PID.5']['PID.5.1'] to the PID_5_1 HTTP variable happens without creating a map by hand.
I think a recursive function in JavaScript using the message segment keys method to step through and channelMap.put will work, but I wanted to ask if there was a faster way to do this before creating that method.
Post edited by: jbartels, at: 08/13/2007 12:47
Post edited by: jbartels, at: 08/13/2007 12:47
What I'm working towards is getting in a message like this
Code:
MSH|^~&|LinkLogic-2009|2009001^ALL|MedicalProblemsDB|ALL|20070501124502||PPR^PC2|1493642702350870|P|2.3|||NE|NE PID|1|34|256546||Smith^Bob^Q||19470508|F||U|1234 Lake Ave^^Fort Wayne^IN^46815||(212)555-8059|||U|||000-00-0000 PV1|1|O|^^^ALL PRB|UP|20070501124353|924.11^CONTUSION^I9|1493642573000890||||||||||||20070501||1|Diagnosis of PRB|UP|20070501124353|719.46^PAIN-KNEE^I9|1493642573150890||||||||||||20070501||1|Diagnosis of PRB|UP|20070501124353|844.9^SPRAIN/STRAIN^I9|1493642573300890||||||||||||20070501||1|Diagnosis of
Code:
[url]http://myserver/hl7/process_message?MSH_3=LinkLogic-2009&MSH_4_1=2009001&MSH_4_2=ALL[/url]....
I'm thinking it has to be done in JavaScript because I want every message, no matter what type, to be processed and passed on. So converting from in JavaScript msg['PID']['PID.5']['PID.5.1'] to the PID_5_1 HTTP variable happens without creating a map by hand.
I think a recursive function in JavaScript using the message segment keys method to step through and channelMap.put will work, but I wanted to ask if there was a faster way to do this before creating that method.
Post edited by: jbartels, at: 08/13/2007 12:47
Post edited by: jbartels, at: 08/13/2007 12:47
Comment