User bio
404 bio not found
Member since Nov 23, 2020
Replies:

Hi Marcus,

Sometimes it easier not copy all the addresses across in the first place, so that the target addresses field is empty when you start the 'for each' loop, but if you have copied all the addresses across then I would clear all the target addresses out, before your 'for each' loop.

So the code would be something like:

<assign value='' property='target.{PatientAddress}' action='clear' />
<foreach property='source.{PatientAddress()}' key='k1' >
<if condition='source.{PatientAddress(k1).addresstype}="H"' >
<true>
<assign value='source.{PatientAddress(k1)}' property='target.{PatientAddress(1)}' action='set' />
<assign value='"HOME"' property='target.{PatientAddress(1).addresstype}' action='set' />
</true>
</if>
</foreach>

Hop this helps.

Regards

Neil

Certifications & Credly badges:
Neil has no Certifications & Credly badges yet.
Global Masters badges:
Neil has no Global Masters badges yet.
Followers:
Following:
Neil has not followed anybody yet.