Adding PCL Commands to Target Source Documents, such as Rounds Report

More and more sites are looking to 'fancying up' their documents.  To change fonts, add italics and bolding to regular documents is a snap.  Adding PCL commands for font changes to Target/Source documents is just as simple but not so obvious.

Below are some basic instructions (and rules) for adding PCL commands to Target/Source Documents.  These instrustion should take some of the mystery out of making COR prints, worklist prints and Rounds Reports more pleasent to view.

Adding PCL code to a target document is as simple as adding PCL code to any other document... just add it, but watch out for the alingnment.  *** One note*** do not add the PCL code to the %LINEnn line of the target screen, that may cause problems.

Adding PCL code to source lines is just as easy, but there are a few things to keep in mind:

bulletEven though it does not print, the space that the PCL command takes on the source document 'counts' toward the number of characters used in a source line.
bulletAlignment can be tricky.  A PCL command does not print therfore you need to compensate for that in the alignment.  For example, Say that you want to start the patient name in column #4, and you are using a 5 character PCL command.  You need to define the patient name to start in column 9 (4+5). (the 5 character PCL command gets suppressed)
bulletYou must have 1 blank space before and 1 blanks space after each PCL command for the printer to properly recognize it as a PCL command.

Next is an example of what it takes to put a PCL command into a field.   For this example assume:

bulletThe bold ON PCL command is "ESC(1B" {or with host print it is "^(1B"}
bulletThe bold OFF PCL command is "ESC(0B" {or with host print it is "^)B"}
bulletOur source document field length is 60 characters

When you define the source document put your PCL commands before and after what you want to bold (turn on the bold, then turn it back off). 

Say that your current source document looks something like:

<.           .........................                         >
123456789012345678901234567890123456789012345678901234567890
          1          2          3          4          5          6

Field definitions below %LINE01 are something like:

   FIELD NAME  SIZE  POS      FIELD NAME  SIZE  POS     FIELD NAME  SIZE  POS
1  %ORSPACE    11         2   C0806       49

Next, add the PCL commands, (remember to have a blank space before and after data that you want to bold):

  <. ^(1B          .........................                ^(0B >
  123456789012345678901234567890123456789012345678901234567890
           1          2          3          4          5          6

The new improved source line still has 60 characters, (remember: you must keep that source line the same length as it was)  ***Note *** If you had data in the entire line, and want to do the bolding, you will have to remove some data.

The field definitions under %LINE must accommodate the PCL, so they would change to:

   FIELD NAME  SIZE   POS     FIELD NAME  SIZE  POS      FIELD NAME  SIZE  POS
1  %ORSPACE    15         2   C1203       45

In this example, everything should still line up the same after the bolding as before.