Pharmacy Rules image

Pharmacy Rules

MEDITECH Pharmacy Rule Information - No Warranty is Expressed or Implied with the accuracy of the below data. Some of these rules were only in testing phase and never completed. Some were written years ago and no longer would write them the same way, but have not had time to change them to more efficient expressions.

Pharmacy Rules Details

MNEMONIC DESCRIPTION DATA FIELDS EVALUATE AT
15KG FLAG TO WARN OF PATIENT'S<=15k RX DOSE

;This rule flags user to notify floor about heparin flush 10u/ml
"CHECK WT, IF<= 15kg, use heparin flush 10 u/ml. - ALERT FLOOR!"^A,
"PT is < 15kg, use heparin flush 10u/ml! - ALERT FLOOR!"^B,
IF{[f pt status]'="ADM IN" [f rx ok];
IF{[f pt oe wt kgs]^WT_.=.&([f pt adm/ser age]'>5) [f rx msg](A);
IF{[f pt oe wt kgs]'>15 [f rx msg](B);[f rx ok]}}};

ADBW Ideal BW/ABW- CRCL calc CALC  

[f pt sex]^SX_.=.,
[f pt oe ht cm]^HT_.=.,
[f pt oe wt kgs]^WT_.=.,
IF{SX="M" 50;45.5}^S,
IF{SX="M" 1;0.85}^F,
S+(2.3*((HT/2.54)-60)!0)^IBW_.=.,
IF{[f pt oe wt kgs]>1 IBW*1.2}^ADBW_.=.,
IF{[f pt oe wt kgs]<IBW [f pt oe wt kgs]^IBW_.=.},
IF{[f pt oe wt kgs]>ADBW ([f pt oe wt kgs]-IBW)^OW},
IF{OW'<0 (OW*0.4)^OWC_.=.},
IF{OW'<0 (OWC+IBW)^IBW_.=.},
IBW^ADBW;

CRCL EST. CREATININE CLEARANCE CALC  

IF{IF{[f rx last ver result]("CR")^SRCR_.=.;
[f pt sex]^SX_.=.;
[f pt oe ht cm]^HT_.=.;
[f pt oe wt kgs]^WT_.=.;
[f pt cur age]^AGE_.=.} " Unable to calculate Creatinine Clearance. "^X,
[f rx msg](X)," ";
IF{SX="M" 50;45.5}^S,
IF{SX="M" 1;0.85}^F,
IF{SRCR<0.8 0.8^SRCR},
S+(2.3*((HT/2.54)-60)!0)^IBW,
IF{[f pt oe wt kgs]<IBW [f pt oe wt kgs]^IBW},
140-AGE*IBW/(72*SRCR)*F}^CRCL;

CRCL.ACYCL ACYCLOVIR DOSE BASED ON CRCL RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;acyclovir specific
; A>=50, B= 25-50, C=10-25, D= <10, Z= ESTIMATED CR CL
"100% usual dose (5mg/kg/dose) q8h - infused over 1 hour"^A,
"100% usual dose (5mg/kg/dose) q12h - infused over 1 hour"^B,
"100% usual dose (5mg/kg/dose) q24h - infused over 1 hour"^C,
"50% usual dose (5mg/kg/dose) q24h - infused over 1 hour"^D,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](D);
(25.4'<CRCL&(CRCL'<10.5)) [f rx msg](C);
(49.4'<CRCL&(CRCL'<25.5)) [f rx msg](B);
49.5'>CRCL [f rx msg](A);[f rx ok]}}};

CRCL.ADJA EST. CRCL c ADJUSTED WT CALC  

;THIS CALUCATES AN ESTIMATED CRCL BASED ON AN ADJUSTED BODY WEIGHT. NOTE,
; THIS HAS BEEN MODIFED FROM CRCL.ADJW (THE MESSAGE "UNABLE TO CAC.. HAS BEEN
;REMOVED. I LEFT IT IN THE RULE, BUT DID NOT REFERENCE IT. IN THE LINE UNDER
; THE MESSAGE, I REPLACED THE MESSAGE PROMPT WITH ""
IF{IF{[f rx last ver result]("CR")^SRCR_.=.;
[f pt sex]^SX_.=.;
[f pt oe ht cm]^HT_.=.;
[f pt oe wt kgs]^WT_.=.;
[f pt cur age]^AGE_.=.} " Unable to calculate Creatinine Clearance. "^X,
" "," ";
IF{SX="M" 50;45.5}^S,
IF{SX="M" 1;0.85}^F,
IF{SRCR<0.8 0.8^SRCR},
S+(2.3*((HT/2.54)-60)!0)^IBW_.=.,
IF{[f pt oe wt kgs]>1 IBW*1.2}^ADBW_.=.,
IF{[f pt oe wt kgs]<IBW [f pt oe wt kgs]^IBW_.=.},
IF{[f pt oe wt kgs]>ADBW ([f pt oe wt kgs]-IBW)^OW},
IF{OW'<0 (OW*0.4)^OWC_.=.},
IF{OW'<0 (OWC+IBW)^IBW_.=.},
140-AGE*IBW/(72*SRCR)*F}^CRCL.ADJW;

CRCL.ADJW EST. CRCL c ADJUSTED WT CALC  

;This formula calculates the estimated creatinine clearance. If it is missing
;data, it flags the user to that effect "unable to calculate.."
;am not using with the atbxs because I did not want a double flag, am using
;CRCL.ADJA (ADJUSTED WT CR CL- WITHOUT THE MESSAGE. IF DATA NOT THERE, IT JUST
;shows a blank figure for cr cl.
IF{IF{[f rx last ver result]("CR")^SRCR_.=.;
[f pt sex]^SX_.=.;
[f pt oe ht cm]^HT_.=.;
[f pt oe wt kgs]^WT_.=.;
[f pt cur age]^AGE_.=.} " Unable to calculate Creatinine Clearance. "^X,
[f rx msg](X)," ";
IF{SX="M" 50;45.5}^S,
IF{SX="M" 1;0.85}^F,
IF{SRCR<0.8 0.8^SRCR},
S+(2.3*((HT/2.54)-60)!0)^IBW_.=.,
IF{[f pt oe wt kgs]>1 IBW*1.2}^ADBW_.=.,
IF{[f pt oe wt kgs]<IBW [f pt oe wt kgs]^IBW_.=.},
IF{[f pt oe wt kgs]>ADBW ([f pt oe wt kgs]-IBW)^OW},
IF{OW'<0 (OW*0.4)^OWC_.=.},
IF{OW'<0 (OWC+IBW)^IBW_.=.},
140-AGE*IBW/(72*SRCR)*F}^CRCL.ADJW;

CRCL.AMPIC AMPICILLIN IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;AMPICILLIN specific
; N=Normal dose: 250mg - 2 g q6h
;A>=50, B= 10-50, C=<10
"250mg - 2g/dose q6h"^A,
"250mg - 2g/dose q6-12h"^B,
"250mg - 2g/dose q12-24h"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(50.4'<CRCL&(CRCL'<10.5)) [f rx msg](B);
50.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.AZTRE AZTREONAM IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; AZTREONAM specific
; N=Normal dose: 1 - 2G q8-12h
;A>=50, B= 10-30, C=<10
"Decrease dose by 50% after inital loading dose of 1 or 2 g"^B,
"Usual loading dose, followed by a maintenace dose of 1/4 loading dose"^C,
""^A,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(30.4'<CRCL&(CRCL'<10.5)) [f rx msg](B);
30.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.CEFAZ CEFAZOLIN DOSE BASED ON CRCL RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;CEFAZOLIN specific
; A>=55, B= 35-54, C=11-34, D= <10, W= ESTIMATED CR CL
"Full dose"^A,
"REC. DOSE: Full dose with at least 8 hr intervals."^B,
"REC. DOSE: 1/2 usual dose with 12 hour intervals"^C,
"REC. DOSE: 1/2 usual dose q18 - 24h"^D,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](D);
(34.5'<CRCL&(CRCL'<10.5)) [f rx msg](C);
(54.4'<CRCL&(CRCL'<34.5)) [f rx msg](B);
54.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.CEFOT CEFOTAXIME IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; CEFOTAXIME specific
; N=Normal dose: 1 - 2G q8-12h
;C=<20
"CrCl < 20, Decrease dose by 50%"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(20.4'<CRCL&(CRCL'<0)) [f rx msg](C);[f rx ok];[f rx ok]}}};

