How often do you need to go change something about "the census report" only to go into Process Reports and see the following in your lookup:
Most of you know that you can get out of Process Reports, and then go over to #57 "List Report Usage" on the customization menu:
It isn’t terribly convenient to go over to this other option, and then deal with the never wanted BEGINNING/END defaults that MEDITECH application programmers like to include in standard reports:
We can delete out the BEGINNING and type in the first of our list of suspects, then delete out the END and put in the last of our list (assuming no squirrels have run past our office window, causing distraction and loss of report internal name from short term memory).
For the MAGIC platform, we can create a report in NPR.REP that can go on an NPR "hot key" menu and automatically use the last DPM and last procedure from the temporary file to provide an much more convenient activity list.
We write our NPR report in the usage log segment:
We can take advantage of the "spacebar – return" feature of Process Reports on the MAGIC platform, where the last DPM and the last procedure edited are kept in /.SV.DPM and /.SV.PROC respectively.
We set up selections on Page 2 for a report range:
Then we can use the "Edit Elements" routine to add custom defaults.
For the start of the default range, we use this:
Note that unlike for CDS default attributes, you use DFT2 (not DFT).
For the end of the range we add a "zzz" to the procedure, and loop backward 1x on the procedure global to be likely to get all the copies of the report without having to type our own range.
If we go to our hot key menu while editing "ADM.PAT.zcus.is.census.report"," we get the following default range of reports:
We build a simple report to list the title and procedure urn in a header and the saved activity in the detail line. We need to use two computed fields to deal with the fact that the run.time field is an "S(0)" time stamp, holding the number of seconds since March 1, 1980. To change this into a date, we use the Z program %Z.date.in.magic(run.time) in a "DATE” type computed field:
You might wonder why there is no @ sign on the field @run.time. You can actually write it either way, since it is a subscript of the report activity segment, @run.time and run.time (with no @ sign) translate to exactly the same local variable.
For an HHMM (time) field from the S(0) run.time value, we use %Z.time.out(run.time):
The @run.user and @run.dir are just fields and we can use the possessive @run.user’s.name also.
When we run the report for the default range, we can see that the ADM.PAT.zcus.is.census.report2 is the current version:
The NPR.REP.zcus.is.hot.key.report has been uploaded to our MAGIC report library. Unfortunately, Client/Server does not have "hot key" menus and does not have the "spacebar return" recall feature. You can launch a new MEDITECH session from the session management button, but managing to peek back at the original session and figure out which report was being processed is just too hard, sorry!