[MEDITECH-L] (Magic 5.4) Pha Rule to print NPR

285 views
Skip to first unread message

Wasielewski, Laura

unread,
Aug 30, 2006, 1:48:11 PM8/30/06
to medit...@mtusers.com
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================

Good Afternoon,
Can anyone tell me if you can print an NPR Report from a pharmacy rule
attached to a drug. I need to print a custom requisiton to Respiratory when
pharmacy orders an Inhaler med. I see where you can send an OA Message but
respiratory already has a custom requisition for something else with a grid
design on it and they want to use this for their notification of the Inhaler
drug.

Thank You
Laura Wasielewski
St Josephs Hospital
Elmira, NY
lwasie...@stjosephs.org

Confidentiality Notice: This e-mail message, including any attachments, is
for the sole use of the intended recipient(s) and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the intended recipient, please
contact the sender by reply e-mail and destroy all copies of the original
message.


_______________________________________________
meditech-l mailing list
medit...@MTUsers.com
http://mtusers.com/mailman/listinfo/meditech-l

Nielacny, Aimee - IS

unread,
Sep 5, 2006, 11:03:09 AM9/5/06
to Wasielewski, Laura, medit...@mtusers.com
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================

We don't do this with a rule but in the OE Procedure dictionary. We have
a category of MED and a procedure of INH for any inhalation MEDS for RT.


Aimee Nielacny
Senior Applications Analyst
Wheaton Franciscan Healthcare
Phone 630.588.7820
Aimee.N...@wfhc.org

Privileged/Confidential information may be contained in this message. The information contained in this message is intended only for the use of the recipient(s) named above and their co-workers who are working on the same matter. The recipient of this information is prohibited from disclosing the information to any other party unless this disclosure has been authorized in advance.

If you are not intended recipient of this message or any agent responsible for delivery of the message to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of this message is strictly prohibited. You should immediately destroy this message and kindly notify the sender by reply E-Mail. Please advise immediately if you or your employer does not consent to Internet E-Mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of the firm shall be understood as neither given nor endorsed by it.

Maxwell Becky

unread,
Sep 7, 2006, 10:30:53 AM9/7/06
to Nielacny, Aimee - IS, Wasielewski, Laura, medit...@mtusers.com
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================

You need to write a rule, in pharmacy dictionary, but you have to write
it in npr. The npr rule overrides the pharmacy rule. This rule in npr
picks up med by route for us "rt". I attached to to the pharmacy
customer defined parameters. Hope this helps a little, not real good at
this but it is working for us.

Ex rule in pharmacy:

Mnemonic BEC1 Last Edited by
Date 09/27/1980-0856
Active? Y Print On Order
History
Description RT RULE BEEN EDITED Print From PCI
N
Data Flds from RX POM Enabled?
N
Eval Stock Meds Evaluate at
FILE

"The RT rule has been edited. Please contact Becky."^XXX,
IF{[f rx ord type]="RT" [f rx err msg](XXX)},
[f rx ok];

Then go to npr, PHA.RX.zcus.rx.rule. Go to macro/enter/edit and look up
your rule. Then attach the following. Changing location and printers

