About MEDITECH Reports

 

View John Sharpe's profile on LinkedInI'm your host, John Sharpe, a MEDITECH Consultant living in Spokane, WA. Read more ...

Connect ...

Expand your network by connecting on these social media sites:

Sign up for the MEDITECH Reports Blog; details to attend MEDITECH workshops are sent out 1 week in advance to all MEDITECH Report blog subscribers.

These MEDITECH Workshops are sponsored by Donna Carroll at the MEDITECH Community Bulletin

MEDITECH NPR & RW RESOURCES:

Ascii Table: For NPR Report Writer
Loop Builder: For NPR Macros
Key Codes: For CDS Attributes
List Builder: For NPR Macros
MT Report Names: For NPR Reports
MT Structure Viewer: For Physicals
Strings: Format & Sort

HIT Topics

MEDITECH Reports

Current Articles | RSS Feed RSS Feed

Call New Page - Magic NPR

 

IF{/.LL<1 %[/R.NEW.PAGE.PGM](0)},/.LL-1^/.LL

That line of code is the code NPR uses to manage page length based on the Lines/Page & Page Size parameters on Screen 1 of your NPR report. The /.LL variable is a slash variable used to tell the Report Writer how many LINES are LEFT. I call it the LINES.LEFT variable. From NPR you can access it as @.lines.left which translates to /.LL. @.line translates to IF{/.LL-1^/.LL<1 %[/R.NEW.PAGE.PGM](0)}.

If you want NPR to print a new page at a particular point in your report; set /.LL to 0:

0^/.LL

While you might be tempted to assign 0 to @.lines.left or .lines.left; you cannot. The NPR syntax checker won't allow you to assign values to something starting with an @ prefix. With a normal field like ADM.PAT.patient, you could take the @ symbol off and assign "A1234"^ADM.PAT.patient and that would translate to "A1234"^aa. Which is why you need to assign the value of 0 to /.LL instead of the .lines.left macro.

When /.LL is less than 1; we just set it to 0, the Report Writer calls the new page program:

IF{/.LL<1 %[/R.NEW.PAGE.PGM](0)},/.LL-1^/.LL

Either way the /.LL will be decremented by one until /.LL = 0.

Want an alert when the next post is published? Click the phone and Subscribe to the MEDITECH Reports Blog!

Subscribe to the Meditech Blog     

                                                                                                                                                                                                          

Comments

Currently, there are no comments. Be the first to post one!
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics