web stats
Copying & pasting HL7 2.3 OBR fields to another field - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 08-14-2018, 02:50 AM
Mark Sull Mark Sull is offline
Mirth Newb
 
Join Date: May 2018
Location: Ireland
Posts: 24
Mark Sull is on a distinguished road
Default Copying & pasting HL7 2.3 OBR fields to another field

Hi All,

I'm trying to perform a simple copy and paste from OBR27 to OBR7. For some reason it does nothing with OBR-7.

/* copy and paster ob id and time into another field in the OBR segment 8*/
msg['OBR']['OBR.3']['OBR.3.1'] = msg['OBR']['OBR.2']['OBR.2.1'].toString()
msg['OBR']['OBR.7']['OBR.7.1'] = msg['OBR']['OBR.27']['OBR.27.4.1'].toString()

Incoming OBR segment:
OBR||^Placer||XKNER^XR Knee Rt|||||||||NOT KNOWN||||||||||||||^^^20170110085530^^0^|||||||||| ||||||||

There are carrot symbols in the fields so I'm assuming I'm not handling the carrot symbols correctly in the java script. Please help, I'm still very new to Mirth.

I have attached the route and the incoming HL7 ORM message I am working with.

Thanks in advance
Attached Files
File Type: xml V Test.xml (23.7 KB, 1 views)
File Type: txt sample hl7.txt (841 Bytes, 3 views)

Last edited by Mark Sull; 08-14-2018 at 04:54 AM.
Reply With Quote
  #2  
Old 08-15-2018, 01:06 PM
jg12345 jg12345 is offline
OBX.3 Kenobi
 
Join Date: Oct 2012
Posts: 105
jg12345 is on a distinguished road
Default

You were so close

msg['OBR']['OBR.7']['OBR.7.1'] = msg['OBR']['OBR.27']['OBR.27.4'].toString();
Reply With Quote
  #3  
Old 08-27-2018, 05:44 AM
Mark Sull Mark Sull is offline
Mirth Newb
 
Join Date: May 2018
Location: Ireland
Posts: 24
Mark Sull is on a distinguished road
Thumbs up Correct

Thank you very much, its always something small
Reply With Quote
Reply

Tags
hl7, java script

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 11:57 AM.


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