Announcement

Collapse
No announcement yet.

How to copy a value from one segment to another only if the value exist

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to copy a value from one segment to another only if the value exist

    Hello. I am trying to find out how to copy a value in the PV1 segment to the OBX segment but not into not every OBX segment. For example if PV1.20 is populated, I want to copy it into the first OBX segment in the OBX5.1 field. If PV1.19 is populated, I want to copy that into the second OBX segment in the OBX 5.1 field. I searched a number of threads, but no luck. I am sure this is very simple, but I cannot figure it out. Any help is appreciated.




    Mirth version is 3.4.0.8000

  • #2
    Figured it out, once I got an error that was found on the form. This was the solution.


    msg['OBX'][0]['OBX.5']['OBX.5.1'] = msg['PV1']['PV1.20'] ['PV1.20.1'];
    msg['OBX'][1]['OBX.5']['OBX.5.1'] = msg['PV1']['PV1.19'] ['PV1.19.1'];

    Comment

    Working...
    X