Sidebar
0 votes
489 views
by gary-t-8719 (15.1k points)
Some clinics pad the patient id with leading zeros and in some cases these leading zeros need to be trimmed off.

1 Answer

0 votes
 
Best answer

Use a regular expression like this:

var pid3 = source.getNode('PID-3');

pid3 = pid3.replaceFirst("^0+(?!$)", ""); // remove leading 0's from pid3

This answer was inspired by stackOverFlow.com.

 

by mike-r-7535 (13.8k points)
selected by ron-s-6919
...