Then you can iterate as would normally off the field5, but place your
key in the segment iteration.
<foreach
property='source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(
)}' key='k1'>
<assign property='target.{OBX(k1):ObservationValue(1)}'
value='source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ObservationValue(k1)
}' action='set'/>
<assign property='target.{OBX(k1):ValueType}'
value='source.{PIDgrpgrp(1).ORCgrp(1).OBXgrp(1).OBX:ValueType}'
action='set'/>
Thanks,
Gary
Hello,
Regards,
Laura
--
You received this message because you are subscribed to the Google
Groups "InterSystems: Ensemble in Healthcare Community" group.
To post to this group, send email to
Ensemble-in...@googlegroups.com
To unsubscribe from this group, send email to
Ensemble-in-Healt...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
<code>
<![CDATA[
set inputtext =
target.GetValueAt("ORCgrp(1).OBXgrp(1).OBX:ObservationValue()")
for i = 1:1:$l(inputtext,"\.br\"){
set newline = $p(inputtext,"\.br\",i)
//Build the OBX
S tSC=target.SetValueAt(newline,"ORCgrp(1).OBXgrp("_i_").OBX:ObservationValue(1)","set")
}
]]>
</code>
-Ben
Thanks,
Laura
This electronic transmission and any documents accompanying this electronic transmission may contain information that is confidential and/or legally privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on or regarding the contents of this electronically transmitted information is strictly prohibited. If you have received this e-mail in error, please notify the sender and delete this message immediately.
In the tSC=target.SetValueAt(i,"ORCgrp(1).OBXgrp("_i_").OBX:SetIDOBX","set")
'i' is the instance of the OBX that you are creating.
You only need to populate the fields that have data. The remaining field will be empty.
What you have below should work.
Although for OBX field 1, I would use 'i' as the value, rather than copying from the source. This way you will get an incrementing set id.