Hi James
The structure of your source segment path is not correct for an ORM^O01. It looks good for your target.
If the source is an ORM^O01 I think it should look like this…
<foreach property='source.{ORCgrp(1).OBRuniongrp.OBX()}' key='k1'>
<subtransform class='GH.LabORMSubTransformOBX' targetObj='target.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}' sourceObj='source.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}'/>
</foreach>
Perhaps I’m missing something though.
Note that this will only look at the first ORCgrp. If you want everything then you will need to nest you foreach inside an ORCgrp foreach.
Regards
Dave
--
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
source .{ORCgrp(1).OBRgrp.OBXgrp.OBX()} and target.{OBX()}
I would like to use sub-transformation(OBX) on each of OBX segment. Please guide me in using the correct <foreach> code.
Regards,
James
Hi James
The structure of your source segment path is not correct for an ORM^O01. It looks good for your target.
If the source is an ORM^O01 I think it should look like this…
<foreach property='source.{ORCgrp(1).OBRuniongrp.OBX()}' key='k1'>
<subtransform class='GH.LabORMSubTransformOBX' targetObj='target.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}' sourceObj='source.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}'/>
</foreach>
Perhaps I’m missing something though.
Note that this will only look at the first ORCgrp. If you want everything then you will need to nest you foreach inside an ORCgrp foreach.
Regards
Dave
From: ensemble-in-healthcare@googlegroups.com [mailto:ensemble-in-healt...@googlegroups.com] On Behalf Of JamesG
Sent: 10 May 2012 13:34
To: Ensemble-in-Healthcare@googlegroups.com
Subject: [InterSystems-EnsHlth] <foreach> Multiple OBX Segments
Hi,
I am trying to use sub-transformation (OBX) in ORM^O01 message transformation. <Foreach> does not seems to be working. Here is the code from DTL. Any inputs are much appreciated.
<foreach property='source.{ORCgrp(1).OBRgrp.OBXgrp(1).OBX}' key='k1'>
<subtransform class='GH.LabORMSubTransformOBX' targetObj='target.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}' sourceObj='source.{ORCgrp(1).OBRgrp.OBXgrp(1).OBX(k1)}'/>
</foreach>
Thanks,
James
--
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-Healthcare@googlegroups.com
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsub...@googlegroups.com
Is it not the fact that it needs to repeat at the obx group level and not the obx segment itself?
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
To unsubscribe from this group, send email to Ensemble-in-Healthcare-unsubscri...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/Ensemble-in-Healthcare?hl=en
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
Ok unfortunately I am not at work at the moment otherwise I would have looked at our code as we have done this many times. I would try testing by creating a variable and increment that in the loop and output it somewhere in your msh for example then you van tell if your looping is working, if that count is fine then it will be an issue with your source or Target or the actual subtransform
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
Hi James
Open a WRC issue for this. It will only take a few minutes to solve if all the information is present, source, target etc.
Best regards
Dave
From: ensemble-in...@googlegroups.com [mailto:ensemble-in...@googlegroups.com]
On Behalf Of JamesG
Sent: 15 May 2012 17:07
To: Ensemble-in...@googlegroups.com
Cc: ensemble-in...@googlegroups.com
Subject: Re: [InterSystems-EnsHlth] <foreach> Multiple OBX Segments
Hi Dave,
Thanks for your response. Actually my message structures are different for source and target.
source .{ORCgrp(1).OBRgrp.OBXgrp.OBX()} and target.{OBX()}
I would like to use sub-transformation(OBX) on each of OBX segment. Please guide me in using the correct <foreach> code.
Regards,
James
On Thursday, 10 May 2012 13:51:50 UTC+1, ISC Dave wrote:
Hi James
The structure of your source segment path is not correct for an ORM^O01. It looks good for your target.
If the source is an ORM^O01 I think it should look like this…
<foreach property='source.{ORCgrp(1).OBRuniongrp.OBX()}' key='k1'>
<subtransform class='GH.LabORMSubTransformOBX' targetObj='target.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}' sourceObj='source.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}'/>
</foreach>
Perhaps I’m missing something though.
Note that this will only look at the first ORCgrp. If you want everything then you will need to nest you foreach inside an ORCgrp foreach.
Regards
Dave
From:
ensemble-in...@googlegroups.com [mailto:ensemble-in...@googlegroups.com]
On Behalf Of JamesG
Sent: 10 May 2012 13:34
To:
Ensemble-in...@googlegroups.com
Subject: [InterSystems-EnsHlth] <foreach> Multiple OBX Segments
Hi,
I am trying to use sub-transformation (OBX) in ORM^O01 message transformation. <Foreach> does not seems to be working. Here is the code from DTL. Any inputs are much appreciated.
<foreach property='source.{ORCgrp(1).OBRgrp.OBXgrp(1).OBX}' key='k1'>
<subtransform class='GH.LabORMSubTransformOBX' targetObj='target.{ORCgrp(1).OBRuniongrp.OBXgrp(1).OBX(k1)}' sourceObj='source.{ORCgrp(1).OBRgrp.OBXgrp(1).OBX(k1)}'/>
</foreach>
Thanks,
James
--
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
--
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