Need help on manipulating an inbound message #6487
Replies: 4 comments 7 replies
-
Did you look at https://github.com/nextgenhealthcare/connect-examples/tree/master/Code%20Templates/Create%20and%20Insert%20Segment%20Templates ? |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll discuss it with the team and see about adding these functions. Is there anyway to do it without adding these functions? |
Beta Was this translation helpful? Give feedback.
-
Nevermind I think I figured it out |
Beta Was this translation helpful? Give feedback.
-
Thanks to your help, it is "almost" working, the only issue is that I need to wrap the text in OBX.5.1 between / .br/ any ideas? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are receiving ORU messages from a vendor that need to be manipulated. The issue is that I need to modify the OBX segments and move them down 2 (renumber), so that I can insert two obx segments at the top of the obx section.
So
OBX|1|ST|CAOS&GDT|
OBX|2|ST|CAOS&GDT|
OBX|3|ST|CAOS&GDT|
OBX|4|ST|CAOS&GDT|
OBX|5|ST|CAOS&GDT|
Would become
OBX|3|ST|CAOS&GDT|
OBX|4|ST|CAOS&GDT|
OBX|5|ST|CAOS&GDT|
OBX|6|ST|CAOS&GDT|
OBX|7|ST|CAOS&GDT|
So that we could add
OBX|1|ST|CAOS&GDT|
OBX|2|ST|CAOS&GDT|
My code so far
I have the renumbering portion
var newOBXNum = 3;
for each (obx in tmp.OBX){
obx['OBX.1']['OBX.1.1'] = newOBXNum++;
}
My issue is trying to create the first two OBX segments with the values above
I tried using createSegement but it just overwrites.
createSegment ('OBX', tmp, 0);
Beta Was this translation helpful? Give feedback.
All reactions