Sidebar

How to remove blank spaces in OBX segment ...

0 votes
351 views
asked May 29, 2020 by saisharan-m-4614 (180 points)
OBXX|1|ST|||ED Provider Note,ERS Procedure Note,ERS Observation Note,ERS Attestation, ERS[x0A]Update Note,ERS Disposition Note (Notes for yesterday and today): No notes of[x0A]                                                                  this type[x0A]                                                                  exist for[x0A]                                                                  this[x0A]

2 Answers

0 votes

StringUtils.replace is a good function to use here. This is coded to replace the [x0A] with a single space. If there is another character that should be inserted instead, input the character in the last set of quotes within the StringUtils.replace function. Example: StringUtils.replace(value, '[x0A]', '~');

var value = message.getNode('/');
value = StringUtils.replace(value, '[x0A]', ' ');
message.setNode('/', value);

answered May 29, 2020 by amanda-w-3695 (4,840 points)
0 votes
Thanks! I tired  StringUtils.normalizeSpace function and it removed the spaces.
answered May 29, 2020 by saisharan-m-4614 (180 points)
...