web stats
Building/Creating new OBXs - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-02-2015, 04:08 PM
fchang fchang is offline
Mirth Newb
 
Join Date: Jan 2013
Location: Southern California
Posts: 13
fchang is on a distinguished road
Send a message via Yahoo to fchang
Default Building/Creating new OBXs

I am trying to create OBXs based on repeating values in OBR-20.

I've done that but the problem I am having now is attaching the incoming
OBXs to the end of that. I've attached a simplified HL7 message for clarity.

Inbound :

MSH|...
PID|...
PV1|...
ORC|...
OBR|||||5|||||10|||||15||||19|G7~G8~G9~R11|...
OBX|1||||obx1comment|...
OBX|2||||obx2comment|...
OBX|3||||obx3comment|...
OBX|4||||obx4comment|...

Outbound :

MSH|...
PID|...
PV1|...
ORC|...
OBR|||||5|||||10|||||15||||19|G7~G8~G9~R11|...
OBX|1||||G7|...
OBX|2||||G8|...
OBX|3||||G9|...
OBX|4||||R11|...
OBX|5||||obx1comment|...
OBX|6||||obx2comment|...
OBX|7||||obx3comment|...
OBX|8||||obx4comment|...

When I tried to create a new OBX, I am getting an error.

Here is a portion of my code. I have a loop where i=0 and OBR20Length is 4 for this example. countOBX = 4 in this example for the number of incoming OBXs.


for each (var i=0;i<=countOBX-1;i++)
{
if (i >=(OBR20Length+1))
{
tmp['OBX'][i+OBR20Length+1] = new XML("<OBX/>");
tmp['OBX'][i+OBR20Length+1]['OBX.1']['OBX.1.1'] = i+OBR20Length+2;
.....
}
else
{
msg['OBX'][i+OBR20Length+1]['OBX.1']['OBX.1.1'] = i+OBR20Length+2;
msg['OBX'][i+OBR20Length+1]['OBX.2']['OBX.2.1'] = "TX";
......
}


I am using Mirth v3.2.0.7628 on Windows Server.

Thanks in advance.
Reply With Quote
 

Tags
creating, obx, segment, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation