xLAB Label Scripts

xLab provides an extensive feature rich Script language for defining the output of Sample Labels. The ultimate goal of a Label Script is to output to a Label Printer pure text understood by the unique printer model and to generate a sample label with the sample and patient data desired.

The xLab Label Scripting language is comprised of 'Functions', and 'Keywords'.

The tables below summarizes all of these items

Functions:

Each Function takes none or more Parameters (indicated in italics in the table). Some Parameters are optional and are indicted in Blue..

Function Description
Patname(length,format) Outputs the Patient Name up to length characters in the format specified (see Keywords)
Labno(length,format) Outputs the length characters of the Accession Number in the format specified.
Pid() Output the Patient Medical Record Number
Coldt() Output the Collection Date/Time
TestList(count) Outputs up to count test codes for this Sample
Container(length,format) Outputs this sample container Container ID. Length and Format are optional fields and are used together. When specified the container ID is output to the number of characters (Length) specified in the format specified (see Keywords).
Barcode(function(),type,Hight)

Outputs the required data to cause the Label Print to Print a bar code for the information in function() of the bar code type type. Hight = the bar code hight in inches (I.E. .25 = 1/4 inch). The default Height is 1/4 inch

Out(value) Output the character specified by value. Value may be an integer between 0 and 255 or Hexadecimal specified as two characters between 0 and F followed by H. I.E. Out(1BH) will output Hex 1B (ESC).
SetBarcodeWidth(Width) Sets the width of the printed barcode. Width = an intiger between 1 and 10. Must proceed the Barcode() Function to which is applies. Is automatically reset upon printing
SetFontSize(size)

Sets the font size for text on the label. Valid point sizes are 6 through 20 with 6 being the smallest and 20 being the largest. Default size (if not set with SetFontSize) is 8 pt.

DOB() Output the Patient's DOB
Sex() Output the Patient's Sec (M/F/U)
SetHome(x,y) Sets the Left(x) and Top(y) position on the label where priinting will begin. A value of 25 = approximatly 1/8 inch.

Keywords: There are several Keywords used by the script language to help make writing the script easier;

Keyword Description
RJSF Right Justify, space fill
RKZF Right Justify zero fill
RJ Right Justify
PLN Last Name Only
PLNFN Last Name followed by First name
PLNFI Last name followed by First Initial
BC39 Code 39
BCS2OF5 Standard 2 of 5
BC128 Code 128

All Keywords are specified within single quotes, text to by output is enclosed in single quotes (') and may appear anywhere. All whitespace (not inside of single quotes or functions) is ignored. Lenght, Count, Width, Size, x and y are specified as numbers. Comment may be entered by preceeding them with double slashes (//)

For example

// Sample Label Script
SetHome(50,0)                                     //Start printing about 1/8 inch from left
'Patient Name' Patname(30,'PLNFI') //Output Patient Name Last name first Initial
Labno(10,'RJSF')
Barcode(Container(),'BC39')              //Output the Containter ID as a Code 39 Barcode

 

AP-Visions is a leading provider of IT healthcare solutions to seamlessly manage, move, store, and report all your electronic laboratory data.