CRCL.CEFTA CEFTAZIDIME DOSE BASED ON CRCL RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;CEFTAZIDIME specific
; A=50-31, B= 30-16, C=15-6, D= <5,
"REC. DOSE: 1G Q12h for CrCl between 31-50 ml/min"^A,
"REC. DOSE: 1G q24h for CrCl between 30 - 16 ml/min"^B,
"REC. DOSE: 500 q24h mg for CrCl between 15 - 6 ml/min"^C,
"REC. DOSE: 500 mg q48h for CrCl <5 "^D,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(5.4'<CRCL&(CRCL'<0)) [f rx msg](D);
(15.4'<CRCL&(CRCL'<5.5)) [f rx msg](C);
(30.4'<CRCL&(CRCL'<15.5)) [f rx msg](B);
(50.4'<CRCL&(CRCL'<30.5)) [f rx msg](A);
50.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.CEFUR CEFUROXIME IV GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;CEFUROXIME specific
; N=Normal dose: 1 - 2G q8-12h
;A>=20, B= 10-20, C=<10
"REC. DOSE: 750 mg q12h for CrCl between 10 -20 ml/min "^B,
"REC. DOSE: 750 MG Q24h for CrCl < 10 ml/min "^C,
""^A,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(20.4'<CRCL&(CRCL'<10.5)) [f rx msg](B);
20.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.CHLOR CHLORAMPHENICOL IV DOSE INFO RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; CHLORAMPHENICOL SPECIFIC
; N=Normal dose: 12.5 MG/KG Q6H
;C=<30 (30 WAS ARBITRARY NUMBER
"Normal dose: 12.5 mg/kg q6h, may be used, MNF rec. frequent serum levels"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(30.4'<CRCL&(CRCL'<0)) [f rx msg](C);[f rx ok];[f rx ok]}}};

CRCL.CIPRO CIPRO IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; CIPROFLOXACIN specific
; N=Normal dose: 400MG IV Q12H
;C=<29
"REC DOSE: 200 - 400 mg iv q 18 - 24 hrs for CrCl <30ml/min"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(30.4'<CRCL&(CRCL'<0)) [f rx msg](C);[f rx ok];[f rx ok]}}};

CRCL.COTRI COTRIMOXAZOLE IV GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;COTRIMOXAZOLE specific
; N=Normal dose: 15-20 mg/kg/day (based on trimethoprim component
;A>=30, B= 15-30, C=<15
"Rec dose: 1/2 stand. regimen for pateints with CrCL between 15-30ml/min"^B,
"DRUG IS NOT RECOMMENED FOR PATIENTS WITH CrCl < 15 ml/min "^C,
"Standard dose: 15-20 mg/kg/day (based on trimethoprim component (16mg/ml)"^A,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(15.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(30.4'<CRCL&(CRCL'<15.5)) [f rx msg](B)&[f rx msg](A);
30.5'>CRCL [f rx msg](A);[f rx ok]}}};

CRCL.DOXYC DOXYCYCLINE IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;doxyclycline specific
"Manufacturer doesn't recommend an change in normal dosing for Renal Failure"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.ERYTH ERYTHROMYCI IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; ERYTHROMYCIN specific
"CrCl < 10, Bennett recommeneds 50-75% of Normal Dose"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(9.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.FAMOT FAMOTIDINE IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;famotidine specific
"Est. CrCL <10, Recommended dose:20 mg IV Q12h"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.FLUCO FLUCONAZOLE IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; FLUCONAZOLE specific
"After loading dose (50-400mg), 50% of normal dose"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(50.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.LEVOF LEVOFLOXACIN - IV DOSING REC RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;LEVOFLOXACIN specific
; A>=80, B= 50-80, C=20-49, D= <20, Z= ESTIMATED CR CL
"Full dose"^A,
"CrCl 50-80= Load 500mg, then 250 mg q24h-Unless UTI,then 250mg q24h,No Load"^B,
"CrCl 20-49= Load 500mg, then 250 mg q24h-Unless UTI,then 250mg q48h,No Load"^C,
"CrCl <20 Load 500mg, then 250 mg q24h-Unless UTI,then 250mg q24h,No Load"^D,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(19.4.4'<CRCL&(CRCL'<0)) [f rx msg](D);
(49.4'<CRCL&(CRCL'<19.5)) [f rx msg](C);
(80.4'<CRCL&(CRCL'<49.5)) [f rx msg](B);[f rx ok]}}};

CRCL.METRO METRONIDAZOLE IV DOSE REC. RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; METRONIDAZOLE specific
"CrCl<10, 50% of normal dose at usual intervals"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.NAFCI NAFCILLIN IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; NAFCILLIN specific
"Dose reduction not necessary unless patient also has hepatic dysfunction"^B,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(25.4'<CRCL&(CRCL'<0)) [f rx msg](B);[f rx ok]}}};

CRCL.PENIC PENICILLING IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; PENICILLIN G specific
"CrCL 10 - 50ml/min - Recommeneded dose: 75% of (standard dose)"^B,
"CrCl < 10, Recommended dose: 20-50% of (standard dose)"^C,
""^A,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(9.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(50.4'<CRCL&(CRCL'<9.5)) [f rx msg](B);[f rx ok]}}};

