Removing white spaces or blank spaces in an NTE comment

29 views
Skip to first unread message

FJaffer

unread,
Aug 29, 2017, 1:54:15 PM8/29/17
to InterSystems: Ensemble in Healthcare
Hi friends,

Thank you so much for your continuous support on this group.  Very much appreciated.

I now have a new issue.......the receiving system can only handle 68 characters max in the NTE 3 segment.  Is there a way where I can remove spaces from the NTE 3 if it looks like this:

NTE|25|TX|Ampicillin/Sulbactam                         .06              Susceptible
NTE|26|TX|Piperacillin/Tazo                            64               Intermediate

I need to remove spaces from each of these pieces of data and trailing spaces if possible.

Thanks so much!
FJ

Lawrence Harris

unread,
Aug 29, 2017, 2:16:42 PM8/29/17
to InterSystems: Ensemble in Healthcare
A simple data transform that does the following:

$ZStrip(value,"*W")

will remove leading and trailing white space and convert multiple internal white space to one.
If it's ok to truncate on the right you could wrap that in $Extract(...,1,63)

Lawrence

FJaffer

unread,
Aug 31, 2017, 10:34:32 AM8/31/17
to InterSystems: Ensemble in Healthcare
Thank you Lawrence and all.  The $ZStrip function did work.  Thanks again!
Reply all
Reply to author
Forward
0 new messages