Kathy Ward · Nov 2, 2021

Searching for carriage return in an HL7 field

A vendor is sending an HL7 message where they are hitting the enter key within the field. I am looking for a way to concatenate the lines.  I want to know if there id a way to search the field for a carriage return and piece together the field.  This is an example of what they are sending:

NTE|1||Fake Interpretation A Overall Summary. Patient presents with abnormal SR and RHR. 
Fake Interpretation B 80/120
Fake Interpretation C  - HR 55 BPM|
Product version: IRIS 2021.1
0 171
Discussion (3)1
Log in or sign up to continue
 DO pRequest.SetValueAt($REPLACE(pRequest.GetValueAt("NTE:3"),$C(13,10),$C(32)),"NTE:3")

Thanks, I will give it a try.

set newDataString=$tr(OldDataString,$C(13,10)," ")