Sidebar

Remove blank space within OBX 5

0 votes
401 views
asked Apr 22, 2019 by amanda-n-4772 (120 points)
Currently, the OBX-5 segment with lab results is coming in with a long blank space between "Result" and the actual result so that it looks like this "RESULT:            Not Detected'

I'd like to simply get rid of the blank space between the string of data so that it looks like this:

'RESULT: Not Detected'

1 Answer

0 votes

You can use a trim function to remove leading spaces.

 

var obx5 = StringUtils.trim(source.getNode('OBX-5'));
message.setNode('OBX-5', obx5);

answered Apr 22, 2019 by michael-h-5027 (14,390 points)
commented Apr 22, 2019 by amanda-n-4772 (120 points)
That's removes the entire obx-5 segment. What I'm looking to do is just remove the blank space between the two words within the OBX-5 segment.
...