CRCL.PIPER PIPERCILLIN IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;PIPERCILLIN specific
; N=Normal dose: 250mg - 2 g q6h
"CrCl < 50, Recommended interval = Q6-8 HOURS"^A,
"CrCl = 20 - 40 ml/min, Recommended dose: 4g Q8H"^B,
"CrCl <20, Recommended dose: 4 g Q12H"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(20.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(40.4'<CRCL&(CRCL'<20.5)) [f rx msg](B);
(50.4'<CRCL&(CRCL'<40.5)) [f rx msg](A);[f rx ok]}}};

CRCL.PRIMA PRIMAXIN DOSE BASED ON CRCL RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;PRIMAXIN specific
; A>=50, B= 25-50, C=10-25, D= <10, Z= ESTIMATED CR CL
"CrCl = 31-70:Dose = 500 Mg IV Q8H. 500 mg q6h for life threatening infec."^A,
"CrCl = 21-30:Dose = 500 mg IV Q12H. 500 mg q8h for life threatening infec."^B,
"CrCl = 0-20: Dose = 250mg IV Q12H, 500mg q12h for life threatening infec."^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(19.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(30.4'<CRCL&(CRCL'<19.5)) [f rx msg](B);
(70.4'<CRCL&(CRCL'<30.5)) [f rx msg](A);[f rx ok]}}};

CRCL.TIMET TIMETIN DOSE BASED ON CRCL RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;TIMENTIN specific
"CrCl>=60, Recommended dose = 3.1g Q4H"^A,
"CrCl 30-60, Recommended dose: 2g Q4H."^B,
"CrCl 10-30, Recommended dose: 2g Q8H."^C,
"CrCl<10, 2 g Q12H, if Hepatic Dysfunction then give 2g Q24H "^D,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(9.4'<CRCL&(CRCL'<0)) [f rx msg](D);
(29.4'<CRCL&(CRCL'<9.5)) [f rx msg](C);
(59.4'<CRCL&(CRCL'<29.5)) [f rx msg](B);
59.5'>CRCL [f rx msg](A);[f rx ok]}}};

CRCL.UNASY UNASYN IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
; UNASYN specific
; N=Normal dose: 1.5-3G Q6-8H
;A>=30, B= 15-29, C=<14
"Est. CrCl (15-29), Recommended dose: 1.5 - 3 g q12h"^B,
"Est. CrCl (<=14, Recommended ose: 1.5 - 3g q24h"^C,
""^A,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(14.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(29.4'<CRCL&(CRCL'<14.5)) [f rx msg](B);
29.5'>CRCL [f rx ok];[f rx ok]}}};

CRCL.VANC VANCOMYCIN RX DOSE

