In order to make debugging scripts easier, Chameleon has a log function which outputs the argument into the log window of the server. For example:
log('Patient ID before stripping leading zeros = ' + value)
value = strip_leading_chars('0', value)
log('Patient ID afterwards = ' + value)
The built-in Python str function for converting numbers
to strings can be very useful for printing out numbers since
the log function requires a string
argument.