Advanced NPR Selection Screens - PowerPoint PPT Presentation

1 / 108
About This Presentation
Title:

Advanced NPR Selection Screens

Description:

The lookup program is doing more than just a plain mnemonic lookup. ... The lookup does not list entries in the standard 'mnemonic active name' layout: ... – PowerPoint PPT presentation

Number of Views:953
Avg rating:3.0/5.0
Slides: 109
Provided by: joh6165
Category:

less

Transcript and Presenter's Notes

Title: Advanced NPR Selection Screens


1
Advanced NPRSelection Screens
Presented by John Shipman, Interface
People johns_at_IPeople.com
2
Overview
  • NPR Selection screens are created by the
    translator when you file your report. You can
    easily setup the prompts and defaults for
    standard fields, and formats (FREE, INT, length,
    etc) for computed fields, but there are also ways
    to enhance the selection screens using multiple
    screens, custom lookup programs, CDS-like
    attributes to restrict entries, etc.
  • Reports can also be enhanced by displaying
    information to the user while the report runs,
    removing print prompts, enabling multi-copies to
    print together, etc.

3
Overview
  • Using Field Attributes, Line Attributes, and
    report macros we will investigate all of those
    ideas today.
  • Goal To go home and use these tools to make
    reports more user-friendly, while at the same
    time limiting problems by restricting reports to
    their specific functions. And, best of all,
    creating single, mutli-function reports instead
    of numerous versions of the same report. In turn
    making modifications simpler, faster, and
    requiring less research because all the edits
    will be one place instead of across many reports.

4
Overview
Topics for Today
  • Inputting number of copies
  • Setting up CHOICE type lookups
  • Prompting for which regions to print
  • Restricting Inputs / Error Messages to Users
  • Calling another selection screen
  • Repeating selection screens
  • Display report info while running
  • Hard coding report destinations
  • Custom lookups/bypassing a fields regular lookup
    program
  • Lookups into un-available tables (other modules)
  • Restricting report access by user settings

5
1. Inputting number of copies
  • Users should NOT need to print ADM facesheets
    repeatedly when they need three copies. Users
    printing mailing labels should be able to easily
    request 3 for each employee or account or vendor.
  • Using a simple computed field and Line Attributes
    you can set your report to print a user-input
    number of copies.

6
1. Inputting number of copies
7
1. Inputting number of copies
Add a new computed field for prompting for the
desired number of copies
8
1. Inputting number of copies
Add the calculated field to the selection screen
with the desired prompt and default value.
9
1. Inputting number of copies
Setup ECB Line Attribute on Line 1 of the Picture
Set PG to of lines per page to force FF
10
1. Inputting number of copies
Setup ECE Line Attribute to the last line of
Picture
11
1. Inputting number of copies
The report will repeat the lines between the ECB
and ECE (inclusive) until the number of copies is
surpassed in variable /COPY. When the report is
executed, the user will now be prompted for the
desired number of copies to print.
12
2. Setting up CHOICE type lookups
CHOICE type computed fields allow you to
restrict values to your own list. These can be
used to simply print what the user selected, or
for more complex purposes like giving the user a
sort choice. For this example, we will create a
CHOICE type computed field that allows the user
to select from an available list of sort field in
order to change the sort of the report at
run-time.
13
2. Setting up CHOICE type lookups
New report to list current ADM census
14
2. Setting up CHOICE type lookups
Add computed field for users to select the
desired field to sort by
Add a computed field to return the value of the
sort field, based on the selected choice
15
2. Setting up CHOICE type lookups
Add the computed field, xx.sort.choice, to the
Selects and add the computed field, xx.sort to
the sorts
16
2. Setting up CHOICE type lookups
Next, we will need to edit the Screen Elements
17
2. Setting up CHOICE type lookups
Add a line with CH and list of choices separated
by a comma (,). Do NOT use quotation marks
Note For Client Server platforms, do not use
spaces in the list of choices.
18
2. Setting up CHOICE type lookups
Run the report and hit F9 to see the list of
available choices
19
2. Setting up CHOICE type lookups
Output for LOCATION choice
20
3. Prompting for which regions to print
Ever need to make a detail and summary version of
the same report? Or wonder how to make the
headers change based on the selection? Why make
two reports. Lets take the same census report
and make the detail optional, the headers
variable, and sort totals optional also
21
3. Prompting for which regions to print
Add new computed fields
This field will be used to prompt the user for
whether the detail lines should print.
This field will be used to prompt the user for
whether the totals should print.
22
3. Prompting for which regions to print
Add new prompts to report selects
23
3. Prompting for which regions to print
Add Line Checks
24
3. Prompting for which regions to print
New Select Screen and Output
25
3. Prompting for which regions to print
New Select Screen and Output
26
3. Prompting for which regions to print
New Select Screen and Output
27
4. Restricting Inputs / Error Messages to Users
FCL attributes can be added to report writer
fields. They work basically the same way as in
Customer Defined Screen attributes. The major
difference is that you use A to refer to the
input value instead of _at_.response. (Use B
with dates to get the system value instead of the
pre-formatted date 010108 instead of
20080101.) These are very useful when you want
to prevent users for entering invalid values, or
have an LI but with restrictions.
28
4. Restricting Inputs / Error Messages to Users
FCL Attribute Setup FCLcriteria FCLAaction
to take If the criteria is true, the Action line
is executed. Example for an account number
selection field FCL1A0B FCL1A_at_W.err(B
accounts not allowed for this rpt)
29
4. Restricting Inputs / Error Messages to Users
FCL Example Lets start w/ a simple ADM
registration report by status type and date
30
4. Restricting Inputs / Error Messages to Users
Regular default selection screen
31
4. Restricting Inputs / Error Messages to Users
For this example, lets say we want to prevent
users from entering input like this
The From date is after the Thru date.
Assume this report is not setup for ER, and we
want to dis-allow out-of-order date ranges.
32
4. Restricting Inputs / Error Messages to Users
New Field Attribute for status.type
33
4. Restricting Inputs / Error Messages to Users
New field attribute for Thru date
34
4. Restricting Inputs / Error Messages to Users
The Effects
35
4. Restricting Inputs / Error Messages to Users
The Effects
36
4. Restricting Inputs / Error Messages to Users
The Effects
37
5. Calling Another Selection Screen
In the NPR report writer, you can call a second
selection screen for a report. This can be used
to prompt for additional information as
needed. To call a selection screen
manually DPM.zcus.report.S() They can be
called from Start macros, title macros, or
practically anywhere you need them.
38
5. Calling Another Selection Screen
For an example, lets go back to the patient
census report and assume it excludes confidential
and VIP patients. Lets add an option in the
selects for additional security, prompting the
user with more questions when selected
39
5. Calling Another Selection Screen
First, we will add a new prompt to the original
report asking the user if they would like to
answer the additional setup questions
New Select Screen
40
5. Calling Another Selection Screen
Add a Start macro to the original report to call
the new screen if they answer Y
41
5. Calling Another Selection Screen
Setup a new report for the 2nd Select Screen,
with a title macro call
42
5. Calling Another Selection Screen
Title macro puts a value in /Z.SCHED.LOG to
prevent a 2nd Print On box from coming up
For C/S, you would also set /Z.SUPPRES.DIALOG and
/R.NO.PRT.MSGS.
43
5. Calling Another Selection Screen
New Selects setup normally in the 2nd report
44
5. Calling Another Selection Screen
Blank Picture (not used, since this report does
not run).
45
5. Calling Another Selection Screen
Now when you run the main report
46
5. Calling Another Selection Screen
Another very good use for secondary select
screens is Patient Forms. You can setup a report
with a Print Blank Form? Y/N question, then
only pull up the patient prompts if the user is
planning on selecting a patient and printing
information. If they choose Y to the blank
form question, they never see the other
selects/questions. Using what we have so far,
you could make a patient facesheet report that
prompts for number of copies, has an option to
print blank, and only prompts for a patient if
needed.
47
6. Repeating Selection Screens
By calling selection screens ourselves, we can
also call them multiple times. Any report could
call a selection screen dozens of times if
needed. For example Lets create a Payroll
Report that is used to send notices out to
employees. The HR staff will know who they need
to contact and what message to send, but needs a
routine to print the letters with the addresses.
The routine can be used for one employee or
hundreds.
48
6. Repeating Selection Screens
  • Steps
  • Create the new report w/ output
  • Create another report w/ the selection screen
  • Create Start macro to call the screen until
    finished, saving each employees data after each
    call
  • Note Since we are not fragmenting, we can read
    and manipulate the global / variables from either
    report.

49
6. Repeating Selection Screens
The new report to send letters
50
6. Repeating Selection Screens
51
6. Repeating Selection Screens
52
6. Repeating Selection Screens
53
6. Repeating Selection Screens
Computed fields for output lines
54
6. Repeating Selection Screens
The Selection Screen report
55
6. Repeating Selection Screens
56
6. Repeating Selection Screens
57
6. Repeating Selection Screens
58
6. Repeating Selection Screens
Set the Field Attribute to NOT required for the
Text Lines
59
6. Repeating Selection Screens
Computed Fields in the Selection Screen report
60
6. Repeating Selection Screens
The Start macro
61
6. Repeating Selection Screens
The User Screen
62
7. Display report info while running
Another way to make debugging and user support
simpler is to add displays to your report. At
practically any place in your report you can add
a display. They can be added in the footnotes,
line checks, and on any line in a macro.
63
7. Display report info while running
The _at_W display functions in NPR are setup so you
can easily output information without having to
setup graphics code to build Windows and buttons,
etc.
64
7. Display report info while running
_at_W.display(lttextgt) This function will display
the text on the screen in a popup window. It
will stay on the screen until replaced by another
display command. The text is a Magic
expression it can contain hard coded text is
quotes, variables, Magic math, etc. Note In
newer releases of Meditech, the _at_W.display cannot
be placed directly into a footnote. The syntax
checker does not like it. So you have to place
it in a macro, and call the macro from the
footnote.
65
7. Display report info while running
_at_W.display() Use W.display with an argument of
nil to close the Window. It is a good idea to
always close the window/popup after using the
_at_W.display function. This avoids screen
corruption that can happen when the report
finishes.
66
7. Display report info while running
Example Let start with a BAR.PAT report that
outputs a lot of accounts. It is difficult to
judge how long it will take to run on any given
day, and users frequently are curious as to
whether or not it is stuck. To make things
easier, we will add a display that shows the
current record the account is on
67
7. Display report info while running
68
7. Display report info while running
69
7. Display report info while running
Detail macro displays the current sorts and
account number for the current processed account.
At any point during output, the run user can tell
how far the report has executed.
70
7. Display report info while running
The box below with the date, account type, and
account number will display, changing on each
detail record, until the report has completed the
last account
71
7. Display report info while running
You can also use _at_W.return in reports. It is
used the same way as _at_W.display, with the text as
an argument. The only being that _at_W.return
pauses the report at the popup and waits for the
user to press Enter to continue. This can also
be very handy in debugging, as you can stop the
report and see what a variable is set to. Unlike
W.display, the output will wait on the user
instead of flashing away as the report continues.
72
8. Hard coding report destinations
One of the best ways to prevent data from
floating around the hospital in the wrong areas
is to limit a reports print destination. Using
a title macro, you restrict a report to print to
a specified printer only. You can also have the
report macro logic decide where to print based on
the user executing the report, criteria selected,
etc.
73
8. Hard coding report destinations
MM report with pre-set printer, and no Print On
Prompt
74
8. Hard coding report destinations
Macro
Printer Number
Bypass Print On Prompt
Set Printer ourselves
Report Title
75
8. Hard coding report destinations
For C/S NPR Client Server basically works the
same way, with a title macro that sets the
printer. However the syntax for the call from
the title is slightly different, and the macro
requires additional lines. C/S title macro calls
require one set of parentheses and two extra
periods (compared to magic) _(DPM)DPM..zcus.re
port.M..macro(0)_
76
8. Hard coding report destinations
Client Server MM report with pre-set printer, and
no Print On Prompt
77
8. Hard coding report destinations
/GO setup to prevent macro from repeating steps
Set printer
Bypass prompts
Link to printer
Report title to display
78
9. Custom Lookups
Most fields in Meditech that are subscripts/keys
to dictionaries have a lookup program attached to
them. Thats why the lookup automatically works
for physician mnemonics, rooms, vendors,
etc. Those lookup programs are defined in the
data definitions for the dictionary segments. It
is possible though to override the defaults and
call a lookup program yourself.
79
9. Custom Lookups
  • Reasons you might want to call a lookup program
    yourself
  • The standard lookup box has more or less info
    displayed then you need.
  • The lookup program is doing more than just a
    plain mnemonic lookup. Examples Many GL tables
    list entries by number/mnemonic and name both,
    PHA Drug lookups sort depending on your Access
    group (by name, generic name, proc code,
    mnemonic, etc.).
  • You need to do a lookup for a computed field.