;This rule caculates vanco dosing. Assumes a 15 mg/kg load for most patients
; dosing info bascially is comming off package insert
;ADBW -= adjusted body weight
;Vanco dose mg/kg/24h estimated at 0.227 * crcl +5.67
[f rx calc]("ADBW")^BW_.=.,
[f rx calc]("CRCL.ADJW")^CL_.=.,
((0.227*CL)+5.67)*BW^V,
("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.33):0D," Q8H")^E,
"PATIENT IS UNDER 17, NOT A CANDIDATE FOR ONCE DAILY"^A,
"Estimated CrCl is < 10ml/min - Use with Caution"^X,
IF{[f pt cur age]'>18 [f rx ok];
IF{(9.5>CL) [f rx msg](X);
IF{(9.4<CL) ("Loading dose =",(BW*15:0D)," mg")^L,
[f rx msg](L)},
IF{(14.4'<CL&(CL'<9.5)) (".227 =",(BW*15:0D),"MG Q48H")^D,
[f rx msg](D);
(24.4'<CL&(CL'<14.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q24H")^D,
[f rx msg](D),("Rec Dose:",((((0.227*CL)+5.67)*BW)):0D," Q48H")^G,
[f rx msg](G);
(34.4'<CL&(CL'<24.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)):0D," Q24H")^D,
[f rx msg](D);
(44.4'<CL&(CL'<34.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12")^D,
[f rx msg](D),(" OR Rec Dose:",((((0.227*CL)+5.67)*BW)):0D," Q24H")^F,
[f rx msg](F);
(54.4'<CL&(CL'<45.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12H")^D,
[f rx msg](D),(" OR Rec Dose:",((((0.227*CL)+5.67)*BW)):0D," Q24H")^H,
[f rx msg](H);
(64.4'<CL&(CL'<55.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12H")^D,
[f rx msg](D);
(74.4'<CL&(CL'<65.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12H")^D,
[f rx msg](D);
(84.4'<CL&(CL'<75.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12H")^D,
[f rx msg](D);
((CL'<45.5)) ("Rec Dose:",((((0.227*CL)+5.67)*BW)*0.5):0D," Q12H")^D,
[f rx msg](D);[f rx ok]}}};

CRCL.ZOSYN ZOSYN IV DOSE GUIDELINES RX MED

;This rule calculates the Estimated CrCL based on an Adjusted body weight
;ZOSYN specific
;
"CrCL> 40, Recommended dose: 3.375g Q6H "^A,
"CRCL 20-40 ml/min, Rec. Dose: 2.25g Q6H"^B,
"CRCL <20, 2.25 G Q8H"^C,
IF{[f pt cur age]'>18 " ";
IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;
("EST. CRCL = ",CRCL," ml/min ")^W,
[f rx msg](W),
IF{(20.4'<CRCL&(CRCL'<0)) [f rx msg](C);
(40.4'<CRCL&(CRCL'<20.5)) [f rx msg](B);
40.5'>CRCL [f rx ok];[f rx ok]}}};

CRCLT EST. CREATININE CLEARANCE CALC  

IF{IF{[f rx last ver result]("CR")^SRCR_.=.;
[f pt sex]^SX_.=.;
[f pt oe ht cm]^HT_.=.;
[f pt oe wt kgs]^WT_.=.;
[f pt cur age]^AGE_.=.} " Unable to calculate Creatinine Clearance. "^X,
[f rx msg](X)," ";
IF{SX="M" 50;45.5}^S,
IF{SX="M" 1;0.85}^F,
IF{SRCR<0.9 0.9^SRCR},
S+(2.3*((HT/2.54)-60)!0)^IBW,
IF{[f pt oe wt kgs]<IBW [f pt oe wt kgs]^IBW},
140-AGE*IBW/(72*SRCR)*F}^CRCLT;

CREAVIEW WORKS WITH RULE CRCL FOR VALUE RX MED

IF{[f rx calc]("CRCL.ADJW")^CRCL_.=.;
("Creatinine Clearance = ",CRCL," ml/min ")^X,[f rx msg](X)};

D70.MGKG D70-MG/KG -CALC PORTION CALC  

;This rule calculates the mg/kg -of d70 ordered -used in rule to tell total
;volume
;THIS RULE WAS MODIFIED ON 8/26/98 (SEE REMMED PORTION) - SWITCHED ORDERING
;UNITS FROM ML TO GRAMS.
;[f rx iv add dose]^A,
;[f pt oe wt kgs]^W,
;((((A*0.7000)/W)*0.6944):1D)^MGKG;
[f rx iv add dose]^A,
[f pt oe wt kgs]^W,
(((A:4D/W)*0.6944):1D)^MGKG;

D70W.MG.KG ML/DAY OF D70 TPN PATIENTS RX DOSE

;This rule calculates MAX mg/kg d70/24 hours. Assumes tpn value -= 24 hour
; ASSUMES MAX TO BE 5 MG/KG/MIN
[f rx calc]("D70.MGKG")^MGKG_.=.,
("Current Dextrose from TPN = ",MGKG," mg/kg/min")^K,
[f rx msg](K),
[f pt oe wt kgs]^W,
((50:6D/([f pt oe wt kgs]*1.44)):1D)^D,
("Each liter of D5W/day will add ",D," mg/kg/min of Dextrose")^P,
[f rx msg](P),
(((7.2*W)):0D)^M,
("MAXIMUM D70W/DAY =",(M)," GRAMS IF NO OTHER DEXTROSE RUNNING")^B,
[f rx msg](B);

DIAL REQUIRES DIAL FOR NP-KDU PT RX FILE

;THIS RULE REQUIRES- DIAL TO BE CHARGE TYPE
"FOR DIALYSIS PATIENTS, CHARGE TYPE SHOULD BE DIAL"^E,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx chg type]'="DIAL" [f rx err msg](E);[f rx ok]}};

DIAL.IV REQUIRES DIAL-IV FOR NP-KDU PT RX FILE

;THIS RULE REQUIRES- DIAL-IV TO BE CHARGE TYPE
"FOR DIALYSIS PATIENTS, CHARGE TYPE SHOULD BE DIAL-IV"^E,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx chg type]'="DIAL-IV" [f rx err msg](E);[f rx ok]}};

DIAL.IV.IN REQUIRES DIAL-IV OR DIAL RX FILE

;THIS RULE REQUIRES- DIAL-IV or DIAL to BE CHARGE TYPE
"FOR DIALYSIS PATIENTS, CHARGE TYPE SHOULD BE DIAL-IV OR DIAL"^E,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx chg type]="DIAL-IV"!([f rx chg type]="DIAL") 1,
[f rx ok];[f rx err msg](E)}};

DIPY.IMAG DIPYRIDAMOLE DOSE IMAGING RX MED

;this rule calculates amount of dipyridamole IV which should be given
;based on 0.57 mg/kg and total volume 35 ml
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,
"Pt is > 104.5kg, therefore, 60 mg dipyridamole, 23 ml NaCl 0.9%"^M,
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);
IF{[f pt oe wt kgs]>104.5 [f rx msg](M);(([f pt oe wt kgs]*0.57):1D)^Z,
("CALCULATED DIPYRIDAMOLE DOSE ",Z," MG")^D,
("NaCl needed = ",(35-(Z/5))," mls")^N,
[f rx msg](D) [f rx msg](N)}};

