All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Gayle:
Here is some info I had saved on this topic. I think JOE C or BRIAN S
answered this question, but I cannot find it right now...
I think the following should work for you:
Here are the footnotes I have used for emailing the output of a report
to MOX or Outlook (if MOX forwarded to Outlook).
AL START "ADM.PAT.zcus.mdl.send.email.test.M.print"^/R.TRANS
AL CLOSE.UP close.up.macro
--------------------------------------------------------------
Here is another AL CLOSE.UP footnote for not records found.
AL CLOSE.UP IF{/R.FOUND;%[/R.NEW.PAGE.PGM](0),N("No Records Found for
"_c.doctor)^!}
You will need to replace doctor with the name of your select field.
-------------------------------------------------------------
This is just an idea but I think it will work out:
AL CLOSE.UP IF{/R.FOUND;1^/R.FOUND^/R.PAGE.NUM,@Z.spool
1^/ZMAIL^/R.HALTED}
If the report finds records, then /R.FOUND will be set up, so there is
no action to take.
Otherwise, /R.FOUND and /R.PAGE.NUM will be set up which will fool the
system into thinking that records were in fact found and the "No Records
Found" message will NOT print.
Also, if the report is being spooled, then there will be a value for
@Z.spool. In this case, we assign a 1 to the global variable /ZMAIL
which will prevent the spool file from being placed on the index called
MIS.SPOOL.spool.group.priority.index. This index is used by the
Meditech background job to print spool files. If the spool file is NOT
on this index, then it will NOT print.
Also, we assign 1 to /R.HALTED which fools the system into thinking the
report was HALTED (as if an end-user pressed <Esc> or <F11>) so the
system will NOT bother sending the file anywhere via MOX.
I think that should work out for you. The Spool file is still created
but will NOT print and it should still purge as it normally would. I am
sure there are other options out there that will work by manipulating
other Meditech "slash" variables.
-------------------------------------------------------------
How to suppress a "No Records Found" Page
It is possible to prevent the "No Records Found" page from printing when
your report does not find any data that meets your selection.
Within the object code in any report, if data passes selection, the
number 1 is stored in a report variable /FOUND. If /FOUND is nil, that
means no data met your selection criteria. By placing the following
line of code in the footnotes tab, it will prevent this page from
printing and instead display a Text box indicating that no data was
found for your report:
AL CLOSE.UP IF{'/R.FOUND 1^/R.FRAGMENT,@W.choice("C",{"&OK"},"FORM NOT
PRINTED")}
Populating the /R.FRAGMENT variable suppresses the page and the
@W.choice macro creates the text display box.
Since you are scheduling it, I would leave off the call to the message
macro:
AL CLOSE.UP IF{'/R.FOUND 1^/R.FRAGMENT}
-------------------------------------------------------------
Subject: [MEDITECH-L] Suppress "No Records Found" from printing...
I am using the following to suppress the "No Records Found", but it
still
prints a blank page. I don't want the blank page either...
AL CLOSE.UP IF{'/R.FOUND 1^/R.FOUND^/R.PAGE.NUM}
-------------------------------------------------------------
From: "Behling, Diana" <[EMAIL PROTECTED]>
Subject: [MEDITECH-L] Magic NPR - Custom message to scope when no
records
I have a report that will usually be printed to Scope, occasionally to
View
and seldom to a printer. The report is designed to NOT display any
information if the selected patient is a confidential patient (as
defined by
some queries we have set up). When there is no data to print, I need to
have
a message display on the screen "DO NOT DISCLOSE PATIENT DATA. THIS
PATIENT
HAS OPTED OUT." I have a macro that will send this message to a
printer,
but when I print to Scope it still just says "No Records Found" and when
I
print to VIEW it prints the message correctly, but also concatenates
"Report: Patient Quick View was runoNo records found". I need to clean
up
the Scope and View messages and just get the opted out msg to print.
My Macro:
""^!,
IF{'/R.FOUND "DO NOT DISCLOSE PATIENT DATA. THIS PATIENT HAS OPTED
OUT"}^!
I know that ! sends this to the printer. What is the equivalent code for
the
scope and view?
--------------------------------------------------------------------
QUESTION:
I am using the following to suppress the "No Records Found", but it
Still prints a blank page. I don't want the blank page either...
AL CLOSE.UP IF{'/R.FOUND 1^/R.FOUND^/R.PAGE.NUM}
---------------------------------------------------------------------
ANSWER:
Shouldn't it be:
AL CLOSE.UP IF{'/R.FOUND 1^/R.FRAGMENT}
I believe if you populate /R.FOUND it will think the report writer will
think there is a record found and do a form feed.
----------------------------------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gayle Taylor
Sent: Sunday, August 27, 2006 9:04 AM
To: [EMAIL PROTECTED] com
Subject: [MEDITECH-L] no records found
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Hi,
I have gathered much information from the L on how to send a NPR to MOX.
I
have had some success with this, but I need just a little more info. I
need
the report to send a message of No Records Found to MOX
One reason that I want this report to go to MOX is that I don't want to
print it. 99% of the time the report will be "No Records Found". I
need to
have a record that the report ran and found No Records. I have the
following CLOSE.UP macro attached to the report. What do I need to do
or
add to have the report send NO Records Found or the details of the
report to
MOX?
[EMAIL PROTECTED](+/TEXT[""]);/R.HALTED;@Not(@Z.rpt.found);""^USR,
DO{+MIS.USER.c.initials[USR]^USR
%MIS.OA.MSG.auto("",{^/TEXT,USR})},""^TEMP,
DO{+/TEXT[TEMP]^TEMP ""^/TEXT[TEMP]}}
TIA
Gayle Taylor, LIS Coordinator
Sampson Regional Medical Center
607 Beaman Street-PO Drawer 260
Clinton, NC 28329
(910)592-8511 Ext 8414
This email and any files transmitted with it are confidential and
intended
solely for the use of the individual or entity to whom they are
addressed.
If you are not the intended recipient you are notified that disclosing,
copying, distributing or taking any action in reliance on the contents
of
this information is strictly prohibited. If you have received this
email in
error please notify the sender and delete the email. Please note that
any
views or opinions presented in this email are solely those of the author
and
do not necessarily represent those of Sampson Regional Medical Center.
Finally, the recipient should check this email and any attachments for
the
presence of viruses. Sampson Regional Medical Center accepts no
liability
for any damage caused by any virus transmitted by this email. Sampson
Region Medical Center - 910-592-8511
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
This footnote also confirms that this email message has been swept by Sophos
and MIMEsweeper for the presence of computer viruses.
**********************************************************************
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l