;program 20060202 1509 GPHARJM
;
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^?;^/}^q,
@Chg.prefix(PHA.RX,?,[q]),
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^:;^/}^c,
@Chg.prefix(PHA.RX,:,[c]),
/patient^patient,/urn^urn,
/PHA.REF.urn^PHA.REF.urn,/med^med,@t.med.rule^med.rule,/txn.date^txn.dat
e,/txn.q^txn.q,
;"The RT rule has been edited. Please contact Becky."^XXX,
;IF{@PHA.RX.order.type="RT" %PHA.U.keyword.msg(2,XXX)},
"=":80^/DIVIDER,
"R E S P I R A T O R Y M E D I C A T I O N O R D E R"^/HEADER,
/DIVIDER^/XXX[1],
/HEADER:80C^/XXX[2],
/DIVIDER^/XXX[3],
" "^/XXX[4],
" "^/XXX[5],
("ACCOUNT NUMBER: "_...@MIS.PAT.acct.number):49L^ACCT,
"UNIT NUMBER: "_...@MIS.PAT.unit.number^UNIT,
ACCT_UNIT^/XXX[6],
("PATIENT NAME: "_@MIS.PAT.name):49L^NAME,
"DOB: "_%Z.date.out(@MIS.PAT.birthdate)^DOB,
NAME_DOB^/XXX[7],
"LOCATION: "_...@MIS.PAT.location^LOCA,
@MIS.PAT.room.and.bed^ROOM,
LOCA_" "_"("_ROOM_")"^/XXX[8],
"-":80^/XXX[9],
"MEDICATION: "_@med's.name^/XXX[10],
"DOSE: "_...@dose.and.unit^/XXX[11],
"START DATE: "_%Z.date.out(@PHA.RX.start.date)^/XXX[12],
"ROUTE: "_...@PHA.RX.route's.name^/XXX[13],
"SIG: "_...@sig.and.sch^/XXX[14],
" "^/XXX[15],
"DOSE INSTRUCTIONS: "_...@dose.instruction[1]^/XXX[16],
" "_...@dose.instruction[2]^/XXX[17],
" "_...@dose.instruction[3]^/XXX[18],
" "^/XXX[19],
"COMMENTS: "_...@label.comment[1]^/XXX[20],
" "_...@label.comment[2]^/XXX[21],
" "_...@label.comment[3]^/XXX[22],
" "_...@label.comment[4]^/XXX[23],
" "_...@label.comment[5]^/XXX[24],
IF{@order.type="RT"
IF{@MIS.LOCN.DICT.zcus.campus[@MIS.PAT.location]="WM" %MIS.OA.MSG.auto(
%MIS.OA.MSG.auto("",Q(^/XXX,"!YKRH092P10"))X}},
1;

Bill Mullins

unread,
Sep 6, 2006, 7:50:20 PM9/6/06
to Wasielewski, Laura, medit...@mtusers.com
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================

Yes, you can send a custom report, a MIS Notification, an OA MSG and a
custom OA MSG from a rule.

Remember that when you build a PHA rule, it creates a macro you can edit
in report PHA.RX.zcus.rx.rule (SEE A PARTIAL LIST OF OUR MACROS BELOW)

Macro

1) acetadote1
2) acetadote2
3) acetadote3
4) acetdote
5) agelt2
6) alert
7) aptt.level
8) bolus
9) buffer
10) callbefore
11) callonc
12) callonc2
13) cancel
14) caudill
15) cerebyx
16) chemo
17) colch
18) colchicine
19) conc
20) coumadin
21) crcl
22) crcl.acycl
23) crcl.adja
----------------------------------------------------------------
Subject: RE: Triggering Reports to print from a PHA RULE

Leslie,

Mike McEldowney the IS Director at Delta Regional Medical Center has
posted
this information on their website click the link below to get there. He
has
included the step-by step instructions, screen prints as well as a
sample
report.

http://www.deltaregional.com/isnprfromrule.php

-----------------------------------------------------------------
Here is a rule that I have, with the help of Susan Makara, that prints a
message to Respiratory Therapy notifing them that an order has been
placed on a patient for an inhaler. It usually doesn't work to cut and
paste the macro, you'll need to type it in. You'll also need to change
the field for the facility. Questions, let me know.

Bob Koch
Clinical Systems Analyst
Affinity Health System
Appleton, WI
920-831-8556
mailto:bk...@affinityhealth.org

Rule in PHA Rule dictionary:

;This rule will print a message on a printer in RT to notify them that
;an inhaler was ordered on an IP
"An Inhaler was ordered on this patient on _DAY, Please follow
up."^CMT1,
IF{[f pt facility]'=".";
IF{[f pt status]'="ADM IN" [f rx ok];
[f rx start date]^DAY,
[f rx med]^MED,
"An inhaler was ordered on this patient on "_DAY^CMT1,
"Please follow up."^CMT2;1}},1;

Here is the Macro in PHA.RX:

;program 20030913 1353 BKOCH


;
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^?;^/}^q,
@Chg.prefix(PHA.RX,?,[q]),
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^:;^/}^c,
@Chg.prefix(PHA.RX,:,[c]),
/patient^patient,/urn^urn,
/PHA.REF.urn^PHA.REF.urn,/med^med,@t.med.rule^med.rule,/txn.date^txn.dat
e,/t
xn.q^txn.q,

