Question
Patty Aguirre-Romero · Oct 18

Can I remove some content from PID-3, from HL7 message?

I need to remove content below, from PID-3/HL7 message, in IRIS. However, I need to keep the content in PID-3.1. For example, I’d need to keep only, “5050532”. Can this be done in Data Transformations? If yes, how?
Thank you!

MSH|^~\&|TEMPUS|TEMPUS LABS|EPICEMR|YRMC|20210930100824||ORU^R01|4823623379495310173|T|2.3|
PID|1||5050532^^^YRMC~09abefb8-872b-4147-8e4b-77463bb235cb^^^^TEMPUS||

Product version: IRIS 2021.1
00
2 0 4 99
Log in or sign up to continue

Sure, just set the value of target.{PID:3} to source.{PID:3.1}. It will overwrite the entire field with just what was in the first sub-field:

Like this (assuming you want the first iteration of PID:3.1 to overwrite all iterations of PID:3):

Thanks Jeffrey! This is the closest I could map the ID to your suggestion. However, it only removed "YRMC" and left the tilde and everything after still in the message. Any idea how to remove the rest of the content?

Thank you!

 

PID:3 is a list, meaning it has the potential to contain multiple ID numbers separated by the repetition character (normally a tilde). If you only want the first ID number to appear on the target field, don't use a for each loop. Just use a single set rule as shown below:

Note that there's no repetition indicator in the target path, and we're selecting the first repetition in the source:

Jeffrey,

Thank you so much for your help!!!  Your instructions worked; plus, I just had to remove value "k1" from the source.