80
9. Custom Lookups
To set the lookup program yourself, use the ID
in the report Field Attributes. One of the most
used lookup programs is Z.id.non.dict.color. It
can be used on practically any table/ file.
Since it is a Z program, it can be used from
any NPR report. If the Z.id program gets too
long for the attribute box, set it up in a macro
and call the macro from the attribute. The first
one may be tricky to use, but once you have one
working, copy that for each new one and change
accordingly.
81
9. Custom Lookups
  • IDZ.id.non.dict.color(1,2,3,4,5,6)
  • Arguments
  • Name of the dictionary/table. The base of the
    segment to lookup into, preceded by a .
  • Default value. The value to start the lookup at.
    Use A to set at the user entered value from
    the prompt.
  • Column Headers for the lookup box, including
    spacing. All in one long string.
  • Display columns for the lookup records, in base
    form, A,CD the lookup segment. Also in one
    string. Surrounded by quotations. CD
    represents the subscript (mnemonic, etc.).
  • Lookup controls. Determines if active or
    inactive entries are included, and what to do for
    new entries. Leave blank / nil for a basic
    lookup.
  • Lookup header.

82
9. Custom Lookups
Example 1 Suppose we have a report field that
is looking through multiple fields to find some
sort of location information
83
9. Custom Lookups
The lookup for xx.location will not work since it
is an xx field
84
9. Custom Lookups
To setup the Custom Lookup, we will need the
Physical Base information for the MIS Location
Dictionary
85
9. Custom Lookups
Field Attribute setup to call macro
86
9. Custom Lookups
Macro to call Z.id.non.dict.color
Base for Locn Dict
Lookup Title
Detail to list on each line (1 name)
A for passed in argument
Column Headers

87
9. Custom Lookups
New Lookup
88
9. Custom Lookups
Example 2 The Pharmacy Drug dictionary (and any
pointers to it) use a lookup program that is
based on your Access settings in Pharmacy. Each
user has a default lookup, by mnemonic, trade
name, generic name, NDC , billing code , etc.
Also, users can prefix the lookup value with T/,
N, and other values to lookup by a non-default
field. The lookup does not list entries in the
standard mnemonic active name layout
89
9. Custom Lookups
We can use the Z.id program to customize the
lookup to just do a basic dictionary mnemonic
lookup
90
9. Custom Lookups
New Drug lookup by mnemonic w/ name dispense
form
91
10. Lookups into Unavailable Tables
Using title macros, printer hard coding, custom
lookups, custom field attributes, and calling our
own selection screens we can basically control
our selection screens without limits. Another
example of this functionality comes into play if
you need to do a lookup into a dictionary in
another module that is not open to your
report. Using what we have learned so far plus
the Z.link program, we can create a BAR report
that does a lookup into an ABS dictionary.
92
10. Lookups into Unavailable Tables
For this report we will be search BAR.PAT for CPT
codes. The report searches for both surgical
CPTs and charge procedure CPTs, so it needs to
be written in BAR. Since there is no lookup for
cpt.code in BAR, we will create a selection
screen in ABS for our BAR report to use. Also,
ABS has a special lookup for CPTs that displays
additional information in the lookup box so
thats even better than creating our own with the
Z.id program. Also the lookup will be familiar
to users since its the same one the ABS screens
use.
93
10. Lookups into Unavailable Tables
New report in BAR.PAT
94
10. Lookups into Unavailable Tables
Title calls program macro
95
10. Lookups into Unavailable Tables
No Selections all values are set since they are
entered in the other selection screen.
96
10. Lookups into Unavailable Tables
Macro called from report title
Only run once
No print prompts from the other selection screen
Open to ABS
Our new selection screen
Close ABS, back to BAR
Change back for the regular Print prompt
Report title
97
10. Lookups into Unavailable Tables
The Selection Screen report
This report is not actually a fragment, but named
that way to point out it belongs to another
report, and will not run by itself.
98
10. Lookups into Unavailable Tables
99
10. Lookups into Unavailable Tables
100
10. Lookups into Unavailable Tables
The result
101
10. Lookups into Unavailable Tables
The result
102
10. Lookups into Unavailable Tables
The result
103
11. Restricting report access by user settings
Another important note about report control and
customizing your field attributes Since
reports for all Meditech NPR modules are always
open to MIS, you can restrict report prompts
based on user settings.
104
11. Restricting report access by user settings
For example, in a GL.BATCH report you could
restrict users from selecting accounts for
corporation 210 unless they have main.menu GL
Access in MIS
105
11. Restricting report access by user settings
106
11. Restricting report access by user settings
You can also restrict access based on CDS queries
you add to the MIS User dictionary. So you can
create your own access levels! Ex Using this
field attribute, if the user does not have a Y
answer in the RPT.ACCESS query, they cannot
select a value. And, if the selection is
required, cannot run the report.
107
The chargemaster report
Questions??
108
The chargemaster report
Thank You! johns_at_IPeople.com www.IPeople.com www.
MyIPeople.com
Write a Comment
User Comments (0)
About PowerShow.com