Question
· 19 hr ago

Combining Two Sub Fields into One Segment

Hello, This probably easy but I can't seem to figure it out. I need to send the first and last name of nurses to one segment target. How do I do this? 

EVN 5.2 and EVN 5.3 needs to = One target segment 

 

Product version: IRIS 2021.1
Discussion (3)3
Log in or sign up to continue

I'm assuming you mean one target field, since a segment in HL7 starts with a segment identifier like PID or PV1 and contains a string of fields separated by field delimiters (normally the "|" character).

If, for example, you want to copy the  Patient First Name and Last Name separated by a space character into a single field, you could do this:

The underscore character is the concatenation operator in IRIS, so the example is taking:

source.{PIDgrpgrp(1).PIDgrp.PID:PatientName(1).GivenName}, Concatenating it with a space character followed by source.{PIDgrpgrp(1).PIDgrp.PID:PatientName(1).FamilyName}, then storing it in target.{PIDgrpgrp(1).PIDgrp.PID:PatientName(1)}. This effectively replaces the entire field with just the patient's first and last name.

My example uses the HL7 2.5.1 schema; your field paths may be different based on the version of HL7 you're using.