"An Inhaler was ordered on this patient on _DAY, Please follow
up."^CMT1,
IF{@MIS.PAT.facility.val'=".";
IF{@MIS.PAT.status'="ADM IN" 1;
%Z.date.out(@PHA.RX.start.date)^DAY,
med^MED,
"An inhaler was ordered on this patient on "_DAY^CMT1,
"Please follow up."^CMT2,
"Patient:"_@PHA.PAT.name[patient]^/XXX[LINE+1^LINE],
"Patient Age/Sex:"_...@PHA.PAT.age.sex[patient]^/XXX[LINE+1^LINE],
"Account#:"_...@PHA.PAT.acct.number[patient]^/XXX[LINE+1^LINE],
"Reason for Visit:"_...@ADM.PAT.reason.for.visit^/XXX[LINE+1^LINE],
"Location:"_...@PHA.PAT.room.bed[patient]^/XXX[LINE+1^LINE],
"Medication:"_...@PHA.RX.med[urn]^/XXX[LINE+1^LINE],
"Directions:"_...@PHA.RX.sig's.description^/XXX[LINE+1^LINE],
"Comments:"_...@PHA.RX.dose.instruction[1]^/XXX[LINE+1^LINE],
"Comments:"_...@PHA.RX.dose.instruction[2]^/XXX[LINE+1^LINE],
"Comments:"_...@PHA.RX.label.comment[1]^/XXX[LINE+1^LINE],
"Comments:"_...@PHA.RX.label.comment[2]^/XXX[LINE+1^LINE],
CMT1^/XXX[LINE+1^LINE],
CMT2^/XXX[LINE+1^LINE],
""^/XXX[LINE+1^LINE],
^/XXX^ARG|0,
"!MM.HOSCDR.L3"^ARG|1,
%MIS.OA.MSG.auto("",ARG)X,
1}},1;
------------------------------------------------------------------------
----
OA MSG RULE WHEN MED IS ORDERED FOR RT:

From: JCur...@hahc-hmc.com
Sent: 9/17/2003 11:48:46 AM
To: Gary Coleman
Subject: Re: [Meditech-L] pha rule to print notice/report at specific
printer

1. Set up a rule, just a dummy.
2. Tweak the macro. See below for how they are named.
3. Set up an OA Message. The OA message contains destination (and
content, if desired.) This example builds its own content.

John

The rule:

Mnemonic JC.NEB Print On Order
Active? Y Print From PCI N
Description OA MSG TO RT WHEN NEB/INH RX
Data Flds from RX Evaluate at
FILE
Edit Rule?
;Prints oa message when a rx with route of INH or NEB is ordered.
"Rule PHA.JC.NEB has been refiled and will not operate. Contact
I.S."
^MSG,
[f rx msg](MSG),
[f rx ok];


The Macro:
Enter/Edit Macro Logic: PHA.RX.zcus.rx.rule.M.jc.neb
(A: )

;program 20030321 1352 jcurtiss
;
IF{/RULE.EVAL="REFILL" ^?;^/}^q,
@Chg.prefix(PHA.RX,?,[q]),
IF{/RULE.EVAL="REFILL" ^:;^/}^c,


@Chg.prefix(PHA.RX,:,[c]),
/patient^patient,/urn^urn,

@PHA.RX.route^ROUTE,
/PHA.REF.urn^PHA.REF.urn,/med^med,
@t.med.rule^med.rule,/txn.date^txn.date,/txn.q^txn.q,
@PHA.DRUG.generic_" has been ordered for "_...@MIS.PAT.acct.number_",
"^MSG1,
MS...@MIS.PAT.name^MSG1,
"Please ensure proper billing for nebulizer"^MSG2,
IF{((ROUTE="NEB")!(ROUTE="INH")) %PHA.RX.zcus.jc.oa.msg.M.neb
("PHA","RT.NEB",MSG1,MSG2)},
1;
--------------------------------------------------------------------
Here is a Pha rule that will print a message to a printer that you
designate. You would attach
this rule to the med or meds that you want in the Pha dictionaries.

This is the Pha rule built in Pha:

;This rule will print a message on a printer in FNS at MMC to notify
them
that
;a patient is on a med that could cause a reaction with grapefruit juice
"This patient may be on meds that might cause a Drug/Nutrient"^CMT1,
"interaction. Please avoid Grapefruit Juice."^CMT2,
IF{[f pt facility]'=".";
IF{[f pt status]'="ADM IN" [f rx ok];
[f rx start date]^DAY,
[f rx med]^MED,
"This patient may be on meds that might cause a Drug/Nutrient"^CMT1,
"interaction. Please avoid Grapefruit Juice."^CMT2;1}},1;

This is the macro in PHA.RX.zcus.rx.library:

;program 20040714 1337 BKOCH


