ScriptUtil provides miscellaneous functions that allow you to simplify your scripts and support special use-cases. ScriptUtil is bound to all script session contexts, so you can use these functions in tablet rules or within eForms (show if, make note if, etc.).
| Variable(s) | Description & Example Expression |
|---|---|
| sum, max, min |
Returns the sum/max/min of point values in the section
|
| countAnswersMatching, countAnswersWithPointsEqualTo |
The number of answers matching the value or point value in the specified section
|
| percentComplete |
Returns a number between 0 and 100 representing the number of completed items in a section (including nested sections)
|
| getKeyword |
Provides access to any keyword. Used for CPP access and a ‘catch-all’ for access to patient information.
|
| getResponse |
Provides access to an answer provided on a previous EForm in the same session.
|
|
queueContains (supported on Ocean Tablet only) |
Returns true if the form queue (or completed forms) contains the ref passed in.
|
|
queueSize (supported on Ocean Tablet only) |
Returns the number of forms in the queue plus any forms that have already been completed.
|
| parseDate |
Accepts a date string in "yyyy-mm-dd" format and returns a Javascript Date (tablet v127+)
|
| webQ |
Displays sections or items for web questionnaires only, not tablets.
|
| walkIn |
Returns true for walk-in patients (tablet v178+).
|