Print Page as PDF
CPRS UTILITIES ICR (6263)

CPRS UTILITIES    ICR (6263)

Name Value
NUMBER 6263
IA # 6263
DATE CREATED 2015/11/06
CUSTODIAL PACKAGE ORDER ENTRY/RESULTS REPORTING
USAGE Controlled Subscription
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE ORUTL
NAME CPRS UTILITIES
GENERAL DESCRIPTION
This integration control registration allows
subscribing packages to access internal utility functions within the Order
Entry/Results Reporting package.
STATUS Active
KEYWORDS
  • UTILITY
  • LINE WRAP
DURATION Till Otherwise Agreed
ID ORUTL
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
WRAP(LINE,OUTPUT,INDENT,TRIM,COLNUM,LINENUM,IOM,ZERO)
Wraps a line of text so that it is a certain number
of characters wide. If the line contains a colon, subsequent lines are
indented to that character's column position plus two. If the line does not
contain a colon but starts with one or more spaces, subsequent lines are
indented to the first non-space character's column position. Wrapped lines are
returned in an array.

This utility is designed to be called multiple times, once for each line of
text, wrapping those lines of text into a single array. This is useful in
displaying formatted output to the user, in formatting reports or formatting
the body of email messages.
VARIABLES TYPE VARIABLES DESCRIPTION
LINE Input
The line of text to wrap.
OUTPUT Both
Name of the array in which to return the wrapped text
in. Each subscript stores one line of text and is numeric. The first subscript
is one and subsequent subscripts are incremented by one.

The array variable itself may contain the total number of lines in the array.
The input variable LINENUM controls where the total number of lines of text is
returned.

Example:
OUTPUT=2
OUTPUT(1)="First line of text."
OUTPUT(2)="Second line of text."
INDENT Input
Boolean flag denoting whether to indent lines two
through the last (1) or not (0).
TRIM Input
Boolean flag denoting whether to remove trailing
spaces from every returned line (1) or not (0).
COLNUM Input
The column number that wrapped lines should be
indented to. If not specified, the utility will calculate this value based on
the position of the colon or if there is no colon, the position of the first
non-space character.
LINENUM Input
Reference to a variable in which the number of lines
in the OUTPUT array is stored. If no reference is specified ($D(LINENUM)=0),
the number of lines in the OUTPUT array is retuned in the OUTPUT array:
OUTPUT=number_of_lines
IOM Input
The width (number of characters) in each line. If
this is not specified, the utility will use either the value in the IOM system
variable or if that is not defined, 80.
ZERO Input
Boolean flag denoting whether to return text in a
zero subscript below the line number subscript (1) or not (0). The default
value is not (0).

Example for True:
OUTPUT(1,0)="Fist line of text."

Example for False:
OUTPUT(1)="First line of text."
SUBSCRIBING PACKAGE WOMEN'S HEALTH
DATE ACTIVATED 2017/11/14