DNS Do NOT sell warning RX MED

; THIS RULE WILL display a warning for meds which should not be sold to DRUG
;stores
"Do NOT sell this med to other pharmacies. Check with Dorothy or Jim first!"^W,
IF{[f pt location]="DS" [f rx msg](W);[f rx ok]};

DNS.STOP Do NOT sell - STOP!! RX MED

; THIS RULE WILL STOP A USER FROM SELLING A MED TO A DRUG STORE
"Do NOT sell this med to other pharmacies. Check with Dorothy or Jim first!"^W,
IF{[f pt location]="DS" [f rx err msg](W);[f rx ok]};

EMP.CONT EMP-CONTRACT STATUS RX DOSE

;This rule displays the appropriate charge type for a employee rx,
;based on guaranter occupation. "RN or EMP"
"Contract status = NON-CONTRACT, charge type = RN"^NC,
"Contract status = MNA, charge type = RN"^R,
"Contract status = AFSCME, charge type = EMP"^E,
"PLEASE EDIT PATIENT'S GUARANTOR'S OCCUPATION IN THE PATIENT CENSUS ROUTINE"^U,
IF{[f pt facility]="." [f rx ok];
IF{[f pt guar occ]="MNA" [f rx msg](R);
IF{[f pt guar occ]="AFSCME" [f rx msg](E);
IF{[f pt guar occ]="NC" [f rx msg](NC);
IF{[f pt guar occ]="DS" [f rx ok];
IF{[f pt guar occ]="HOS" [f rx ok];
[f rx msg](U)}}}}}};

EPO.DIAL EPO-DIALYSIS PATIENTS RX MED

; THIS RULE WILL PREVENT PEOPLE FROM ORDERING OTHER MEDS THAN EPO 4,000 ON
;DIALYSIS PATIENTS
IF{[f pt location]="NP-KDU" "USE DRUG MNEMONIC ERYT-4000"}^X,
IF{[f pt location]="NP-KDU" [f rx err msg](X);[f rx ok]};

EPO.DOSE RESTRICTS # SENT TO MATCH DOSE RX FILE

;THIS RULE
;WILL NOT ALLOW SOMEONE TO ENTER A INCORECT # TODISP/DOSE
IF{[f pt location]="NP-KDU",
"PLEASE CHECK EPO DOSE VERSUS VIALS (QUANTITY TO DISPENSE !!)"^E,
[f rx dose]^D,
[f rx charge]}^DS,
(DS:4D/(D:2D/1000))^P,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{(9.20<P&(P<9.24)) [f rx ok];[f rx err msg](E)}};

GENT.DOSE GENT IV ADDITIEV DSOSE CALC  

IF{[f rx iv add dose]<10 [f rx iv add dose]^GENT.DOSE};

HEP.10.DI HEPATITIS B VAC-10U/DIALYSIS RX MED

;THIS RULE
;WILL NOT ALLOW SOMEONE TO PICK HEPATITIS B VACCINE 10 U ON DIALYSIS PATS
"USE THE MNEMONIC> HEPA-B-VAC"^E,
IF{[f pt location]'="NP-KDU" [f rx ok];[f rx err msg](E)};

HEP.B.DIAL HEPAT.B VAC-STOP UNLESS NOCALC RX FILE

;THIS RULE
;WILL NOT ALLOW SOMEONE TO FILE HEPATITIS B VACCINE WITH CHARGES ON DIALYSIS
;PATIENTS- THEY ARE CHARGED SEPERATELY
"CHARGE TYPE MUST BE NOCALC & CHARGE MUST BE $0.00"^E,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx chg type]="NOCALC"&([f rx charge]=0.00) [f rx ok];[f rx err msg](E)}};

