E-mail
Thursday, 01 April 2010 07:00

Tricks of the Trade: MEDITECH NPR (Client Server) – Custom F9 Lookups for NPR Reports - Part 2 of 2

By: John Sharpe, President, Comstock Software, Inc.

NOTE: This is Part 2 in a series titled: Custom F9 Lookups for NPR Reports. Reading Part 1, before reading further is recommended.

This is Part 2 in a series titled: Custom F9 Lookups for NPR Reports. Reading Part 1, before reading further is recommended.

There are times when it is desirable to pare down the items in a SELECT so the report user can make a quick selection based on relevant choices. Let’s review how you might accomplish that using a macro and MEDITECH’s Z.id & Z.id.lookup program.

A standard lookup on patient account from a nursing report will produce a list of patients by account number. Your nurses might want that list limited to patients with oxygen documentation. Limiting the patients in the lookup to just those with a particular intervention would trim the list considerably. You might think of this as a report running before the main report.

To get started, you need: 1) a Select Field for patient, 2) a macro to call the Z.id & Z.id.lookup procedures with your list of accounts (patients.f9.lookup), 3) a macro to build a list of accounts (patients.oxygen) & 4) a field attribute to call your lookup macro (patients.f9.lookup).

1) Open your report using NPR and define your Select Field for patient on the Sorts/Selects tab. Add a lookup for patient.

mcb0410_1

2) Define your lookup macro (patients.f9.lookup), using Enter/Edit Option 7.

mcb0410_2

mcb0410_3

mcb0410_4

3) Define the patients with oxygen intervention macro (patients.oxygen), using Enter/Edit Option 7.

mcb0410_5

mcb0410_6

mcb0410_7
4) Define the field attribute to call your lookup macro (patients.f9.lookup).

Select option 9, the NPR Edit Elements routine.

mcb0410_8

Edit the field attributes by Keying Y, then Enter. Key in your ID attribute call to the lookup macro (patients.f9.lookup).

mcb0410_9

You’ve made it this far and now you understand the mechanics of running a report for your Selection Critieria, before your main report ever runs! One thing you’ll want to keep in mind is performance, if the macros are run for complex criteria on large data structures, the F9 Lookup process will take forever.

If you have questions about this topic, get them answered at the MEDITECH Knowledge Exchange?

Thoughts? Email them to John at jsharpe@comstock-software.com.

john-sharpe

 

John Sharpe is President / NPR Consultant at Comstock Software, Inc. Learn more about NPR Report Writing at the MEDITECH NPR Report Writing Blog.

 
Copyright © 2012 Systems Personnel - "Your Partner in Healthcare Search & Consulting"
399-meditechbulletin.com and MeditechCareers.com are not affiliated with MEDITECH, Inc.