I did get it working with the help of a friend that lead me in the right direction.
First we concatenated the different pieces of data into the OBX.5 field with @ as our delimiter. We then brought in the destination as our source: (We added a couple of other fields that we needed to hard code information in for each segment)
~1(0).1(0).1(0).OBX(0).#5
contains our data
~~1(0).1(0).1(obxcnt).OBX(0).#1
output starts with 1 and increments for each segment
~~1(0).1(0).1(obxcnt).OBX(0).#2
hardcode value for each segment
~~1(0).1(0).1(obxcnt).OBX(0).#5
split our data on @ and created OBX segment for each value in our list
~~1(0).1(0).1(obxcnt).OBX(0).#11
hardcode value for each segment
Here is the code we used to create the different OBX segments:
echo $xlateInVals
set datalist [split [lindex $xlateInVals 0] “@”]
echo $datalist
set obxcnt 0
set outList {}
set xlateOutVals {}
foreach value $datalist {
set current [ string trimleft [ lindex $xlateInList 1 ] “~” ]
regsub obxcnt $current $obxcnt current
set outList $current
set outval [ expr $obxcnt + 1 ]
xpmstore $xlateId $outList c $outval
set current [ string trimleft [ lindex $xlateInList 2 ] “~” ]
regsub obxcnt $current $obxcnt current
set outList $current
set outval “TX”
xpmstore $xlateId $outList c $outval
set current [ string trimleft [ lindex $xlateInList 3 ] “~” ]
regsub obxcnt $current $obxcnt current
set outList $current
xpmstore $xlateId $outList c $value
set specimenStatus [ lindex $xlateInVals 5 ]
if { $specimenStatus == “” } {
set specimenStatus “F”
}
set current [ string trimleft [ lindex $xlateInList 4 ] “~” ]
regsub obxcnt $current $obxcnt current
set outList $current
xpmstore $xlateId $outList c $specimenStatus
incr obxcnt
echo obxcnt $obxcnt
}
[/img]