INR DISPLAYS INR RX MED

IF{[f rx last ver result]("INR")^INR_.=.;
("LAST INR = ",INR,"")^I,
[f rx msg](I)};

KCL.IV DISPLAYS KCL LEVEL RX MED

IF{[f rx last ver result]("K")^K_.=.,
IF{[f rx last ver result]("MG")^MG_.=.,
("MG = ",MG," mg/dL, protocol= 2 g (16.24 mEq in 50 ml D5W over 1 hour")^E,
("MG = ",MG," mg/dL, protocol= 4 g (32.48 mEq in 100 ml D5W over 2 hours")^F,
("MG = ",MG," mg/dL, Since > 1.7, MG OK, does NOT need replacement")^G,
IF{(1.75'<MG&(MG'<1.39)) [f rx msg](E);
(MG<1.39) [f rx msg](F);[f rx msg](G),
("Last K+ level = ",K," Protocol is KCL 10 mEq x 2 doses")^A,
("Last K+ level = ",K," Protocol is KCL 10 mEq x 3 doses")^B,
("Last K+ level = ",K," Protocol is KCL 10 mEq x 4 doses")^C,
("Last K+ level = ",K," Protocol is KCL 10 mEq x 5 doses")^D,
IF{(3.85'<K&(K'<3.5)) [f rx msg](A);
(3.45'<K&(K'<2.95)) [f rx msg](B);
(2.94'<K&(K'<2.45)) [f rx msg](C);
(K<2.44) [f rx msg](D);[f rx ok]}}}};

KDU.0.STK NO STOCK MED FOR KDU RX FILE

; THIS RULE WILL NOT ALLOW STOCK MED CHARGES TO DIALYSIS PATIENTS
"Do NOT use stock med for dialysis pateints (no DX entered) "^X,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx sig]'=".STK-MED" [f rx ok];[f rx err msg](X)}};

KDU.DI.DM RESTRICTS ORDER TYPE DI-DM-KDU RX MED

; THIS RULE WILL ONLY ALLOW DI OR DM FOR DIALYSIS PATIENTS
"Use order type DI or DM for dialysis patients"^X,
IF{[f pt location]'="NP-KDU" [f rx ok];
IF{[f rx ord type]="DI"!([f rx ord type]="DM") [f rx ok];[f rx err msg](X)}};

NOCALC.OUT REQUIRES NOCALC ON OUTPAT PO'S RX DOSE

;THIS RULE WARNS USER TO CHANGE CHARGE CODE ON ER MEDS
"CHARGE TYPE FOR PILLS GIVEN IN ER OR OPS SHOULD BE NOCALC"^B,
IF{[f pt status]'="REG ER"&([f pt status]'="REG SDC") [f rx ok];
IF{[f rx route]="PO"&(([f rx chg type]'="ER")&([f rx chg type]'="NOCALC")) 1,
[f rx msg](B);[f rx ok]}};

NOCALC.ST2 STOPS AT FILE PROMPT-ER/OPS RX FILE

;THIS RULE WILL NOT ALLOW USER FILE CHARGES FOR PILLS IN ER
"CHARGE TYPE FOR ORALS PILLS GIVEN IN ER OR OPS SHOULD BE NOCALC"^B,
IF{[f pt status]'="REG ER"&([f pt status]'="REG SDC") [f rx ok];
IF{[f rx chg type]="PO" [f rx msg](B);[f rx ok]}};

NOCALC.STP STOPS AT FILE PROMPT-ER/OPS RX FILE

;THIS RULE WILL NOT ALLOW USER FILE CHARGES FOR PILLS IN ER
"CHARGE TYPE FOR ORALS PILLS GIVEN IN ER OR OPS SHOULD BE NOCALC"^B,
"IF THIS RX IS A TAKE HOME RX, EDIT RX SO CHARGE CODE = ER-NS, ELSE NOCALC"^C,
IF{[f pt status]'="REG ER"&([f pt status]'="REG SDC") [f rx ok];
IF{[f rx route]'="PO" [f rx ok];
IF{[f rx chg type]="NOCALC" [f rx ok];
IF{[f rx chg type]="ER" [f rx ok];
IF{[f rx chg type]="ER-NS" [f rx ok];
[f rx err msg](B),[f rx err msg](C)}}}}};

OAD ONCE A DAY DOSING RX DOSE