;
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^?;^/}^q,
@Chg.prefix(PHA.RX,?,[q]),
IF{/RULE.EVAL="REFILL"!(/RULE.EVAL="TXN") ^:;^/}^c,
@Chg.prefix(PHA.RX,:,[c]),
/patient^patient,/urn^urn,
/PHA.REF.urn^PHA.REF.urn,/med^med,@t.med.rule^med.rule,/txn.date^txn.dat
e,/t
xn.q^txn.q,

"This patient may be on meds that might cause a Drug/Nutrient"^CMT1,
"interaction. Please avoid Grapefruit Juice."^CMT2,
IF{@MIS.PAT.facility.val'=".";
IF{@MIS.PAT.status'="ADM IN" 1;
%Z.date.out(@PHA.RX.start.date)^DAY,
med^MED,
"This patient may be on meds that might cause a
Drug/Nutrient"^CMT1,
"interaction. Please avoid Grapefruit Juice."^CMT2,
"Patient:"_@PHA.PAT.name[patient]^/XXX[LINE+1^LINE],
"Location:"_...@PHA.PAT.room.bed[patient]^/XXX[LINE+1^LINE],
"Medication:"_...@PHA.RX.med's.generic.name^/XXX[LINE+1^LINE],
CMT1^/XXX[LINE+1^LINE],
CMT2^/XXX[LINE+1^LINE],
""^/XXX[LINE+1^LINE],
^/XXX^ARG|0,

"!MM.HOSFNS.L2"^ARG|1,
%MIS.OA.MSG.auto("",ARG)X,
1}},1;

You would need to change the patients facility (ours is a . for one of
our
hospitals) and the printer (the one listed in the macro is
MM.HOSFNS.L2).
This is being done as an OA message through Pharmacy. Questions, let me
know. Good luck.
------------------------------------------------------------------
Mnemonic REMICAD
Active? Y
Description REMICADE WARNING VIA OA MESSAG Print From PCI


N
Data Flds from RX POM Enabled?
N

Eval Stock Meds Evaluate at MED


