HL7 CR/LF to create a blank space between segment -- resolved
My attempts to add CR/LF between segments
// Add CR/LF after "Total Cost:" if multiple "Item Number:" exist
//$$$LOGINFO(tItemNumberCount_" "_tTotalCostSegment_"----cr/lf")
If (tItemNumberCount > 1) && (tTotalCostSegment > 0) {
Set tOBXSegment = pOutput.GetSegmentAt("ORCgrp(1).OBRuniongrp.OBXgrp("_tTotalCostSegment_").OBX", .tStatus)
//$$$LOGINFO(tOBXSegment_"----"_"tOBXSegment from cr/lf")
Set tOBXText = tOBXSegment.GetValueAt(5) //_"||||||\X0D\\X0A\" // Append escaped CR/LF representation
//Do tOBXSegment.SetValueAt(tOBXText_"|\X0D\\X0A\|", 5)
//Do tOBXSegment.SetValueAt(tOBXText_"$c(13)_$c(10)", 5)
//Do tOBXSegment.SetValueAt("$c(13)_$c(10)", 11.1)
Do tOBXSegment.SetValueAt("\X0D\\X0A\", 11.1)
//$$$LOGINFO(tOBXText_" cr/lf OBX mod")
//Set tOBXTextCRLF = tOBXSegment.GetValueAt(11)
//Do tOBXSegment.SetValueAt(tOBXTextCRLF, 11)
}
Comments
Hey Gary.
I know that this has been mentioned before, but actual line breaks in the HL7 like this will likely causes issues with the parsing of the HL7 message in your receiving system.
I believe your goal should either be (see line 35):
.png)
(but maybe swapping out "/.br/" with "\X0D\\X0A\" depending on the receiving system per Jeffrey Drumm's comment here)
Or (see line 21)
.png)
Resolved