[f rx calc]("ADBW")^BW_.=.,
[f rx calc]("CRCL.ADJW")^CL_.=.,
"PATIENT IS NOT A CANDIDATE FOR ONCE DAILY DOSING"^E,
"PATIENT IS UNDER 17, NOT A CANDIDATE FOR ONCE DAILY"^A,
IF{[f pt cur age]<17 [f rx msg](A);
IF{(40.4'<CL&(CL'<29.5)) ("ONCE DAILY DOSE =",(BW*2.5:0D),"MG Q 24 HRS")^D,
[f rx msg](D);
(60.4'<CL&(CL'<40.5)) ("ONCE DAILY DOSE =",(BW*3.5:0D),"MG Q 24 HRS")^D,
[f rx msg](D);
(80.4'<CL&(CL'<60.5)) ("ONCE DAILY DOSE =",(BW*4:0D),"MG Q 24 HRS")^D,
[f rx msg](D);
(99.4'<CL&(CL'<80.5)) ("ONCE DAILY DOSE =",(BW*5:0D),"MG Q 24 HRS")^D,
[f rx msg](D);
(120.4'<CL&(CL'<99.5)) ("ONCE DAILY DOSE =",(BW*6:0D),"MG Q 24 HRS")^D,
[f rx msg](D);
(120.5'>CL!(CL'>29.4)) [f rx msg](E)};[f rx msg](A)};

QD.STOP STOP USER FROM USING SIG (QD) RX FILE

;THIS RULE WILL NOT ALLOW USER TO USE QD FOR SIG - PYXIS WILL DO CHARGING
"DO NOT USE QD SIG ON INPATIENTS - WILL AUTO CHARGE!!, USE D INSTEAD"^A,
IF{[f pt status]'="ADM IN" [f rx ok];
IF{[f rx sig]="QD" [f rx err msg](A);[f rx ok]}};

TPN.ORD.TY MAKES AA FOR ORDER TYPE T ONLY RX MED

;This rule does not allow amino acids to be used unless order type "T"
"IV order type for TPNs should be T (NOT I)"^E,
IF{[f rx med]="AA10-WO-AD"&([f rx ord type]="T") [f rx ok];[f rx err msg](E)};

TPN.TPN MAKESTPN FOR ORDER TYPE T ONLY RX MED

;This rule does not allow amino acids to be used unless order type "T"
"IV order type for TPNs should be T (NOT I)"^E,
IF{[f rx med]="TPN"&([f rx ord type]="T") [f rx ok];[f rx err msg](E)};

TROG.ALT TROGLITAZONE - ALT CHECK RX MED

; This rule warns the user if ALT is higher than normal limits
; when troglitazone is ordered
IF{[f rx last ver result]("ALT")^ALT_.=.;
("ALT is ",ALT,", which is 1.5 - 2 times upper normal limit, watch usage")^A,
("ALT IS ",ALT,", which is > 2 times upper normal limit, watch usage, ?DC")^B,
("ALT IS ",ALT,", Which is >3 times upper normal-REZULIN should be DCed!!")^C,
("ALT IS ",ALT,", Which is less than 1.5 times normal upper limit = OK")^D,
IF{(54.4'<ALT&(ALT'<41.4)) [f rx msg](A);
(79.8'<ALT&(ALT'<54.5)) [f rx msg](B);
(ALT>79.9) [f rx msg](C);[f rx msg](D)}};

VOL.TOT DETERMINES IV'S TOTAL VOL CALC  

;DETERMINES VOLUME - PUTS INTO VOL
[f rx iv tot vol]^VOL;

WCOMP ZERO CHARGE FOR WORKMANS COMP RX FILE

;WILL NO ALLOW CHARGES FOR WORKMANS COMP
"CHARGE FOR WORKMANS COMP SHOULD BE $0.00"^B,
"Edit Charge field to 0.00 and Type rx CHARGE (actual cost) into Rx Comments"^C,
"To insert Workmans Comp Billing code, press the F4 key, and type WC"^D,
IF{[f rx chg type]="WCOMP"&([f rx charge]'="0.00") 1,
[f rx err msg](B),[f rx err msg](C),[f rx err msg](D);[f rx ok]};

ZOSY.VOL ZOSYN <100 ML WARNING RX FILE

;THIS RULE SPECIFIES 100 ML SHOULD BE USED FOR ZOSYN - USES CALC RULE TO
;DETERMINE VOLUME
"THIS IS A"^A,
[f rx calc]("VOL.TOT")^VOL_.=.,
VOL^V,
("ZOSYN SHOULD GENERALLY BE IN 100 ML NS. Current volume = ",(V),"")^W,
IF{(99'<VOL) [f rx msg](W);[f rx ok]};