[f pt location]="3-M"^A,
[f pt location]="SDC-3M"^AA,
[f pt location]="2-OB"^B,
[f pt location]="3CCU"^C,
[f pt location]="SDC-ICU"^CC,
[f pt location]="4-M"^D,
[f pt location]="SCD-4M"^DD,
[f pt location]="5-M"^E,
[f pt location]="SDC-5FL"^EE,
[f pt location]="6TH FLOOR"^F,
[f pt location]="SDC-6FL"^FF,
[f pt location]="CCU 6TH"^G,
[f pt location]="SNUR"^I,
[f pt location]="NUR"^II,
[f pt location]="RNUR"^III,
[f pt location]="ONC"^J,
[f pt location]="SDC IN"^JJ,
IF{(A)!(AA) [f z.remicade.3rd]&[f rx msg]("Order Msg sent to 3MAIN
printer");
IF{(B) [f z.remicade.ob]&[f rx msg]("Order Msg sent to 2-OB printer");
IF{(C)!(CC) [f z.remicade.3ccu]&[f rx msg]("Order Msg sent to 3CCU
printer");
IF{(D)!(DD) [f z.remicade.4th]&[f rx msg]("Order Msg sent to TJC
printer");
IF{(E)!(EE) [f z.remicade.5th]&[f rx msg]("Order Msg sent to 5MAIN
printer");
IF{(F)!(FF) [f z.remicade.6th]&[f rx msg]("Order Msg sent to 6MAIN
printer");
IF{(G) [f z.remicade.6ccu]&[f rx msg]("Order Msg sent to 6CCU printer");
IF{(I)!(II) [f z.remicade.nur]&[f rx msg]("Order Msg sent to NUR
printer");
IF{(III) [f z.remicade.nur]&[f rx msg]("Order Msg sent to NUR printer");
IF{(J)!(JJ) [f z.remicade.onc]&[f rx msg]("Order Msg sent to ONC
printer");
[f rx ok]}}}}}}}}}};

--------------------------------------------------------------------
MIS NOTIFCATIONS:

Notification Rule - Examples

This rule will notify RT of a new order by displaying (digital pager or
report
printer):
{{ Patient Name - Patient Location - "New Med Order:" - Generic Name }}

RTORDTYPE Y RT ORDER TYPE RX MED

"Must re-enter with RT as Order Type !"^X,
IF{[f rx ord type]="TKM" [f rx ok];[f rx ord type]'="RT" [f rx err
msg](X);
-----------------------------------------------------------------------
RT3 Y RT - NEW ORDER NOTIFICATION RX FILE

IF{[f txn type]'="I" [f rx ok]},
"RT will be notified via Clinical Alert of new order."^XX,
"RT"^CA,
[f pt name]^P,
[f pt location]^PL,
[f zcus.generic.name]^GN,
IF{[f pt location]="PICU" [f rx ok];
[f pt location]="6TCU" [f rx ok];
[f pt notification](CA,"H",P_"-"_PL_" :New MED Order: "_GN);
[f rx msg](XX);[f rx ok]};
------------------------------------------------------------------------
--
JOE C AT IATRICS

Best method is to create a PHA custom field,
attach call to PHA.RX macro written with R/W and
use %MIS.OA.MSG.auto() to send.

If you use "!"_PRINTER rather than a user mnemonic, MT will print this
from the bkg to the device.

Search our archives for MIS.OA.MSG.auto for details.
------------------------------------------------------------------------
--
We are using a PHA rule to notify the coders whenever Xigris is ordered.
The rule simply calls a custom keyword. The custom keyword loads a
message
Into a / variable and calls the MIS.OA.MSG.auto program to send it to a
MOX
Box or printer.
========================================================================
Rule

Mnemonic XIGRIS Print On Order
Active? Y Print From PCI N
Description XIGRIS NOTIFICATION EMAIL
Data Flds from RX Evaluate at FILE
Eval Stock Meds N

Edit Rule?
IF{[f z.xigris] 1},
[f rx ok];
========================================================================
Custom Keyword

Function RX Name RX

Mnemonic z.xigris
Active? Y
Name Xigris Notification Email
Multiple Output Lines? N Special Flag Value
Minimum Output Length 1
Maximum Output Length 1
Number of Arguments 0
Execute at Translation? N

Edit Code?
%Z.date.out(/.DAT)_" - "_@.now^/Z.MSG[1],
"Xigris has been ordered on "_:AA[/["aa"]]|1_" -
"_:AA[/["aa"]]|0^/Z.MSG[2],
" "_:AA[/["aa"]]|12_" "_:AA[/["aa"]]|10_"
"_:AA[/["aa"]]|11^/Z.MSG[3],
Q(^/Z.MSG,"ISTJT","!CODER")^ARG,
%MIS.OA.MSG.auto("",ARG)X,
========================================================================
This sends an email to user ISTJT and printers on printer CODER. Note
then ! in front of the printer mnemonic. The message contains the
current date and time, some free text, patient's name, account number,
location, room, and bed. I've used the physical address for the data
fields but
@PHA.PAT.name, etc. might also work.
------------------------------------------------------------------------
-
You could also attach a cds to these RT meds and using an attribute
-print a custom report from the query response, we do this in other apps
all the time.

I am sure there are other methods of doing this.

**********************************************************************
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.
**********************************************************************

Herb Bromenshenkel

unread,
Sep 11, 2006, 12:34:01 PM9/11/06
to Bill Mullins, Wasielewski, Laura, medit...@mtusers.com
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================

Bill and others: The below examples are great.

HOWEVER.... I'm trying to send to a THERMAL printer.
Any ideas for sending to a thermal printer?


Herb

Herb Bromenshenkel RPh/Clinical Analyst
1300 Anne Street NW
Bemidji, MN 55601
Voice: 218-333-5527
Fax: 218-333-5889
hbromen...@nchs.com

Nielacny, Aimee

unread,
Jan 14, 2008, 2:25:15 PM1/14/08
to Maxwell Becky, Wasielewski, Laura, medit...@mtusers.com
We have the rule in Pharmacy that sends the npr to repsiratory. Is there
a way to tweak this to print if the med is dc or cancelled?

Thanks,


Aimee Nielacny
Senior Applications Analyst
Wheaton Franciscan Healthcare

Phone 630.909-7803
Aimee.N...@wfhc.org

m...@rphinformatics.com

unread,
Jan 15, 2008, 10:13:14 AM1/15/08
to Nielacny, Aimee, Maxwell Becky, Wasielewski, Laura, medit...@mtusers.com
Hi Aimee-
Someone recently mentioned MIS Notifications to accomplish tasks such as
this - I suppose if the DC or CAN is done in PHA and you were to have a
"global" PHA rule that evaluates at FILE, you can get the results you're
looking for. Likewise, a POM enabled rule to catch POM usage...

Kevin.



Kevin McConnell, PharmD.
Clinical Consultant
(713)480-6810
ke...@RPhInformatics.com

www.RPhInformatics.com


-----Original Message-----
From: meditech-...@mtusers.com [mailto:meditech-...@mtusers.com]

Reply all
Reply to author
Forward
0 new messages