Add text to a field in data transformation

1 view
Skip to first unread message

LMC

unread,
May 8, 2013, 5:02:40 PM5/8/13
to Ensemble-in...@googlegroups.com
I want to add "PMHD Laboratory" into the OBR filler field, IF the MSH sending facility is "PMHD" in an ORU message. I have tried numerous things and it is giving me a hard time.

John Zarate

unread,
May 8, 2013, 6:43:38 PM5/8/13
to Ensemble-in...@googlegroups.com, Ensemble-in...@googlegroups.com
There are a couple of things you need to watch out for.  Depending on you version the obr segment may be in a repeating Orc group or be repeating it self so make sure the target assignment is pointed to the instance of that segment.  Your if statement should be straightforward just to a if you keep in mind the Previous statement that if it repeats then you may have to do a for loop to get to it or just point the exact instance of that segment if its consistently in the same place.  Target.{MSH:4 or sending facility}="string" 
Your action is an append or set depending if you want prepend or append.  You can always use the "_" to
Concatenate...
Action is a set
Property=target.{...obr:filler field}
Value=
Target.{...OBR:filler field }_"PMHD.."
Keep in mind only do this if you have already mapped the source to target in an earlier step in your transform otherwise your value =source.{...}_"PMHD"

Sent from my iPhone

On May 8, 2013, at 4:02 PM, LMC <amnir...@gmail.com> wrote:

I want to add "PMHD Laboratory" into the OBR filler field, IF the MSH sending facility is "PMHD" in an ORU message. I have tried numerous things and it is giving me a hard time.

--
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" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

LMC

unread,
May 13, 2013, 2:54:31 PM5/13/13
to Ensemble-in...@googlegroups.com
Here is what I have for it and it isnt working out for me. It says If Contains(source.{MSH:SendingFacility},"PMHD")", insert "PMHD Laboratory" in Target.{PIDgrpgrp().ORCgrp().OBR:FillerField2}, else, endif.

Bear, Alex

unread,
May 13, 2013, 3:30:07 PM5/13/13
to Ensemble-in...@googlegroups.com

Are you trying to put PMHD in the second field of each repetition of the OBR filler field? Or is there a particular OBR filler field that you are looking to populate?

 

If it is the former, you may have to perform two sets of loops to assign the values.

 

If it is the later, the statement provided by LMC should work by inserting the index of the PID group and the ORC group in the statement.

 

Alex Bear

IT Programmer/Analyst

4 BAP

3200 Burnet Ave

Cincinnati, OH 45229

513-585-7345

--

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" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

LMC

unread,
May 13, 2013, 6:57:03 PM5/13/13
to Ensemble-in...@googlegroups.com
It would just need to be the first OBR filler field.
 

On Wednesday, May 8, 2013 2:02:40 PM UTC-7, LMC wrote:

Bear, Alex

unread,
May 14, 2013, 7:57:27 AM5/14/13
to Ensemble-in...@googlegroups.com

If you only want the “PMHD Laboratory” in the first OBR, then modifying your IF statement to:

 

If Contains(source.{MSH:SendingFacility},"PMHD")", insert "PMHD Laboratory" in Target.{PIDgrpgrp(1).ORCgrp(1).OBR:FillerField2}, else, endif.

 

Should give you those results. If the ORU message has multiple ORC groups, it may be necessary to loop through PID and ORC group to set the value in the first OBR.

 

Alex Bear

IT Programmer/Analyst

4 BAP

3200 Burnet Ave

Cincinnati, OH 45229

513-585-7345

 

 

 

From: Ensemble-in...@googlegroups.com [mailto:Ensemble-in...@googlegroups.com] On Behalf Of LMC
Sent: Monday, May 13, 2013 6:57 PM
To: Ensemble-in...@googlegroups.com
Subject: [InterSystems-EnsHlth] Re: Add text to a field in data transformation

 

It would just need to be the first OBR filler field.

 


On Wednesday, May 8, 2013 2:02:40 PM UTC-7, LMC wrote:

I want to add "PMHD Laboratory" into the OBR filler field, IF the MSH sending facility is "PMHD" in an ORU message. I have tried numerous things and it is giving me a hard time.

--

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" group.
To unsubscribe from this group and stop receiving emails from it, send an email to Ensemble-in-Healt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages