Blogs Home
Thursday, July 24, 2014 5:52 PM

NPR Tip (MAGIC or Client/Server) – When Standard Graphics Attributes Fall Short

Written by Joe Cocuzzo, Senior VP of Report Writing Services - iatricSystems

One limitation of NPR report graphical attributes is that you can only start vertical lines at the top of a box. Here is an example of a page header for a discharge order form:

Many preprinted forms have slightly different graphics for a page header, looking like this, leaving a space in the upper right for an “address-o-graph” stamping:

How could we reproduce this on an NPR report?

You can produce a vertical line, horizontal line, or grey or white box anywhere on the page in a C/S or MAGIC NPR report by using the utility, which has the following arguments:

Arguments: A = Box type 0 - black border

1 - grey box

2 - grey box and black border

B = length of box

C = ht of box (DFT=1) (can be 0 for just a horizontal line)

D = number of chars to move right (+) or left (-) before starting box

E = number of chars to move down (+) or (-) before starting box.

F = gray scale (default = 10%)

G = width of lines (DFT=5)

So if we remove the BX command from the page header of the report, and use the HL= (horizontal line) command to draw a line across the bottom of the page header, we can just add a call to to draw the vertical line down from the top of the page to the vertical line:

Let’s review how we are using the command. To draw our box, we pass the following arguments:

A = 0, this means we want a black border box

B = 0, length of box is zero which means we are drawing a vertical line.

C = 6, make the box 6 lines high (decimals are accepted as values)

D = 65 move to the right 65 spaces before starting the “box” (really a line here)

E = 0-5.5 We need to move up 5.5 lines so we subtract 5.5 from zero for the “move up” argument. We could also pass “-5.5” as the E argument.

F = not relevant, no grey shading

G = width of line (0-9 accepted)

(Note that to draw horizontal lines, you pass a non-zero length and a zero height).

We could also use an LC attribute to hold our code:

A LC expression becomes the condition of an IF statement that is wrapped around the line. So if you use an LC for other purposes, you need to decide if you need your line to print or be suppressed. To control what happens, add a nil or a value at the end of your LC expression, and that will control the value of the IF condition and will control whether the line prints.


If you have Boxes anywhere on your report, MEDITECH will automatically create a box around the entire page, so unless I add a special footnote to this report, I will still get this:

To prevent the default boxing add the following footnote to your report. (This footnote also will suppress the boxing of the standard page banner if your report has one).

Once we have done this, the automatic boxing of the page no longer occurs: