Back to Main Page

MEDITECH PHA rule info

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





Note: End of documentation contains the code for The keywords. Click here to see keywords

Some of the keywords require NPR reports. Below the keywords are a link to the NPR reports for keywords.
Click here to see NPR Reports for Keywords


RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 1
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB

;


--------------------------------------------------------------------------------------------
15KG             RX                EVL DOSE              FLAG TO WARN OF PATEINT'S<=15k
;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]}}};                             

--------------------------------------------------------------------------------------------
327OB            RX                EVL MED               FLAG USER 327 OB              
"Note: patient is in 327 - please change Rx inventory to OB"^FLAG,              
IF{[f pt room]="327" [f rx msg](FLAG);1};                                       

--------------------------------------------------------------------------------------------
ADBW             CALC              EVL MED               Ideal BW/ABW- CRCL 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;                                                                       

--------------------------------------------------------------------------------------------
ADEN.BD          CALC              EVL MED               ADENOSINE DOSE CHECKER        
;used for calculating if correct dose is in dipyridamole infus.                 
[f rx iv add dose]^ADEN.BD;                                                     

--------------------------------------------------------------------------------------------
ADEN.CC          CALC              EVL MED               ADENOSINE CALC RULE           
;used for calculating if correct dose for dipyridamole                          
[f rx iv car vol]^ADEN.CC;                                                      

--------------------------------------------------------------------------------------------
ADEN.IMAG        RX                EVL MED               ADENOSINE DOSE IMAGING        
;this rule calculates amount of ADENOSINE IV which should be given              
;based on 0.84 mg/kg and total volume 45 ml                                     
IF{[f rx ord type]="SOI" [f rx ok];                                             
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 161 kg, therefore, 135 mg ADENOSINE, 0 ml NaCl 0.9%"^M,                
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
IF{[f pt oe wt kgs]>160 [f rx msg](M);(([f pt oe wt kgs]*0.84):1D)^Z,           
IF{[f rx ord type]="SOI" [f rx ok];                                             
("CALCULATED ADENOSINE DOSE ",Z," MG")^D,                                       
("NaCl needed = ",(45-(Z/3))," mls")^N,                                         
[f rx msg](D) [f rx msg](N)}}}};                                                


RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 2
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
--------------------------------------------------------------------------------------------
ADEN.IMG         RX                EVL DOSE              ADENOSINE DOSE IMAGING        
;this rule calculates amount of ADENOSINE IV which should be given              
;based on 0.84 mg/kg and total volume 45 ml                                     
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 161 kg, therefore, 135 mg adenosine, 0 ml NaCl 0.9%"^M,                
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*0.84):1D^Z,                                                   
IF{135.01'<Z Z^Y;1350^Y},                                                       
(Y+0.1)^DH,                                                                     
(Y-0.1)^DL,                                                                     
IF{[f rx calc]("ADEN.BD")^BD_.=.;                                               
("Calc. Adenosine =",Y," - NOT",BD,"mg")^M,                                     
IF{(DH'<BD&(BD'<DL)) [f rx ok];                                                 
IF{BD_.=. [f rx ok];                                                            
[f rx err msg](M)}}}};                                                          

--------------------------------------------------------------------------------------------
ADEN.MC          RX                EVL MED               ADENOSINE - BLOCK IF MEDICARE 
[f rx calc]("MEDICARE")^INS,                                                    
;"NOCALC-IV"^NC,                                                                
;IF{INS=1 [f rx set charge type](NC);1};                                        
IF{INS=1 [f rx err msg]("Line feed out 6 mg and use 30 mg vial");1};            

--------------------------------------------------------------------------------------------
ADEN.MC.OK       RX                EVL MED               ADENOSINE - BLOCK IF NOT MEDIC
[f rx calc]("MEDICARE")^INS,                                                    
IF{INS'=1 [f rx err msg]("Line feed out 30 mg and use 6 mg syringe");1};        

--------------------------------------------------------------------------------------------
ADEN.NS          RX                EVL DOSE              DIPYRIDAMOLE- NS VOLUME       
;this rule calculates amount of adenosine IV which should be given              
;based on 0.14 mg/kg and total volume 45 ml                                     
IF{([f rx ord type]'="SOI"!([f rx med]'="NS-50ML")) [f rx ok];                  
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 160 kg, therefore, 135 mg adenosine 0.01 ml NaCl 0.9%"^M,              
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*0.84):1D^Z,                                                   
IF{135.01'<Z Z^Y;135^Y},                                                        
(45-(Y/3))^N,                                                                   
(N+0.1)^NH,                                                                     
(N-0.1)^NL,                                                                     
IF{[f rx calc]("ADEN.CC")^NS_.=.;                                               
IF{(NH'<NS&(NS'<NL)) [f rx ok];                                                 
("CALCULATED ADENOSINE DOSE ",Y,"MG -- NS volume should be ",N,"MLS")^D,        
[f rx err msg](D)}}}};                                                          

--------------------------------------------------------------------------------------------
ALBU.BLK         RX                EVL FILE              ALBUTEROL NEBS BLOCK          
;THIS RULE WILL STOP FILING THE 2.5 MG NEB FROM FILING                          
;                                                                               
"Please use 1 mg mnemonic - ALBU-NEB for stock med charging."^WAR,              
IF{[f rx chg type]="INHUD"&([f pt location]'="SBU") 1,                          
[f rx err msg](WAR);[f rx ok]};                                                 

--------------------------------------------------------------------------------------------
ALL.CLASS        RX                EVL MED               Allergy - Class - any         

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 3
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"No Class allergies"^MES,                                                       
[f z all class list]^MES,                                                       
IF{MES_.=. 1;                                                                   
[f rx msg]("Class Allergies:"_MES),1};                                          

--------------------------------------------------------------------------------------------
ALL.HAB          RX                EVL MED               ALLERGY UPDATE MESSAGE TO RPH 
;IF{[f z staff title]'="RPH" 1;                                                 
""^CAL^CAD^GAL^GAD,                                                             
[f z all class in]^CAL,                                                         
[f z adr class in]^CAD,                                                         
[f z all gen in]^GAL,                                                           
[f z adr gen in]^GAD,                                                           
CAL+CAD^CLS,                                                                    
GAL+GAD^GEN,                                                                    
IF{'GAL&'GAD&'CAL&'CAD 1;                                                       
[f rx win init],                                                                
IF{GAD!GAL ("Update allergies! Patient has "_GEN_" inactive Generic codes")^MG1,
"For Maximum patient safety, please switch to ingredient codes"^MG2,            
[f rx win add](MG1),                                                            
[f rx win add](MG2)},                                                           
IF{CAL!CAD ("Update Allergies! Patient has "_CLS_" inactive Class codes")^MC1,  
[f rx win add](MC1)},                                                           
[f rx win disp],1};                                                             
;[f rx msg]("Inactive Class: "_CLS_" Inactive Generics "_GEN);                  
;IF{[f z staff title]'="RPH" 1;                                                 
;[f z.any.allergies]^ALLERGIES,                                                 
;IF{'ALLERGIES 1;                                                               
;[f z mdx.allergy.y]^ALL,                                                       
;IF{[f z all.class.nka]="NKA" 1;                                                
;IF{ALL="NOT" 1,                                                                
;("MDX allergy codes not verified, please update with ingredient codes")^MES1,  
;[f z all.class.nka]^CLFS,                                                      
;[f z all class - last]^CLLS,                                                   
;[f z all generic first]^GNFS,                                                  
;[f z all generic last]^GNLS,                                                   
;IF{CLFS'=CLLS CLFS_" & "_CLLS^CLASS;CLFS^CLASS},                               
;("Some of Class allergies listed: "_CLASS)^CLASS,                              
;IF{GNFS'=GNLS GNFS_" & "_GNLS^GENERIC;GNFS^GENERIC},                           
;("Some of Generic Allergies Listed: "_GENERIC)^GENERIC,                        
;[f rx win init],                                                               
;[f rx win add](MES1),                                                          
;[f rx win add](CLASS),                                                         
;[f rx win add](GENERIC),                                                       
;[f rx win disp],1;1}}}};                                                       

--------------------------------------------------------------------------------------------
ALL.MES          RX                EVL MED               ALLERGY UPDATE MESSAGE TO RPH 
;IF{[f z staff title]'="RPH" 1;                                                 
IF{[f rx ord type]="T" 1;                                                       
""^CAL^CAD^GAL^GAD,                                                             
[f z all class in]^CAL,                                                         
[f z adr class in]^CAD,                                                         
[f z all gen in]^GAL,                                                           
[f z adr gen in]^GAD,                                                           
CAL+CAD^CLS,                                                                    
GAL+GAD^GEN,                                                                    

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 4
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{'GAL&'GAD&'CAL&'CAD 1;                                                       
[f rx win init],                                                                
IF{GAD!GAL ("Update allergies! Patient has "_GEN_" old GENERIC codes")^MG1,     
"For Maximum patient safety, please switch to ingredient codes"^MG2,            
[f rx win add](MG1),                                                            
[f rx win add](MG2)},                                                           
IF{CAL!CAD ("Update Allergies! Patient has "_CLS_" OLD CLASS codes")^MC1,       
[f rx win add](MC1)},                                                           
[f rx win disp],1}};                                                            
;[f rx msg]("Inactive Class: "_CLS_" Inactive Generics "_GEN);                  
;IF{[f z staff title]'="RPH" 1;                                                 
;[f z.any.allergies]^ALLERGIES,                                                 
;IF{'ALLERGIES 1;                                                               
;[f z mdx.allergy.y]^ALL,                                                       
;IF{[f z all.class.nka]="NKA" 1;                                                
;IF{ALL="NOT" 1,                                                                
;("MDX allergy codes not verified, please update with ingredient codes")^MES1,  
;[f z all.class.nka]^CLFS,                                                      
;[f z all class - last]^CLLS,                                                   
;[f z all generic first]^GNFS,                                                  
;[f z all generic last]^GNLS,                                                   
;IF{CLFS'=CLLS CLFS_" & "_CLLS^CLASS;CLFS^CLASS},                               
;("Some of Class allergies listed: "_CLASS)^CLASS,                              
;IF{GNFS'=GNLS GNFS_" & "_GNLS^GENERIC;GNFS^GENERIC},                           
;("Some of Generic Allergies Listed: "_GENERIC)^GENERIC,                        
;[f rx win init],                                                               
;[f rx win add](MES1),                                                          
;[f rx win add](CLASS),                                                         
;[f rx win add](GENERIC),                                                       
;[f rx win disp],1;1}}}};                                                       

--------------------------------------------------------------------------------------------
ALL.TO.ING       RX                EVL MED               Allergy chg to ingredient     
IF{[f z pharmacist]="Y" 1,                                                      
[f z all gen and cls ls]^ALLG,                                                  
;"TEST"^ALLG,                                                                   
IF{ALLG_.=. 1;                                                                  
"Please Chg Allergies to Ingr:"^CHG,                                            
IF{[f rx yes/no](CHG_ALLG_" OK?")=1 1;                                          
"INGREDIENT allergies provide better checking than class or generic"^MES,       
[f rx msg](MES),1}};1};                                                         

--------------------------------------------------------------------------------------------
ALL.UPDTE        RX                EVL MED               ALLERGY UPDATE MESSAGE TO RPH 
;IF{[f z staff title]'="RPH" 1;                                                 
[f z.any.allergies]^ALLERGIES,                                                  
IF{'ALLERGIES 1;                                                                
[f z mdx.allergy.y]^ALL,                                                        
IF{[f z all.class.nka]="NKA" 1;                                                 
IF{ALL="NOT" 1,                                                                 
("MDX allergy codes not verified, please update with ingredient codes")^MES1,   
[f z all.class.nka]^CLFS,                                                       
[f z all class - last]^CLLS,                                                    
[f z all generic first]^GNFS,                                                   
[f z all generic last]^GNLS,                                                    
IF{CLFS'=CLLS CLFS_" & "_CLLS^CLASS;CLFS^CLASS},                                
("Some of Class allergies listed: "_CLASS)^CLASS,                               

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 5
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{GNFS'=GNLS GNFS_" & "_GNLS^GENERIC;GNFS^GENERIC},                            
("Some of Generic Allergies Listed: "_GENERIC)^GENERIC,                         
[f rx win init],                                                                
[f rx win add](MES1),                                                           
[f rx win add](CLASS),                                                          
[f rx win add](GENERIC),                                                        
[f rx win disp],1;1}}};                                                         

--------------------------------------------------------------------------------------------
ALPROS.MSG       RX                EVL MED               ALPROSTADIL MESSAGE           
;MESSAGE TO USER BASED ON MESSAGE FROM JRG on 5/4/2004                          
;                                                                               
;The Fargo transport team has been trained to use the alprostadil prepared      
;according to weight using a modified "rule of 6" formula.                      
;The formula is as follows:                                                     
;Wt (in Kg) X 0.12 = volume of alprostadil 500mcg/ml to dilute to a total of    
;10 ml with D10W.                                                               
;                                                                               
;This solution is run at 1ml/hr to deliver 0.1mcg/kg/min                        
;or 0.5ml/hr to deliver 0.05mcg/kg/min which is the recommended dose range.     
;                                                                               
;Example: 3.5 kg infant x 0.12 = 0.42 ml is diluted with 9.58 ml                
;(10-0.42ml=9.58ml)  of D10W for a total volume of 10ml.                        
;This would be run at 1ml/hr for 0.1mcg/kg/min or 0.5ml/hr for 0.05 mcg/kg/min. 
;                                                                               
[f rx win init],                                                                
"Message from JRG - 5/4/2004"^M1,                                               
[f rx win add](M1),                                                             
"The Fargo transport team has been trained to use the alprostadil prepared"^M1, 
[f rx win add](M1),                                                             
"according to weight using a modified rule of 6 formula."^M1,                   
[f rx win add](M1),                                                             
[f rx win add]("  "),                                                           
[f rx win add]("Wt in kg x 0.12 = volume of alprostadil 500 mcg/ml"),           
[f rx win add]("to dilute to a total of 10 ml with D10W"),                      
[f rx win add]("This solution is run at 1 ml/hr to deliver 0.1 mcg/kg/min or"), 
[f rx win add]("0.5 ml/hr to deliver 0.05 mcg/kg/min "),                        
[f rx win add]("Example: 3.5 kg infant x 0.12 = 0.42 ml is diluted with"),      
[f rx win add]("9.58 ml (10 - 0.42ml = 9.58 ml) of D10W for a final vol. 10ml"),
[f rx win add]("Infuse at 0.5 ml/hr for dose of 0.05 mcg/kg/min or"),           
[f rx win add]("Infuse at 1 ml/hr for a dose of 0.1 mcg/kg/min"),               
[f rx win disp],1;                                                              

--------------------------------------------------------------------------------------------
AZIT.RTE         RX                EVL FILE              Must be < 130                 
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Zithromax should not exceed 130 ml/hr - infuse over 2 hrs"^B,         
IF{CIPRRATE>130 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
CATACHG          RX                EVL MED               CATARACT CHARGE-MEDICARE      
;Rule written Herb Bromenshenkel 3/24/99 CHARGES fee to medicare patients       
;if non medicare,no fee.  Fee is a surgical billing number                      
; will only work on M order types                                               
"CAT-MEDC"^P,                                                                   
IF{[f rx ord type]'="M" [f rx ok];                                              
IF{[f rx calc]("MC2")^MC2_.=.;                                                  

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 6
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{(MC2=1) [f rx ok];[f rx set charge type]("NC")}}};                           

--------------------------------------------------------------------------------------------
CHG.COST4        RX                EVL MED               CHARGE- SET TYPE COST+4       
;This rule sets the default charge type to "COST+4.00" if it is a DM order type 
IF{[f rx ord type]'="DM" [f rx ok];[f rx set charge type]("COST+4.00")};        

--------------------------------------------------------------------------------------------
CIPRRATE         CALC              EVL MED               CIPRO RATE- LIMITS TO 2 HR-CLC
;This rule does not allowing filing of cipro 400 mg iv bags/200 ml              
;unless rate is over 2 hours                                                    
[f rx iv rate]^CIPRRATE;                                                        

--------------------------------------------------------------------------------------------
CIPRRATE2        RX                EVL FILE              CIPRO RATE -MUST BE 100       
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for cipro should not exceed 100 ml/hr"^B,                                 
IF{CIPRRATE>120 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
CLAR             RX                EVL MED               CLARIFICATION - RESTRICT ENT  
;TEST                                                                           
IF{[f rx ord type]'="CLAR" [f rx ok];                                           
IF{[f pt location]="2WEST" [f rx ok];                                           
IF{[f pt location]="2EAST" [f rx ok];                                           
IF{[f pt location]="FC" [f rx ok];                                              
IF{[f pt location]="OB" [f rx ok];                                              
"Order type CLAR is currently for 2nd & 3rd floor only"^A,                      
[f rx err msg](A)}}}}};                                                         

--------------------------------------------------------------------------------------------
CLAR2            RX                EVL MED               CLARIFICATION - RESTRICT ENT  
;ORDER TYPE MUST BE CLAR                                                        
"order type must be CLAR"^A,                                                    
IF{[f rx ord type]="CLAR" [f rx ok];                                            
[f rx err msg](A)};                                                             

--------------------------------------------------------------------------------------------
CORVERT          RX                EVL MED               CORVERT- K & MG within 24hours
;Rule flags last K and Mg status of patient with time frame comments            
;used for corvert                                                               
;assumes normal levels for K of: 3.3 - 4.8                                      
;assumes normal lvels of Mg of 1.6 - 2.3                                        
[f rx nth ver Res-RES]("K",1)^POT,                                              
IF{POT_.=. ("No K+ done on this patient, please obtain lab results")^KM;        
POT#"0,"^RES^KR,                                                                
POT#"1,"^DATE,                                                                  
POT#"2,"^TIME,                                                                  
;[f rx msg](RES_" "_DATE_" "_TIME)},                                            
[f z elapsed.time]^KET,                                                         
IF{KET<24.9 "K level current:"^BK;"K Level >24 hrs! -CHECK:"^BK},               
IF{KR<3.3 1,                                                                    
(BK_" Last K is LOW: "_KR_" "_DATE_" @"_TIME_" ("_KET_" hrs)")^KM};             
IF{KR>3.2&(KR<4.9) 1,                                                           
(BK_" Last K+ is normal: "_KR_" on "_DATE_" @"_TIME_" ("_KET_" hours)")^KM};    
IF{KR>4.8 1,                                                                    
(BK_" Last K is HIGH: "_KR_" "_DATE_"@ "_TIME_" ("_KET_" hours)")^KM}},         

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 7
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx nth ver Res-RES]("MG",1)^MAG,                                             
IF{MAG_.=. ("No Mg+ done on this patient, please obtain lab results")^MM;       
MAG#"0,"^RES^MR,                                                                
MAG#"1,"^DATE,                                                                  
MAG#"2,"^TIME,                                                                  
[f z elapsed.time]^MET,                                                         
IF{MET<24.9 "Mg level current:"^BM;"Mg Level >24 hrs! -CHECK:"^BM},             
IF{MR<1.6 1,                                                                    
(BM_" Last MG is LOW: "_MR_" "_DATE_" @"_TIME_" ("_MET_" hrs)")^MM};            
IF{MR>1.55&(MR<2.35) 1,                                                         
(BM_" Last Mg+ is normal: "_MR_" on "_DATE_" @"_TIME_" ("_MET_" hours)")^MM};   
IF{MR>2.3 1,                                                                    
(BM_" Last Mg is HIGH: "_MR_" "_DATE_" @"_TIME_" ("_MET_" hours)")^MM}},        
[f rx win init],                                                                
[f rx win add](KM),                                                             
[f rx win add](MM),                                                             
[f rx win disp],1;                                                              

--------------------------------------------------------------------------------------------
CRCL             CALC              EVL MED               EST. CREATININE CLEARANCE     
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<1.01 1.0^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:0D^CRCL;                                          

--------------------------------------------------------------------------------------------
CRCL.0WT         CALC              EVL MED               EST. CRCL  WITHOUT ANY WEIGHT 
; THIS CALCULATES EST. CRCL WITHOUT USING WEIGHT.                               
; USED FOR GENT, TOB AND VANC AS OF 5/11/99 - SEE RPH MEETING MINUTES FOR FULL  
;DETAILS/                                                                       
                                                                                
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" 1;0.85}^F,                                                            
IF{SRCR<1.01 1.0^SRCR},                                                         
((140-AGE)/SRCR)*F}^CRCL.ADJW;                                                  

--------------------------------------------------------------------------------------------
CRCL.ADJA        CALC              EVL MED               EST. CRCL  c ADJUSTED WT      
;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_.=.;                                    

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 8
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[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<1.01 1.0^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:6D/(72*SRCR)*F):2D}^CRCL.ADJW;                                     

--------------------------------------------------------------------------------------------
CRCL.ADJAR       CALC              EVL MED               EST. CRCL  c ADJUSTED WT - REV
;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 ""                            
                                                                                
""^XZ,                                                                          
IF{IF{[f rx last ver result]("CR")^SRCR_.=. XZ_"*Missing Cr  "^XZ},             
IF{[f pt sex]^SX_.=. XZ_"*Missing Sex  "^XZ},                                   
IF{[f pt oe ht cm]^HT_.=. XZ_"*Missing Ht  "^XZ},                               
IF{[f pt oe wt kgs]^WT_.=. XZ_"*Missing Wt  "^XZ},                              
IF{[f pt cur age]^AGE_.=. XZ_"*Missing Age"^XZ},XZ;                             
IF{SX="M" 50;45.5}^S,                                                           
IF{SX="M" 1;0.85}^F,                                                            
IF{SRCR<1.01 1.0^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:6D/(72*SRCR)*F):0D}^CRCL.ADJW;                                     

--------------------------------------------------------------------------------------------
CRCL.ADJW        CALC              EVL MED               EST. CRCL  c ADJUSTED WT      
;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<1.01 1.0^SRCR},                                                         

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                     PAGE 9
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
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:6D/(72*SRCR)*F}:2D^CRCL.ADJW;                                       

--------------------------------------------------------------------------------------------
CRCL.ALL         RX                EVL DOSE              Renal Fx Dosing -- ALL - DOSE 
;Modified from Herb's presentation at MUSE & Bruce Mathiase CrCl                
;This rule calculates the Estimated CrCL based on an Adjusted body weight       
;and pulls the appropriate text from the Drug CDS to display suggested dose     
;Set as global rule, only displays if all 5 crcl fields have data               
;** note: Check to see if a from a string. If so, displays.  If not             
;from string - another rule - in med displays.  This is done because if         
;only have at med, will not display if use string.                              
IF{[f z order.string.mn]_.=. 1;                                                 
IF{[q PHACRCL50]_.=.!([q PHACRCL40]_.=.)!([q PHACRCL30]_.=.) 1;                 
IF{[q PHACRCL20]_.=.!([q PHACRCL10]_.=.) 1;                                     
IF{([f z user mis office]="PHARMACY"!([f user]="HAB")) 1,                       
IF{[f pt cur age]<18 1;                                                         
;F{'[q PHACRCL50]&'[q PHACRCL40]&'[q PHACRCL30]&'[q PHACRCL20]&'[q PHACRCL50] 1;
("Pat. Data: Age: "_[f pt adm/ser age]_"  Sex:"_[f pt sex])^BLANK,              
;------ checking if weight exist - is so - displays ----------                  
IF{[f pt oe wt kgs]_.=. 1;                                                      
[f pt oe wt kgs]^KG,                                                            
("  Weight = ",(KG):0D,"kgs ("_((KG*2.2):0D),"lbs)")^KGLB,                      
BLANK_KGLB^BLANK},                                                              
;------------------------                                                       
;[f rx calc]("CRCL.ADJAR")^CRCL,                                                
[f rx calc]("CRCL.C.IBW")^CRCL,                                                 
IF{CRCL#0="*" 1,                                                                
[f rx win init],                                                                
[f rx win add]("Est. CrCl can not be calculated for the following reason(s)"),  
[f rx win add](CRCL),                                                           
IF{CRCL#9'="C" 1,                                                               
[f rx nth ver Res-RES]("CR",1)^RE1,                                             
("FYI Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^L1},          
[f rx win add](L1),                                                             
[f rx win add](BLANK),                                                          
[f rx win add](L2),                                                             
[f rx win disp],1;                                                              
;----- STARTING TO CALCULATE IF CRCL IS AVAILABLE ------------------            
IF{[f rx nth ver Res-RES]("CR",1)^RE1,                                          
("Based on Cr: "_(RE1#"0,")_" on "_(RE1#"1,")_" @ "_(RE1#"2,"))^M1,             
IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. " "^M2;                               
(" ":27_"Previous Cr "_(RE2#"0,")_" on "_(RE2#"1,")_" @ "_(RE2#"2,"))^M2},      
IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. " "^M3;                               
(" ":39_(RE3#"0,")_" on "_(RE3#"1,")_" @ "_(RE3#"2,"))^M3},                     
(("Est. CrCl = ",CRCL," ml/min        "):26T_M1)^EST},                          
IF{49.999<CRCL 1,                                                               
"Since CrCl>50 ml/min, No need for dose adjustment"^DOSE;                       
(50>CRCL&(39.999<CRCL)) 1,                                                      
"Suggested Dose: "_[q PHACRCL50]^DOSE;                                          
(40>CRCL&(29.999<CRCL)) 1,                                                      
"Suggested Dose: "_[q PHACRCL40]^DOSE;                                          

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 10
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(30>CRCL&(19.999<CRCL)) 1,                                                      
"Suggested: "_[q PHACRCL30]^DOSE;                                               
(20>CRCL&(9.999<CRCL)) 1,                                                       
"Suggested Dose: "_[q PHACRCL20]^DOSE;                                          
(10>CRCL&(CRCL'<0)) 1,                                                          
"Suggested Dose: "_[q PHACRCL10]^DOSE;},                                        
[f rx win init],                                                                
[f rx win add](DOSE),                                                           
[f rx win add](EST),                                                            
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win add](BLANK),                                                          
[f rx win disp],1}};1}}}};                                                      

--------------------------------------------------------------------------------------------
CRCL.ALL.M       RX                EVL MED               Renal Fx Dosing -- ALL - MED  
;Modified from Herb's presentation at MUSE & Bruce Mathiase CrCl                
;This rule calculates the Estimated CrCL based on an Adjusted body weight       
;and pulls the appropriate text from the Drug CDS to display suggested dose     
;Set as global rule, only displays if all 5 crcl fields have data               
;                                                                               
IF{[q PHACRCL50]_.=.!([q PHACRCL40]_.=.)!([q PHACRCL30]_.=.) 1;                 
IF{[q PHACRCL20]_.=.!([q PHACRCL10]_.=.) 1;                                     
IF{([f z user mis office]="PHARMACY"!([f user]="HAB")) 1,                       
IF{[f pt cur age]<18 1;                                                         
;F{'[q PHACRCL50]&'[q PHACRCL40]&'[q PHACRCL30]&'[q PHACRCL20]&'[q PHACRCL50] 1;
("Pat. Data: Age: "_[f pt adm/ser age]_"  Sex:"_[f pt sex])^BLANK,              
;------ checking if weight exist - is so - displays ----------                  
IF{[f pt oe wt kgs]_.=. 1;                                                      
[f pt oe wt kgs]^KG,                                                            
("  Weight = ",(KG):0D,"kgs ("_((KG*2.2):0D),"lbs)")^KGLB,                      
BLANK_KGLB^BLANK},                                                              
;------------------------                                                       
;[f rx calc]("CRCL.ADJAR")^CRCL,                                                
[f rx calc]("CRCL.C.IBW")^CRCL,                                                 
IF{CRCL#0="*" 1,                                                                
[f rx win init],                                                                
[f rx win add]("Est. CrCl can not be calculated for the following reason(s)"),  
[f rx win add](CRCL),                                                           
IF{CRCL#9'="C" 1,                                                               
[f rx nth ver Res-RES]("CR",1)^RE1,                                             
("FYI Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^L1},          
[f rx win add](L1),                                                             
[f rx win add](BLANK),                                                          
[f rx win add](L2),                                                             
[f rx win disp],1;                                                              
;----- STARTING TO CALCULATE IF CRCL IS AVAILABLE ------------------            
IF{[f rx nth ver Res-RES]("CR",1)^RE1,                                          
("Based on Cr: "_(RE1#"0,")_" on "_(RE1#"1,")_" @ "_(RE1#"2,"))^M1,             
IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. " "^M2;                               
(" ":27_"Previous Cr "_(RE2#"0,")_" on "_(RE2#"1,")_" @ "_(RE2#"2,"))^M2},      
IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. " "^M3;                               
(" ":39_(RE3#"0,")_" on "_(RE3#"1,")_" @ "_(RE3#"2,"))^M3},                     
(("Est. CrCl = ",CRCL," ml/min        "):26T_M1)^EST},                          
IF{49.999<CRCL 1,                                                               
"Since CrCl>50 ml/min, No need for dose adjustment"^DOSE;                       
(50>CRCL&(39.999<CRCL)) 1,                                                      

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 11
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"Suggested Dose: "_[q PHACRCL50]^DOSE;                                          
(40>CRCL&(29.999<CRCL)) 1,                                                      
"Suggested Dose: "_[q PHACRCL40]^DOSE;                                          
(30>CRCL&(19.999<CRCL)) 1,                                                      
"Suggested Dose: "_[q PHACRCL30]^DOSE;                                          
(20>CRCL&(9.999<CRCL)) 1,                                                       
"Suggested Dose: "_[q PHACRCL20]^DOSE;                                          
(10>CRCL&(CRCL'<0)) 1,                                                          
"Suggested: "_[q PHACRCL10]^DOSE;},                                             
[f rx win init],                                                                
[f rx win add](DOSE),                                                           
[f rx win add](EST),                                                            
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win add](BLANK),                                                          
[f rx win disp],1}};1}}};                                                       

--------------------------------------------------------------------------------------------
CRCL.BIPHO       RX                EVL MED               Biphosphate warning <30       
;This rule calculates the Estimated CrCL based on an ibw                        
IF{[f pt cur age]'>18 " ";                                                      
IF{[f rx calc]("CRCL")^CRCL_.=.;                                                
("Note: EST.CRCL=",CRCL," ml/min")^W1,                                          
"Since CrCl < 30 ml/min Avoid Use"^W2,                                          
IF{CRCL<30.4 [f rx win init],                                                   
[f rx win add](W1),                                                             
[f rx win add](W2),                                                             
[f rx win disp],1;                                                              
[f rx ok]}}};                                                                   

--------------------------------------------------------------------------------------------
CRCL.C.IBW       CALC              EVL MED               Est. CrCL Calc Rule - Use IBW 
""^XZ,                                                                          
IF{IF{[f rx last ver result]("CR")^SRCR_.=. XZ_"*Missing Cr  "^XZ},             
IF{[f pt sex]^SX_.=. XZ_"*Missing Sex  "^XZ},                                   
IF{[f pt oe ht cm]^HT_.=. XZ_"*Missing Ht  "^XZ},                               
IF{[f pt oe wt kgs]^WT_.=. XZ_"*Missing Wt  "^XZ},                              
IF{[f pt cur age]^AGE_.=. XZ_"*Missing Age"^XZ},XZ;                             
IF{SX="M" 50;45.5}^S,                                                           
IF{SX="M" 1;0.85}^F,                                                            
IF{SRCR<1.01 1.0^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:6D/(72*SRCR)*F):0D}^CRCL.ADJW;                                     

--------------------------------------------------------------------------------------------
CRCL.ENOX        RX                EVL MED               ENOXAPARIN WARNING <30        
;This rule calculates the Estimated CrCL based on an Adjusted body weight       
;ENOXAPRIN SPECIFIC                                                             
;< 30 ML - ? may need dosage adjustment                                         
""^A,                                                                           
IF{[f pt cur age]'>18 " ";                                                      
;IF{[f rx calc]("CRCL.ADJA")^CRCL_.=.;                                          

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 12
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f rx calc]("CRCL.C.IBW")^CRCL_.=.;                                          
("Note: EST.CRCL=",CRCL," ml/min")^W1,                                          
"Since CrCl < 30 - If dosing 1mg/kg - monitoring may be needed"^W,              
IF{CRCL<30.4 [f rx win init],                                                   
[f rx win add](W1),                                                             
[f rx win add](W),                                                              
[f rx win disp],1;                                                              
[f rx ok]}}};                                                                   

--------------------------------------------------------------------------------------------
CRCL.TEST        RX                EVL DOSE              Renal Fx Dosing -- ALL - DOSE 
;Modified from Herb's presentation at MUSE & Bruce Mathiase CrCl                
;This rule calculates the Estimated CrCL based on an Adjusted body weight       
;and pulls the appropriate text from the Drug CDS to display suggested dose     
;Set as global rule, only displays if all 5 crcl fields have data               
;** note: Check to see if a from a string. If so, displays.  If not             
;from string - another rule - in med displays.  This is done because if         
;only have at med, will not display if use string.                              
IF{[f z order.string.mn]_.=. 1;                                                 
IF{[q PHACRCL50]_.=.!([q PHACRCL40]_.=.)!([q PHACRCL30]_.=.) 1;                 
IF{[q PHACRCL20]_.=.!([q PHACRCL10]_.=.) 1;                                     
IF{([f z user mis office]="PHARMACY"!([f user]="HAB")) 1,                       
IF{[f pt cur age]<18 1;                                                         
;F{'[q PHACRCL50]&'[q PHACRCL40]&'[q PHACRCL30]&'[q PHACRCL20]&'[q PHACRCL50] 1;
("Pat. Data: Age: "_[f pt adm/ser age]_"  Sex:"_[f pt sex])^BLANK,              
;------ checking if weight exist - is so - displays ----------                  
IF{[f pt oe wt kgs]_.=. 1;                                                      
[f pt oe wt kgs]^KG,                                                            
("  Weight = ",(KG):0D,"kgs ("_((KG*2.2):0D),"lbs)")^KGLB,                      
BLANK_KGLB^BLANK},                                                              
;------------------------                                                       
;[f rx calc]("CRCL.ADJAR")^CRCL,                                                
[f rx calc]("CRCL.C.IBW")^CRCL,                                                 
IF{CRCL#0="*" 1,                                                                
[f rx win init],                                                                
[f rx win add]("Est. CrCl can not be calculated for the following reason(s)"),  
[f rx win add](CRCL),                                                           
IF{CRCL#9'="C" 1,                                                               
[f rx nth ver Res-RES]("CR",1)^RE1,                                             
("FYI Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^L1},          
[f rx win add](L1),                                                             
[f rx win add](BLANK),                                                          
[f rx win add](L2),                                                             
[f rx win disp],1;                                                              
;----- STARTING TO CALCULATE IF CRCL IS AVAILABLE ------------------            
IF{[f rx nth ver Res-RES]("CR",1)^RE1,                                          
("Based on Cr: "_(RE1#"0,")_" on "_(RE1#"1,")_" @ "_(RE1#"2,"))^M1,             
IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. " "^M2;                               
(" ":27_"Previous Cr "_(RE2#"0,")_" on "_(RE2#"1,")_" @ "_(RE2#"2,"))^M2},      
IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. " "^M3;                               
(" ":39_(RE3#"0,")_" on "_(RE3#"1,")_" @ "_(RE3#"2,"))^M3},                     
(("Est. CrCl = ",CRCL," ml/min        "):26T_M1)^EST},                          
IF{49.999<CRCL 1,                                                               
"Since CrCl>50 ml/min, No need for dose adjustment"^DOSE;                       
(50>CRCL&(39.999<CRCL)) 1,                                                      
"Suggested Dose: "_[q PHACRCL50]^DOSE;                                          
(40>CRCL&(29.999<CRCL)) 1,                                                      

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 13
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"Suggested Dose: "_[q PHACRCL40]^DOSE;                                          
(30>CRCL&(19.999<CRCL)) 1,                                                      
"Suggested: "_[q PHACRCL30]^DOSE;                                               
(20>CRCL&(9.999<CRCL)) 1,                                                       
"Suggested Dose: "_[q PHACRCL20]^DOSE;                                          
(10>CRCL&(CRCL'<0)) 1,                                                          
"Suggested Dose: "_[q PHACRCL10]^DOSE;},                                        
[f rx win init],                                                                
[f rx win add](DOSE),                                                           
[f rx win add](EST),                                                            
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win add](BLANK),                                                          
[f rx win disp],1}};1}}}};                                                      

--------------------------------------------------------------------------------------------
CRCL.VANC        RX                EVL DOSE              VANCOMYCIN                    
;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")^CL_.=.,                                                     
[f pt oe wt kgs]^WT,                                                            
((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);                                                                  
(45.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);                                                                  
(55.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);                                                                  
(65.4'<CL&(CL'<54.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]}}};                                                     

--------------------------------------------------------------------------------------------
CRCLT            CALC              EVL DOSE              EST. CREATININE CLEARANCE     
IF{IF{[f rx last ver result]("CR")^SRCR_.=.;                                    

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 14
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[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<1.01 1.0^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;                                                 

--------------------------------------------------------------------------------------------
CREA.VW.0        RX                EVL MED               WORKS RULE CRCL FOR VALUE(0 WT
IF{[f rx calc]("CRCL.0WT")^CRCL_.=.;                                            
("Est Creatinine Clearance (0 weight used) = ",CRCL," ml/min ")^X,              
[f rx msg](X)};                                                                 

--------------------------------------------------------------------------------------------
CREAVIEW         RX                EVL MED               WORKS WITH RULE CRCL FOR VALUE
IF{[f rx calc]("CRCL")^CRCL_.=.;                                                
("Creatinine Clearance = ",CRCL," ml/min ")^X,[f rx msg](X)};                   

--------------------------------------------------------------------------------------------
D70.MGKG         CALC              EVL MED               D70-MG/KG -CALC PORTION       
;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       RX                EVL DOSE              ML/DAY OF D70 TPN PATIENTS    
;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);                                                                  

--------------------------------------------------------------------------------------------
DIPY.BD          CALC              EVL DOSE              DIPYRIDAMOLE DOSE CHECKER     
;used for calculating if correct dose is in dipyridamole infus.                 
[f rx iv add dose]^DIPY.BD;                                                     

--------------------------------------------------------------------------------------------

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 15
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
DIPY.CC          CALC              EVL DOSE              DIPYRIDAMOLE CALC RULE        
;used for calculating if correct dose for dipyridamole                          
[f rx iv car vol]^DIPY.CC;                                                      

--------------------------------------------------------------------------------------------
DIPY.IMAG        RX                EVL MED               DIPYRIDAMOLE DOSE IMAGING     
;this rule calculates amount of dipyridamole IV which should be given           
;based on 0.57 mg/kg and total volume 30 ML                                     
IF{[f rx ord type]="SOI" [f rx ok];                                             
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 104.5kg, therefore, 60 mg dipyridamole, 18 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,         
IF{[f rx ord type]="SOI" [f rx ok];                                             
("CALCULATED DIPYRIDAMOLE DOSE ",Z," MG")^D,                                    
("NaCl needed = ",(30-(Z/5))," mls")^N,                                         
[f rx msg](D) [f rx msg](N)}}}};                                                

--------------------------------------------------------------------------------------------
DIPY.IMG         RX                EVL DOSE              DIPYRIDAMOLE DOSE IMAGING     
;this rule calculates amount of dipyridamole IV which should be given           
;based on 0.57 mg/kg and total volume 30 ML                                     
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 104.5kg, therefore, 60 mg dipyridamole, 18 ml NaCl 0.9%"^M,            
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*0.57):1D^Z,                                                   
IF{60.01'<Z Z^Y;60^Y},                                                          
(Y+0.1)^DH,                                                                     
(Y-0.1)^DL,                                                                     
IF{[f rx calc]("DIPY.BD")^BD_.=.;                                               
("Calc. Dipyridamole =",Y," - NOT",BD,"mg")^M,                                  
IF{(DH'<BD&(BD'<DL)) [f rx ok];                                                 
IF{BD_.=. [f rx ok];                                                            
[f rx err msg](M)}}}};                                                          

--------------------------------------------------------------------------------------------
DIPY.NS          RX                EVL DOSE              DIPYRIDAMOLE- NS VOLUME       
;this rule calculates amount of dipyridamole IV which should be given           
;based on 0.57 mg/kg and total volume 35 ml                                     
IF{([f rx ord type]'="SOI"!([f rx med]'="NS-25ML")) [f rx ok];                  
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
"Pt is > 104.5kg, therefore, 60 mg dipyridamole, 18 ml NaCl 0.9%"^M,            
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*0.57):1D^Z,                                                   
IF{60.01'<Z Z^Y;60^Y},                                                          
(30-(Y/5))^N,                                                                   
(N+0.1)^NH,                                                                     
(N-0.1)^NL,                                                                     
IF{[f rx calc]("DIPY.CC")^NS_.=.;                                               
IF{(NH'<NS&(NS'<NL)) [f rx ok];                                                 
("CALCULATED DIPYRIDAMOLE DOSE ",Y,"MG -- NS volume should be ",N,"MLS")^D,     
[f rx err msg](D)}}}};                                                          

--------------------------------------------------------------------------------------------
DIS.EMP          RX                EVL MED               STOPS ORDERS ON DISCHARGE EMP 
; this rule stops user from filling a med on a DIS RCR with location of emp.    
                                                                                

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 16
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
                                                                                
"Patient is no longer an employee, line feed med and exit profile"^E,           
IF{([f pt location]="EMP"&([f pt status]="DIS RCR")) [f rx err msg](E);1};      

--------------------------------------------------------------------------------------------
DNS              RX                EVL MED               Do NOT sell warning           
; 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         RX                EVL MED               Do NOT sell - STOP!!          
; 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]};                           

--------------------------------------------------------------------------------------------
DO.NOT.PRT       RX                EVL MED               DO NOT PRINT                  
[f z order.type.type]^TYPE,                                                     
"Do NOT - Repeat NOT print labels to PHIV - Update in Progress - OK?"^MES,      
"Thanks for NOT printing - We will get it updated as soon as possible"^MES2,    
"Please do not print - will ruin update process"^MES3,                          
IF{TYPE="I" 1,                                                                  
IF{[f rx yes/no](MES)=1 MES2;MES3};1};                                          

--------------------------------------------------------------------------------------------
DUP.DT.CUS       RX                EVL MED               Duplicate Drug Type (specific)
;Use the keyword to check if any active medication, class, generic, or drug     
;type component are on a patient's profile. Use the arguments "D"=Drug, "C"=    
;Class, "G"=Generic, and "T"=Drug Type.                                         
IF{[f user]'="HAB" 1;                                                           
[f z test.dup.dt]^PAT,                                                          
[f rx msg](PAT),1};                                                             
;[f z drug.type]^DT,                                                            
;[f rx msg](DT),                                                                
;"no dup"^DUP,                                                                  
;[f z test.dup.dt]^DUP,                                                         
;[f rx msg](" got through getting dup"),                                        
;[f rx msg](DUP),1};                                                            

--------------------------------------------------------------------------------------------
DUP.GEN          RX                EVL MED               Duplicate Generic Flag        
;Use the keyword to check if any active medication, class, generic, or drug     
;type component are on a patient's profile. Use the arguments "D"=Drug, "C"=    
;Class, "G"=Generic, and "T"=Drug Type.                                         
[f rx med generic]^CGEN,                                                        
[f rx active meds]("G",CGEN)^MED,                                               
IF{'MED 1;MED$8^MED2,                                                           
("Duplicate Generic: "_CGEN_" Rx# "_MED2_" OK?")^ASK,                           
IF{[f rx yes/no](ASK)=1 1;[f rx err msg]("Delete Mnemonic and DC other med")}}; 
;[f rx msg]("Duplicate Generic: "_CGEN_" Rx# "_MED2)};                          

--------------------------------------------------------------------------------------------
DUP.MNE.MR       RX                EVL MED               Dup Mnemonic - MRI            

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 17
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx win init],                                                                
[f z dup.mne.mri],                                                              
[f rx win disp],1;                                                              

--------------------------------------------------------------------------------------------
ED.DR.0ED        RX                EVL MED               FLAGS ED DR. IF ED is user    
IF{'[f z user.prv] 0^MD;1^MD},                                                  
[f pt dr mne]^DR,                                                               
IF{(DR="ED"&(MD=1)) 1,                                                          
"Please change the patient's doctor in the computer, now listed as 'ED'"^MES2,  
[f rx msg](MES2),1;1};                                                          

--------------------------------------------------------------------------------------------
ED.DR.0EDN       RX                EVL MED               FLAGS RX IF DR = ED - RX SPEC 
IF{[f rx doctor]'="ED" 1;                                                       
[f z user.prv] 1;                                                               
([f z user mis office]="PHARMACY"!([f user]="HAB")) 1,                          
[f pt admit dr mne]^AD,                                                         
[f pt er dr mne]^ED,                                                            
[f pt attend dr mne]^AT,                                                        
("Dr. ED Not Valid - Erase med - pick valid MD ")^M1,                           
("ED="_ED_" ADM="_AD_" ATT="_AT)^M2,                                            
[f rx err msg](M1_M2)};                                                         

--------------------------------------------------------------------------------------------
ED.DUP.MED       RX                EVL MED               ED - DUPLICATE MED            
IF{[f pt location]="ER"&([f pt status]="REG ER") 1,                             
IF{[f z user mis office]="INFO SYS"!([f z user mis office]="PHARMACY") 1,       
[f rx win init],                                                                
[f z chk.med.mnem.dup],                                                         
[f rx win disp],1;[f rx ok]};1};                                                

--------------------------------------------------------------------------------------------
ED.INP.ORD       RX                EVL MED               Requires INP order type on ED 
IF{[f pt status]'="REG ER" 1;                                                   
IF{[f rx pt type]="INP" 1;                                                      
IF{[f rx ord type]="TAKEHOME" 1;                                                
"RX for ER patient's should be INP order type. Erase med, back up one page"^MES,
"and use Right CTRL key to change Inp/Out/Dis Default to 'INP'"^MES2,           
[f rx err msg](MES),[f rx err msg](MES2)}}};                                    

--------------------------------------------------------------------------------------------
EMP.DIS          RX                EVL DOSE              EMPLOYEE, DISCHARGE FLAG (DOSE
;THIS RULE FLAGS THE RPH AT MED ENTRY PATIENT IS NO LONGER EMPLOYEED AND SHOULD 
; NOT GET MEDS                                                                  
"This patient is no longer an employee, we can not fill rxs for this patient"^W,
IF{[f pt location]'="EMP" [f rx ok];                                            
IF{[f pt status]'="DIS RCR" [f rx ok];[f rx err msg](W)}};                      

--------------------------------------------------------------------------------------------
EMP.DISM         RX                EVL MED               DS -EMPLOYEE, DISCHARGE FLAG  
;THIS RULE FLAGS THE RPH AT MED ENTRY PATIENT IS NO LONGER EMPLOYEED AND SHOULD 
; NOT GET MEDS                                                                  
"This account has been discharged is inactive, use active account"^W,           
IF{[f pt location]'="DS" [f rx ok];                                             
IF{[f pt status]'="DIS RCR" [f rx ok];[f rx err msg](W)}};                      


RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 18
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
--------------------------------------------------------------------------------------------
EMPDIS           RX                EVL MED               KDU- DISCHARGE                
;PREVENTS ENTERING ORDERS ON DISCHARGED KDU patients.                           
                                                                                
"New orders are not allowed on DISCHARGED Patients"^E,                          
"Contact Herb if an order actually needs to be entered"^E2,                     
IF{[f pt location]'="EMP" [f rx ok];                                            
IF{[f pt status]="DIS RCR" [f rx err msg](E),[f rx err msg](E2);1}};            

--------------------------------------------------------------------------------------------
ENOX             RX                EVL DOSE              ENOXAPARIN - Q12 DOSE         
;this rule flags user if enoxaprin dose (for 60, 80, 100s) is not within        
; 5 mg of pt weight (assuming 1 mg/kg - q12h)                                   
"Press F6 to return to MED field, Press the special funtion key (R-CTRL) and"^A,
"update the patient's weight by selecting #4 - Edit Patient Data"^B,            
IF{[f pt oe wt kgs]^WT_.=. [f rx msg](A),[f rx msg](B);                         
[f pt oe wt kgs]:0D^K,                                                          
[f rx dose]^D,                                                                  
;IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](C);                                       
;(50.4'<CRCL&(CRCL'<10.5)) [f rx msg](B);                                       
("Based on Patient's weight of",(K),"KG Q12H dose=",(K),"MG Q12 NOT",(D)," ")^W,
IF{((K+5)'<D&(D'<(K-5))) [f rx ok];                                             
[f rx msg](W);1}};                                                              

--------------------------------------------------------------------------------------------
ENOX.FL          RX                EVL FILE              ENOXAPARIN - Q12 DOSE         
;SAME AS ENOX- BUT FLAGS AT FILE                                                
;this rule flags user if enoxaprin dose (for 60, 80, 100s) is not within        
; 5 mg of pt weight (assuming 1 mg/kg - q12h)                                   
"Press F6 to return to MED field, Press the special funtion key (R-CTRL) and"^A,
"update the patient's weight by selecting #4 - Edit Patient Data"^B,            
IF{[f z user mis office]'=PHA 1;                                                
IF{[f pt oe wt kgs]^WT_.=. [f rx msg](A),[f rx msg](B);                         
[f pt oe wt kgs]:0D^K,                                                          
[f rx dose]^D,                                                                  
;IF{(10.4'<CRCL&(CRCL'<0)) [f rx msg](C);                                       
;(50.4'<CRCL&(CRCL'<10.5)) [f rx msg](B);                                       
("Based on Patient's weight of",(K),"KG Q12H dose=",(K),"MG Q12 NOT",(D)," ")^W,
IF{((K+5)'<D&(D'<(K-5))) [f rx ok];                                             
[f rx msg](W);1}}};                                                             

--------------------------------------------------------------------------------------------
EPID.GT.5        RX                EVL FILE              Epidural flag if > 0.5 ml/hr  
[f rx charge type]^CHG,                                                         
[f z rate.volume]^RATE,                                                         
IF{CHG="EPID"&(RATE>0.9) 1,                                                     
("Rate is > 0.9 ml/hr  ("_RATE_").  Is that correct?")^ASK,                     
IF{[f rx yes/no](ASK)=1 1;                                                      
[f rx err msg]("Please edit and adjust to desired rate")};1};                   

--------------------------------------------------------------------------------------------
EPO.DIAL         RX                EVL MED               EPO-DIALYSIS PATIENTS         
; THIS RULE WILL PREVENT PEOPLE FROM ORDERING OTHER MEDS THAN EPO 4,000 ON      
;DIALYSIS PATIENTS                                                              
                                                                                
"USE DRUG MNEMONIC ERYT-20M/1 OR ERYT-10000"^X,                                 
IF{[f pt location]="NP-KDU" [f rx err msg](X);[f rx ok]};                       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 19
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB

--------------------------------------------------------------------------------------------
EPO.DOS2MC       RX                EVL FILE              REST # SENT TO MATCH DOSE-MC  
;THIS RULE                                                                      
;WILL NOT ALLOW SOMEONE TO ENTER A INCORECT # TODISP/DOSE - SHOULD ALWAYS BE 1  
; LOOKS AT NUMBER TO DISPENSE VERUS DOSE.                                       
IF{[f pt location]'="NP-KDU" 1;                                                 
[f z.out.refill.num.dis]^N,                                                     
("For Dialysis patient's, quantity to dispense should always = 1, not,",(N))^E, 
IF{N=1 [f rx ok];                                                               
[f rx err msg](E)}};                                                            

--------------------------------------------------------------------------------------------
EPO.DOSE         RX                EVL FILE              RESTRICTS # SENT TO MATCH DOSE
;THIS RULE                                                                      
;WILL NOT ALLOW SOMEONE TO ENTER A INCORECT # TODISP/DOSE                       
;- THIS IS FOR 10,000 U/ML VIAL                                                 
; CHARGE = 9.605/10000                                                          
IF{[f pt location]="NP-KDU",                                                    
"PLEASE CHECK EPO DOSE VERSUS VIALS (QUANTITY TO DISPENSE !!)"^E,               
"OR CHECK TO MAKE SURE PRICE IN COMPUTER = 94.613/10,000 UNITS"^F,              
[f rx dose]^D,                                                                  
[f rx charge]}^DS,                                                              
(DS:6D/(D:2D/1000))^P,                                                          
IF{[f pt location]'="NP-KDU" [f rx ok];                                         
IF{(9.59<P&(P<9.62)) [f rx ok];[f rx err msg](E),[f rx err msg](F)}};           

--------------------------------------------------------------------------------------------
EPO.DOSE2        RX                EVL FILE              RESTRICTS # SENT TO MATCH DOSE
;                                                                               
;THIS RULE                                                                      
;WILL NOT ALLOW SOMEONE TO ENTER A INCORECT # TODISP/DOSE                       
;- THIS IS FOR 20,000 U/ML VIAL - CHARGE  10.134 (09/00)                        
IF{[f pt location]="NP-KDU",                                                    
"PLEASE CHECK EPO DOSE VERSUS VIALS (QUANTITY TO DISPENSE !!)"^E,               
"OR CHECK TO MAKE SURE PRICE IN COMPUTER = 199.635/VIAL"^F,                     
[f rx dose]^D,                                                                  
[f rx charge]}^DS,                                                              
(DS:4D/(D:2D/1000))^P,                                                          
IF{[f pt location]'="NP-KDU" [f rx ok];                                         
IF{(10.11<P&(P<10.16)) [f rx ok];[f rx err msg](E),[f rx err msg](F)}};         

--------------------------------------------------------------------------------------------
ER.MISC          RX                EVL FILE              ER MISC- CHARGE               
"Please remember to calculate correct charge via the Price Quote routine"^C1,   
"Calculated Charge must be filled in."^C2,                                      
IF{[f rx charge]="0.00" [f rx err msg](C1),[f rx err msg](C2);                  
[f rx ok]};                                                                     

--------------------------------------------------------------------------------------------
ER.STOP          RX                EVL STOP              user to put stop date in t+1  
[f rx stop date]^STOP,                                                          
[f rx msg]("NEXT IS STOP"),                                                     
[f rx msg](STOP);                                                               

--------------------------------------------------------------------------------------------
ERYT.DOSE        RX                EVL DOSE              EPO DOSE-SC OR IV             

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 20
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;This rule will stop users from using epo 20Mu/ml on dose <=10000               
IF{[f pt location]'="NP-KDU" [f rx ok];                                         
"Use mnemonic ERYT-MC-20 for doses > 10000 units on dialysis patients"^B,       
"Use mnemonic ERYT-MC-10 for doses  <= 10000 units on dialysis patients"^A,     
IF{([f rx dose]>10000&([f rx med]="ERYT-MC-10")) [f rx err msg](B);[f rx ok],   
IF{([f rx dose]<10001&([f rx med]="ERYT-MC-20")) [f rx err msg](A);[f rx ok]}}};

--------------------------------------------------------------------------------------------
ESMOL.LD         RX                EVL DOSE              ESMOLOL LOADING DOSE          
;this rule calculates amount of esmolol load which should be given              
;based on 500 mcg/kg                                                            
"Press F6 to return to MED field, Press the special funtion key (R-CTRL) and"^A,
"update the patient's weight by selecting #4 - Edit Patient Data"^B,            
IF{[f pt oe wt kgs]^WT_.=. [f rx msg](A),[f rx msg](B);                         
[f pt oe wt kgs]:1D^K,                                                          
("Based on Patient's weight of",(K),"KG  Loading dose = ",(K*.50:0D)," MG")^W,  
[f rx msg](W);1};                                                               

--------------------------------------------------------------------------------------------
GENT.DOSE        CALC              EVL DOSE              GENT IV ADDITIEV DSOSE        
IF{[f rx iv add dose]<10 [f rx iv add dose]^GENT.DOSE};                         

--------------------------------------------------------------------------------------------
HEP.10.DI        RX                EVL MED               HEPATITIS B VAC-10U/DIALYSIS  
;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       RX                EVL FILE              HEPAT.B VAC-STOPSIF NOT DIAL-M
;RULE PREVENTS USING ON DIALYSIS PATIENTS                                       
"Use the recombivax dialysis formulation 40 u for dialysis patients"^E,         
IF{[f pt location]'="NP-KDU" [f rx ok];[f rx err msg](E)};                      

--------------------------------------------------------------------------------------------
HEPA.B.TEC       RX                EVL MED               Hepatitis B - for Tech OT of T
;If user is a tech  - user access dictionary as a N at pharmacist prompt        
;requires order type for hepatitis B- Ped to be T                               
[f rx ord type]^OT,                                                             
[f z pharmacist]^ACC,                                                           
IF{ACC="N"&(OT'="T") 1,                                                         
"Pediatric Hepatitis B should be entered with an order type of T"^MES,          
[f rx err msg](MES);1};                                                         

--------------------------------------------------------------------------------------------
HOS.STATUS       RX                EVL MED               HOSPICE STATUS MUST BE REG RCR
;THIS IS TO CHECK - IF LOCATION IS NP-HOSPICE, PATIENT TYPE MUST BE             
;REG RCR                                                                        
IF{[f pt location]'="NP-HOSPICE" [f rx ok];                                     
"Hospice Scripts must be entered on an account with a status of REG RCR"^W,     
IF{[f pt status]="REG RCR" [f rx ok];[f rx err msg](W)}};                       

--------------------------------------------------------------------------------------------
INFL2            RX                EVL TXN               INFLUENZA MEDICARE            
;SENDS- MEDICARE BILLING # THROUGH FOR MEDICARE PATIENTS                        

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 21
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;"MESSAGE A-MEDICARE"^A,                                                        
;"MESSAGE B-NON MEDICARE"^B,                                                    
IF{[f rx calc]("MEDICARE")^MEDICARE_.=.;                                        
;IF{(MEDICARE=1) [f rx msg](A);                                                 
;[f rx msg](B)}};                                                               
IF{(MEDICARE=1) [f rx set billing code](16070625);                              
[f rx set billing code](16071318)}};                                            

--------------------------------------------------------------------------------------------
INFLUENZA        RX                EVL MED               INFLUENZA MEDICARE            
;SENDS- MEDICARE BILLING # THROUGH FOR MEDICARE PATIENTS                        
IF{[f rx calc]("MEDICARE")^MEDICARE_.=.;                                        
                                                                                
IF{(MEDICARE=1) [f rx set billing code](16070625);                              
[f rx set billing code](16071318)}};                                            

--------------------------------------------------------------------------------------------
INR              RX                EVL MED               DISPLAYS INR                  
IF{[f rx last ver result]("INR")^INR_.=.;                                       
("LAST INR = ",INR,"")^I,                                                       
[f rx msg](I)};                                                                 
;IF{[f rx nth ver Res-RES]("INR",1)^RE1_.=. 1;                                  
;[f rx nth ver Res-RES]("INR",2)^RE2,                                           
;[f rx nth ver Res-RES]("INR",3)^RE3,                                           
;("Last INR info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^M1,             
;IF{[f rx nth ver Res-RES]("INR",2)^RE2_.=. ""^M2;                              
;("Other INR info: "_(RE2#"0,")_" @"_(RE2#"1,")_" "_(RE2#"2,"))^M2,             
;IF{[f rx nth ver Res-RES]("INR",3)^RE3_.=. ""^M3;                              
;("                "_(RE3#"0,")_" @"_(RE3#"1,")_" "_(RE3#"2,"))^M3}},           
;[f rx win init],                                                               
;[f rx win add](M1),                                                            
;[f rx win add](M2),                                                            
;[f rx win add](M3),                                                            
;[f rx win disp],1};                                                            

--------------------------------------------------------------------------------------------
INR.IV           RX                EVL MED               DISPLAYS INR                  
IF{[f rx last ver result]("INR")^INR_.=.;                                       
("LAST INR = ",INR,"")^I,                                                       
[f rx msg](I)};                                                                 
;IF{[f rx nth ver Res-RES]("INR",1)^RE1_.=. 1;                                  
;[f rx nth ver Res-RES]("INR",2)^RE2,                                           
;[f rx nth ver Res-RES]("INR",3)^RE3,                                           
;("Last INR info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^M1,             
;IF{[f rx nth ver Res-RES]("INR",2)^RE2_.=. ""^M2;                              
;("Other INR info: "_(RE2#"0,")_" @"_(RE2#"1,")_" "_(RE2#"2,"))^M2,             
;IF{[f rx nth ver Res-RES]("INR",3)^RE3_.=. ""^M3;                              
;("                "_(RE3#"0,")_" @"_(RE3#"1,")_" "_(RE3#"2,"))^M3}},           
;[f rx win init],                                                               
;[f rx win add](M1),                                                            
;[f rx win add](M2),                                                            
;[f rx win add](M3),                                                            
;[f rx win disp],1};                                                            

--------------------------------------------------------------------------------------------
INSGLARG         RX                EVL MED               INSULIN GLARGINE - INJMDV -M  
IF{[f rx ord type]="M" [f rx set charge type]("INJMDV")},1;                     

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 22
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB

--------------------------------------------------------------------------------------------
INSUFEE          RX                EVL FILE              UD                            
"Insulin Fee needs to be charged - Dispense 1 fee"^A,                           
IF{[f z numb to dispense]="1" [f rx ok];[f rx err msg](A)};                     

--------------------------------------------------------------------------------------------
INVEN.STD        RX                EVL DOSE              INVENTORY STD.-CUSTOM FIELD   
;This rule looks at custom fields in the formuary and determines if the         
;med is stocked routinely.  If the order's inventory is u, all checking         
;should be stopped. If the order defaults to current location, and the check    
;for the standard is nill, a warning appears to the user.                       
IF{([f pt status]'="ADM IN"!([f rx ord type]'="M")) [f rx ok];                  
[f pt location]^PT,                                                             
[f rx inventory]^IN,                                                            
[f rx med]^M,                                                                   
IF{PT'=IN [f rx ok];                                                            
("Please note, although this med is currently stocked in ",(IN)," it was")^M1,  
"specifically loaded for another patient or order.  Please check the Pyxis"^M2, 
("Min and Max levels for med mnemonic^",(M)," in Pyxis location",(IN))^M3,      
IF{PT="2WEST" IF{[f z rx.inv.std.2w]="Y" 1;                                     
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="2EAST" IF{[f z rx.inv.std.2e]="Y" 1;                                     
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="OB" IF{[f z rx.inv.std.ob]="Y" 1;                                        
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="FC" IF{[f z rx.inv.std.fc]="Y" 1;                                        
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="ARU" IF{[f z rx.inv.std.aru]="Y" 1;                                      
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="SBU" IF{[f z rx.inv.std.sbu]="Y" 1;                                      
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1};                                                             
IF{PT="ICU" IF{[f z rx.inv.std.icu]="Y" 1;                                      

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 23
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win disp],1}}}}}}}}};[f rx msg]("Pyxis Std Inv not Checked")};            
;                                                                               
;[f rx msg](NS2)}}}}};                                                          
;                                                                               
;                                                                               
;IF{(PT="2WEST"&([f z rx.inv.std.2w]="Y")) 1;                                   
;IF{(PT="2WEST"&([f rx inventory]="2WEST")) [f rx msg](NS);[f rx ok]}}}};       
;--------                                                                       
;IF{(PT="2WEST"&([f z rx.inv.std.2w]'="Y"&([f rx inventory]="2WEST"))) 1,       
;[f rx msg](NS);                                                                
;IF{((PT="2EAST"&([f z rx.inv.std.2e]=""&([f rx inventory]="2EAST")))) 1,       
;[f rx msg](NS2);[f rx ok]}}}};                                                 

--------------------------------------------------------------------------------------------
IV               RX                EVL MED               EMP-CONTRACT charge code chg  
;5/26/99 - MEDITECH 4.7  NO CHARGE TYPE DEFAULT - CREATE RULE FOR ivS           
                                                                                
IF{[f pt location]="NP-KDU" [f rx ok];                                          
IF{[f rx ord type]="I" [f rx set charge type]("IV");[f rx ok]}};                

--------------------------------------------------------------------------------------------
KCL.ADD          RX                EVL MED               DISPLAYS KCL LEVEL            
IF{[f rx calc]("NS50")^NS50_.=.;                                                
[f rx msg](NS50),                                                               
IF{(NS>53) [f rx ok];                                                           
IF{(NS<48) [f rx ok];                                                           
IF{[f rx last ver result]("K")^K_.=.,                                           
("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]}}}}};                                          

--------------------------------------------------------------------------------------------
KCL.IV           RX                EVL MED               DISPLAYS KCL LEVEL            
IF{[f rx last ver result]("K")^K_.=.,                                           
("Last K+ Level = ",K," Since >=3  use ORAL route is possible")^A,              
"Oral dose= KDur or K-Lor 40 mEq x 1 dose-if need IV = KCL 10mEq X 2 doses"^A2, 
"Oral dose= Kdur or K-Lor 40 mEq q2h X 2 doses.If need IV = 10mEq x 3doses"^A3, 
"Oral dose= Kdur or K-Lor 40 mEq q2h X 3 doses.If need IV = 10mEq x 3doses"^A4, 
("Last K+ level = ",K," Since <3 - give KCL (IV) 1 hr/dose 10 mEq x 4 doses")^C,
("Last K+ level = ",K," Since <3 - give KCL (IV) 1 hr/dose 10 mEq x 5 doses")^D,
;IF{(3.85'<K&(K'<3.49)) [f rx win init],[f rx win add](A),[f rx win add](A2),   
IF{(3.65'<K&(K'<3.29)) [f rx win init],[f rx win add](A),[f rx win add](A2),    
[f rx win disp],1;                                                              
;(3.48'<K&(K'<3.29)) [f rx win init],[f rx win add](A),[f rx win add](A3),      
(3.28'<K&(K'<3.09)) [f rx win init],[f rx win add](A),[f rx win add](A3),       
[f rx win disp],1;                                                              
;(3.27'<K&(K'<2.99)) [f rx win init],[f rx win add](A),[f rx win add](A4),      
(3.07'<K&(K'<2.79)) [f rx win init],[f rx win add](A),[f rx win add](A4),       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 24
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx win disp],1;                                                              
;(2.94'<K&(K'<2.45)) [f rx msg](C);                                             
(2.74'<K&(K'<2.25)) [f rx msg](C);                                              
;(K<2.44) [f rx msg](D);[f rx ok]}};                                            
(K<2.24) [f rx msg](D);[f rx ok]}};                                             

--------------------------------------------------------------------------------------------
KCL.IV3          RX                EVL DOSE              DISPLAYS KCL LEVEL            
""^MG^K^MGD^MGO^MM^K1^K2,                                                       
; - ADDED DUE TO BUG  - WHICH STARTS LAB LOOKUP IF ENTERED BY IV STRING         
; - STARTED IF USE - f rx nth ver...                                            
IF{[f rx med]_.=. 1,                                                            
[f rx last ver result]("MG")^MG,                                                
[f rx last ver result]("K")^KC;                                                 
; -  NED OF 3 LINES.  To further complete - put } after KC two lines below,     
[f rx nth ver Res-RES]("MG",1)^MG,                                              
[f rx nth ver Res-RES]("K",1)^KC},                                              
IF{MG_.=. "If for KCL Replacement Protocol:Mag Level not done, please order"^MM;
KC#"0,"^KCL,KC#"1,"^KCD,KC#"2,"^KCT,                                            
MG#"0,"^MGL,MG#"1,"^MGD,MG#"2,"^MGT,                                            
[f z mg.days.old]^MGO,                                                          
IF{MGO>1 "Last MG = "_MGL_" on "_MGD_". Since > 24 hours, redo level"^MM;       
MGL>1.55 "Mg Level OK ("_MGL_" on "_MGD_")"^MM;                                 
MGL>1.25&(MGL<1.55) 1,                                                          
"Last Mg ("_MGL_" on "_MGD_") Dose: 2 g in D5W 50ml over 2 hrs x 1"^MM;         
MGL<1.25 1,                                                                     
"Last Mg ("_MGL_" on "_MGD_") Dose: 4 g in D5W 50ml over 4 hrs x 1"^MM},        
IF{KCL>3.6 "Last K is "_KCL_" since > 3.6, protocol not indicated"^K1,          
" "^K2;                                                                         
KCL>3.25&(KCL<3.65) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq x 1 dose"^K1,          
"IV is KCl 10 mEq over 1 hour x 2 doses (20 mEq total)"^K2;                     
KCL>3.05&(KCL<3.25) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq Q2H X 2 doses"^K1,     
"IV is KCl 10 mEq over 1 hour x 3 doses (30 mEq total)"^K2;                     
KCL>2.75&(KCL<3.05) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq Q2H X 3 doses"^K1,     
"IV is KCl 10 mEq over 1 hour x 3 doses (30 mEq total)"^K2;                     
KCL>2.25&(KCL<2.85) "Since K is < 2.8 ("_KCL_"), Use IV therapy"^K1,            
"KCl 10 mEq IV over 1 hour x 4 doses (40 mEq total)"^K2;                        
KCL<2.25 "Since K is < 2.3 ("_KCL_"),"^K1,                                      
"KCL 10 mEq IV over 1 hour x 5 doses (50 mEq total)"^K2},                       
"Below info if using KCl per Replacement Protocol"^INIT,                        
[f rx win init],                                                                
[f rx win add](INIT),                                                           
[f rx win add](MM),                                                             
[f rx win add](K1),                                                             
[f rx win add](K2),                                                             
[f rx win disp],[f rx ok],1,                                                    
[f rx set rx comment](INIT_" "_MM_" "_K1_" "_K2),1};                            

--------------------------------------------------------------------------------------------
KCL.IV4          RX                EVL DOSE              DISPLAYS KCL LEVEL            
""^MG^K^MGD^MGO^MM^K1^K2,                                                       
;IF{[f rx med]_.=. 1,                                                           
;[f rx last ver result]("MG")^MG,                                               
;[f rx last ver result]("K")^KC;                                                

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 25
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
; -  NED OF 3 LINES.  To further complete - put } after KC two lines below,     
[f rx nth ver Res-RES]("MG",1)^MG,                                              
[f rx nth ver Res-RES]("K",1)^KC,                                               
;IF{'KC&'MG [f rx msg]("K & MG Not Available - Manually Check");                
IF{KC_.=. "K Not Available"^MM},                                                
IF{MG_.=. MM_" If for KCL Repl: Mag not done, please order "^MM},               
IF{MG_.=.&(KC_.=.) 1;KC#"0,"^KCL,KC#"1,"^KCD,KC#"2,"^KCT,                       
"Last K:"_" "_KCL_" on "_KCD_" "_KCT_"."_MM^MM;1},                              
IF{KC_.=.!(MG_.=.) 1;                                                           
KC#"0,"^KCL,KC#"1,"^KCD,KC#"2,"^KCT,                                            
MG#"0,"^MGL,MG#"1,"^MGD,MG#"2,"^MGT,                                            
[f z mg.days.old]^MGO,                                                          
IF{MGO>1 "Last MG = "_MGL_" on "_MGD_". Since > 24 hours, redo level"^MM;       
MGL>1.55 "Mg Level OK ("_MGL_" on "_MGD_")"^MM;                                 
MGL>1.25&(MGL<1.55) 1,                                                          
"Last Mg ("_MGL_" on "_MGD_") Dose: 2 g in D5W 50ml over 2 hrs x 1"^MM;         
MGL<1.25 1,                                                                     
"Last Mg ("_MGL_" on "_MGD_") Dose: 4 g in D5W 50ml over 4 hrs x 1"^MM},        
IF{KCL>3.6 "Last K is "_KCL_" since > 3.6, protocol not indicated"^K1,          
" "^K2;                                                                         
KCL>3.25&(KCL<3.65) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq x 1 dose"^K1,          
"IV is KCl 10 mEq over 1 hour x 2 doses (20 mEq total)"^K2;                     
KCL>3.05&(KCL<3.25) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq Q2H X 2 doses"^K1,     
"IV is KCl 10 mEq over 1 hour x 3 doses (30 mEq total)"^K2;                     
KCL>2.75&(KCL<3.05) 1,                                                          
"Oral Protocol for K+ of "_KCL_" is K-Lor or KDur 40 mEq Q2H X 3 doses"^K1,     
"IV is KCl 10 mEq over 1 hour x 3 doses (30 mEq total)"^K2;                     
KCL>2.25&(KCL<2.85) "Since K is < 2.8 ("_KCL_"), Use IV therapy"^K1,            
"KCl 10 mEq IV over 1 hour x 4 doses (40 mEq total)"^K2;                        
KCL<2.25 "Since K is < 2.3 ("_KCL_"),"^K1,                                      
"KCL 10 mEq IV over 1 hour x 5 doses (50 mEq total)"^K2}},                      
"Below info if using KCl per Replacement Protocol"^INIT,                        
;[f rx msg]("At Win Init"),                                                     
[f rx win init],                                                                
[f rx win add](INIT),                                                           
[f rx win add](MM),                                                             
[f rx win add](K1),                                                             
[f rx win add](K2),                                                             
[f rx win disp],[f rx ok],1,                                                    
[f rx set rx comment](INIT_" "_MM_" "_K1_" "_K2),1;                             

--------------------------------------------------------------------------------------------
KDUDISCH         RX                EVL MED               KDU- DISCHARGE                
;PREVENTS ENTERING ORDERS ON DISCHARGED KDU patients.                           
                                                                                
"New orders are not allowed on DISCHARGED KDU patients"^E,                      
"Contact Herb if an order actually needs to be entered"^E2,                     
IF{[f pt location]'="NP-KDU" [f rx ok];                                         
IF{[f pt status]="DIS RCR" [f rx err msg](E),[f rx err msg](E2);1}};            

--------------------------------------------------------------------------------------------
LAB.MULT         RX                EVL DOSE              DISPLAYS MULTIPLE LAB         
IF{[f rx nth ver Res-RES]("CR",1)^RE1_.=. 1;                                    
[f rx nth ver Res-RES]("CR",2)^RE2,                                             
[f rx nth ver Res-RES]("CR",3)^RE3,                                             

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 26
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
("Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^M1,               
IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. ""^M2;                                
("Other Cr info: "_(RE2#"0,")_" @"_(RE2#"1,")_" "_(RE2#"2,"))^M2,               
IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. ""^M3;                                
("               "_(RE3#"0,")_" @"_(RE3#"1,")_" "_(RE3#"2,"))^M3}},             
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](M3),                                                             
[f rx win add]("this is line #4"),                                              
[f rx win add]("this is line #5"),                                              
[f rx win disp],1};                                                             

--------------------------------------------------------------------------------------------
LAB.MULT2        RX                EVL MED               DISPLAYS MULTIPLE LAB TRY 2   
[f rx nth ver Res-RES]("CR",1)^RE1,                                             
("Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^MES,              
[f rx msg](MES);                                                                
;                                                                               
;IF{[f rx nth ver Res-RES]("CR",1)^RE1_.=. 1;                                   
;[f rx nth ver Res-RES]("CR",2)^RE2,                                            
;[f rx nth ver Res-RES]("CR",3)^RE3,                                            
;("Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^M1,              
;IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. ""^M2;                               
;("Other Cr info: "_(RE2#"0,")_" @"_(RE2#"1,")_" "_(RE2#"2,"))^M2,              
;IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. ""^M3;                               
;("               "_(RE3#"0,")_" @"_(RE3#"1,")_" "_(RE3#"2,"))^M3}},            
;[f rx win init],                                                               
;[f rx win add](M1),                                                            
;[f rx win add](M2),                                                            
;[f rx win add](M3),                                                            
;[f rx win add]("this is line #4"),                                             
;[f rx win add]("this is line #5"),                                             
;[f rx win disp],1};                                                            

--------------------------------------------------------------------------------------------
LEVA.RTE         RX                EVL FILE              LEVAQUIN RATE -MUST BE 100    
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Levofloxacin should not exceed 100 ml/hr"^B,                          
IF{CIPRRATE>110 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
LEVOF.LT18       RX                EVL MED               Levaquin flag if < 18         
[f z patient age in yrs]^AGE,                                                   
IF{AGE>18 1;                                                                    
"Pat. is <18 yo - Levofloxacin is NOT approved in this patient. Continue"^MES,  
IF{[f rx yes/no](MES)=1 1;                                                      
[f rx med]^MED,                                                                 
[f rx err msg]("Delete "_MED_", Order will not File if mnemonic exists")}};     

--------------------------------------------------------------------------------------------
MAGNESIUM        RX                EVL MED               DISPLAYS MAG LEVEL            
IF{[f rx last ver result]("MG")^MG_.=.,                                         
("MG = ",MG," mg/dL, protocol= 2 g (16.24 mEq in 50 ml D5W over 2 hour")^E,     
("MG = ",MG," mg/dL, protocol= 4 g (32.48 mEq in 50 ml D5W over 4 hours")^F,    
("MG = ",MG," mg/dL, Since >= 1.6, MG OK, does NOT need replacement")^G,        
"Mg Level NOT done, please check MG if K+ is per protocol"^H,                   

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 27
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;IF{(1.85'<MG&(MG'<1.49)) [f rx msg](E);                                        
IF{(1.55'<MG&(MG'<1.29)) [f rx msg](E);                                         
;(MG<1.49) [f rx msg](F);[f rx msg](H);[f rx msg](G)}};                         
(MG<1.29) [f rx msg](F);[f rx msg](H);[f rx msg](G)}};                          

--------------------------------------------------------------------------------------------
MAXZ.25.IN       RX                EVL DOSE              MAXZIDED 25 - ONLY USE FOR 1/2
;rule is to flag user from entering a dose of maxzide 25 if dose if full        
;1/2 tabs ok, if one full tab - should use dyazide                              
IF{[f pt status]$3^ADM'="ADM" 1;                                                
IF{[f rx dose]<0.6 1;                                                           
"Use Dyazide 1 cap for 1 Maxzide 25, Use Dyazide 2 caps for Maxzide 75/50"^M1,  
"Save Maxzide 25 for use when dose is 0.5 tab"^M2,                              
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win disp],1}};                                                            

--------------------------------------------------------------------------------------------
MC.DISP1         RX                EVL FILE              MERIT CARE- REQUIRES 1TO DISP 
;this rule will only allow 1 dose to be dispensed                               
[f z.out.refill.num.dis]^P,                                                     
("When using Merit Care Products - (QTY to dispense) should be 1, NOT ",(P))^N, 
IF{P=1 [f rx ok];[f rx err msg](N)};                                            

--------------------------------------------------------------------------------------------
MC.KDU           RX                EVL MED               MERIT CARE-DIALYSIS MEDS      
;this rule will not allow any med which it is attached on to be used on any     
;patient unless they are in "NP-KDU" as a location.                             
"This is a med is supplied by Merit Care for use during Dialysis only"^R,       
IF{[f pt location]="NP-KDU" [f rx ok];[f rx err msg](R)};                       

--------------------------------------------------------------------------------------------
MC.KDU.RES       RX                EVL MED               MC-MED- RESTRICT USINGON NP-KD
;this rule will not allow any med which it is attached on to be used on any     
;PATINET IN NP-KDU                                                              
"This is a med is supplied by Merit Care use appropriate Meric Care mnemonic"^R,
IF{[f pt location]'="NP-KDU" [f rx ok];[f rx err msg](R)};                      

--------------------------------------------------------------------------------------------
MC.NOCALC        RX                EVL FILE              MERIT CARE- REQUIRES NO CHARGE
;this rule will not allow any med which it is attached on to have any charges   
;associated with the med                                                        
"This is a med is supplied by Merit Care for Dialysis Pat. only- NO CHARGE1"^R, 
IF{[f rx charge]<0.01 [f rx ok];[f rx err msg](R)};                             

--------------------------------------------------------------------------------------------
MC2              CALC              EVL FILE              MEDICARE IDENT                
;test ops                                                                       
IF{[f pt ins1 name]="MEDICARE                Z" 3^A;0^A},                       
IF{[f pt ins1 name]="MEDICARE/MA             Z" 3^B;0^B},                       
IF{[f pt ins1 name]="MEDICARE/B" 3^C;0^C},                                      
IF{[f pt ins1 name]="MEDICARE-HMO" 3^I;0^I},                                    
IF{[f pt status]="REG SDC" 2^D;0^D},                                            
IF{[f pt status]="REG ER" 2^E;0^E},                                             
IF{[f pt status]="REG RCR" 2^F;0^F},                                            
IF{[f pt status]="DEP ER" 2^G;0^G},                                             

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 28
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f pt status]="DEP SDC" 2^H;0^H},                                            
A+B+C+D+E+F+G+H+I^P,                                                            
IF{P>4 1^MC2;0^MC2};                                                            

--------------------------------------------------------------------------------------------
MC2TAKEH         CALC              EVL FILE              MEDICARE IDENT - FOR TAKHOME  
IF{[f pt ins1 name]="MEDICARE                Z" 3^A;0^A},                       
IF{[f pt ins1 name]="MEDICARE/MA             Z" 3^B;0^B},                       
IF{[f pt ins1 name]="MEDICARE/B" 3^C;0^C},                                      
A+B+C^P,                                                                        
IF{P>2 1^MC2TAKEH;0^MC2TAKEH};                                                  

--------------------------------------------------------------------------------------------
MEDICARE         CALC              EVL FILE              MEDICARE IDENTIFIER-          
;USED IN INFLUENZA IDENTIFIER - NOTE  ALSO NEED TO MODIFY MC2 IF UPDATING       
;  ON 4/18/01 - ADDED MEDICARE-HMO                                              
IF{[f pt ins1 name]="MEDICARE                Z" 3^A;0^A},                       
IF{[f pt ins1 name]="MEDICARE/MA             Z" 3^B;0^B},                       
IF{[f pt ins1 name]="MEDICARE/B" 3^C;0^C},                                      
IF{[f pt ins2 name]="MEDICARE                Z" 3^D;0^D},                       
IF{[f pt ins2 name]="MEDICARE/MA             Z" 3^E;0^E},                       
IF{[f pt ins2 name]="MEDICARE/B" 3^F;0^F},                                      
IF{[f pt ins2 name]="MEDICARE-HMO" 3^G;0^G},                                    
IF{[f pt ins1 name]="MEDICARE-HMO" 3^H;0^H},                                    
A+B+C+D+E+F+G+H^P,                                                              
IF{P>2 1^MEDICARE;0^MEDICARE};                                                  

--------------------------------------------------------------------------------------------
MEDICBLK         RX                EVL MED               CHG CHG TYPE TO NC FOR MEDICAR
;Rule written Herb Bromenshenkel 12/98 - uses calc rule of MC2.  MC2 determines 
; if patient is an outpatient and medicare.  If outpatient and medicare, blocks 
; charges except for those charge rules listed below                            
; will only work on M order types                                               
"M IS smaller THAN 2"^W,                                                        
"NC"^P,                                                                         
[f z out dft chg type]^O,                                                       
IF{([f rx ord type]'="M"&([f rx ord type]'="T")) [f rx ok];                     
IF{[f z out dft chg type]="PO" 3^A;0^A},                                        
IF{[f z out dft chg type]="NARCPO" 3^B;0^B},                                    
IF{[f z out dft chg type]="EENT" 3^C;0^C},                                      
IF{[f z out dft chg type]="INH" 3^D;0^D},                                       
IF{[f z out dft chg type]="LIQ" 3^E;0^E},                                       
IF{[f z out dft chg type]="LIQ-OTC" 3^F;0^F},                                   
IF{[f z out dft chg type]="MP-ORAL" 3^G;0^G},                                   
IF{[f z out dft chg type]="MP-NARCS" 3^H;0^H},                                  
IF{[f z out dft chg type]="KAYEX" 3^J;0^J},                                     
IF{[f z out dft chg type]="MORP-LIQ" 3^K;0^K},                                  
IF{[f z out dft chg type]="INJCMS" 3^K;0^K},                                    
A+B+C+D+E+F+G+H+J+K+L^M,                                                        
IF{M'>2 [f rx ok];                                                              
IF{[f rx calc]("MC2")^MC2_.=.;                                                  
IF{(MC2=1) [f rx set charge type](P);1}}}};                                     
;[f rx set charge type](O);                                                     

--------------------------------------------------------------------------------------------
METFO.RNL        RX                EVL MED               METFORMIN RENAL               
;THIS FLAGS THE FOLLOWING                                                       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 29
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;a) Pt < 80 but elevated Cr. = "Patient's creatinine elevated..... "            
;b) Pt > 80 & elevated Cr. =" Pat > 80 AND Cr elevated .....                    
;c) Pt > 80 and normal Cr. -                                                    
;                                                                               
[f z patient age in yrs]^AGE,                                                   
IF{[f rx last ver result]("CR")^CR_.=.,                                         
("Pt's last Cr = ",CR," since >1.4 and older than 80 use with caution")^OLDH,   
("Pt's last Cr = ",CR," since >1.4 use with caution")^HIGH,                     
("Pt is >79 yo - Last Cr ",CR," Since <1.5 - OK, but monitor renal report")^OLD,
IF{(CR>1.49&(AGE>79)) [f rx msg](OLDH);                                         
(CR>1.49) [f rx msg](HIGH);                                                     
(AGE>79) [f rx msg](OLD);1}};                                                   

--------------------------------------------------------------------------------------------
METH.NS.B        RX                EVL DOSE              METHYLPRED-SPINAL-NS VOL      
;this rule calculates amount of Methylprednisilone to give for spinal cord      
;injury.  Dose: 5.4 mg/kg/hr* 8 HR(43.2MG)  , bolus = 30 mg /kg                 
IF{([f rx ord type]'="SOI"!([f rx med]'="NS-100ML")) [f rx ok];                 
"Line fee dose, go to CARRIER, then special funtion key & update Weight"^A,     
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*30):0D^B,                                                     
(B:4D/125:0D)^BV,                                                               
(100-BV)^DB,(DB-0.5)^DBL,(DB+0.5)^DBH,                                          
("Bolus=Withdraw",BV,"ml from 100 ml NS, NS volume should be",DB,"mls")^BM2,    
IF{[f rx calc]("METHYL.CC")^BVR_.=.;                                            
IF{(DBH'<BVR&(BVR'<DBL)) [f rx ok];                                             
[f rx err msg](BM2)}}}};                                                        

--------------------------------------------------------------------------------------------
METH.NS.I        RX                EVL DOSE              METHYLPRED-SPINAL-NS VOL-INFUS
;this rule calculates amount of Methylprednisilone to give for spinal cord      
;injury.  Dose: 5.4 mg/kg/hr* 11.5 HR(62.1MG)  , bolus = 30 mg /kg              
IF{([f rx ord type]'="SOI"!([f rx med]'="NS-150 ML")) [f rx ok];                
"Line fee dose, go to CARRIER, then special funtion key & update Weight"^A,     
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*62.1):0D^I,                                                   
(I:4D/125:0D)^IV,                                                               
(150-IV)^IB,(IB-1)^IBL,(IB+1)^IBH,                                              
("Infus.=Withdraw",IV,"ml from 150 ml NS, NS volume should be",IB,"mls")^BM2,   
IF{[f rx calc]("METHYL.CC")^IVR_.=.;                                            
IF{(IBH'<IVR&(IVR'<IBL)) [f rx ok];                                             
[f rx err msg](BM2)}}}};                                                        

--------------------------------------------------------------------------------------------
METHY.ID         RX                EVL DOSE              METHYLPRED SPINAL CORD-INFUSIO
;this rule calculates amount of Methylprednisilone to give for spinal cord      
;injury.  Dose: 5.4 mg/kg/hr* 11.5 HR(62.12MG)  , bolus = 30 mg /kg             
"THIS MIGHT WORK"^A,                                                            
IF{[f rx ord type]'="SOI" [f rx ok];                                            
IF{[f rx calc]("METHYL.VL")^VL_.=.,                                             
IF{VL'="13 MLS/HR" [f rx ok];                                                   
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*62.1):0D^ID,                                                  
(ID*0.98):0D^ILD,                                                               
(ID*1.02):0D^IHD,                                                               
("Calc. Infus. methylpred dose =",ID,"mg  2% Range=",ILD,"mg - ",IHD,"mg")^BM1, 

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 30
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f rx calc]("METHYL.BD")^RD_.=.,                                             
IF{(IHD'<RD&(RD'<ILD)) [f rx ok];                                               
IF{RD_.=. [f rx ok];                                                            
[f rx err msg](BM1)}}}}}}};                                                     

--------------------------------------------------------------------------------------------
METHYL.BD        CALC              EVL DOSE              METHYLPRED BOLUS CALC RULE    
;used for calculating if correct dose is in methylpred dose rules               
[f rx iv add dose]^METHYL.BD;                                                   

--------------------------------------------------------------------------------------------
METHYL.CC        CALC              EVL DOSE              METHYLPRED CARRIER CALC RULE  
;used for calculating if correct dose is in methylpred dose rules               
[f rx iv car vol]^METHYL.CC;                                                    

--------------------------------------------------------------------------------------------
METHYL.VL        CALC              EVL DOSE              METHYLPRED BAG DETERMINER     
;Determines bag in iv - figure out which solumedrol dose is needed(BY RATE)     
[f rx iv rate]^METHYL.VL;                                                       

--------------------------------------------------------------------------------------------
METHYLPRED       RX                EVL DOSE              METHYLPRED SPINAL CORD-BOLUS  
;this rule calculates amount of Methylprednisilone to give for spinal cord      
;injury.  Dose: 5.4 mg/kg/hr* 8 HR(43.2MG)  , bolus = 30 mg /kg                 
"THIS MIGHT WORK"^A,                                                            
IF{[f rx ord type]'="SOI" [f rx ok];                                            
IF{[f rx calc]("METHYL.VL")^VL_.=.,                                             
IF{VL'="400 MLS/HR" [f rx ok];                                                  
"LINE FEED THE ADDITIVE MED, PRESS SPECIAL FUNCTION KEY & UPDATE WT"^A,         
IF{[f pt oe wt kgs]^WT_.=. [f rx err msg](A);                                   
([f pt oe wt kgs]*30):0D^BD,                                                    
(BD*0.98):0D^BLD,                                                               
(BD*1.02):0D^BHD,                                                               
("Calc. Bolus methylpred dose =",BD,"mg  2% Range=",BLD,"mg - ",BHD,"mg")^BM1,  
IF{[f rx calc]("METHYL.BD")^RD_.=.,                                             
IF{(BHD'<RD&(RD'<BLD)) [f rx ok];                                               
IF{RD_.=. [f rx ok];                                                            
[f rx err msg](BM1)}}}}}}};                                                     

--------------------------------------------------------------------------------------------
METR.RTE         RX                EVL FILE              ZOSYNCIPRO RATE -MUST BE 100  
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Metronidazole should not exceed 120 ml/hr"^B,                         
IF{CIPRRATE>120 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
MG.TNA.STP       RX                EVL MED               Prevent MG for POM for TNA    
;attached to med used in PHA STRINGS for pom.  Do not want to use in TNA        
[f rx ord type]^OT,                                                             
IF{OT="TNA" 1,                                                                  
"Use Magnesium meassured in MEQ for TNAs"^MES,                                  
[f rx err msg](MES);1};                                                         

--------------------------------------------------------------------------------------------
MISS.COST        RX                EVL MED               Stops user if zero cost med   
;Stops user if med has nil for cost & has an AWP                                
IF{([f z user mis office]="PHARMACY"!([f user]="HAB")) 1,                       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 31
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f z med cost]^COST,                                                            
[f z med awp]^AWP,                                                              
IF{AWP>0.01&'COST 1,                                                            
"Please update cost - cost is not entered"^MES,                                 
[f rx err msg](MES);1};1};                                                      

--------------------------------------------------------------------------------------------
NDC.NUMB         RX                EVL MED               NDC NUMBER FLAG               
;test ndc #                                                                     
IF{[f rx ord type]'="TAKEHOME" [f rx ok];                                       
[f z drug ndc numb]^N,                                                          
("NDC=",(N),"   If blank - Please update on top of page 2 in formulary")^M,     
[f rx msg](M)};                                                                 

--------------------------------------------------------------------------------------------
NP.KDU.ZR        RX                EVL MED               NP-KDU - BLOCK PATIENTS       
IF{[f pt location]="NP-KDU" [f rx err msg]("Do not use NP-KDU account");1};     

--------------------------------------------------------------------------------------------
NP.SET.CHG       RX                EVL MED               Set Charge for Neilson Place  
[f pt location]^LOC,                                                            
IF{"NPR-PHA"'=LOC 1;                                                            
[f z order.type.type]^OTT,                                                      
;[f rx msg](OTT),                                                               
IF{[f z order.type.type]="M" "NEILSON IM"^XXX,[f rx set charge type](XXX);      
[f z order.type.type]="I" "NEILSON IV"^XXX,[f rx set charge type](XXX);1}};     

--------------------------------------------------------------------------------------------
NS50             CALC              EVL MED               NORMAL SALINE 50 ML CALC      
;used to determine if KCL.ADD should flag                                       
[f rx iv car vol]^NS50;                                                         

--------------------------------------------------------------------------------------------
OAD              RX                EVL DOSE              ONCE A DAY DOSING             
[f rx calc]("ADBW")^BW_.=.,                                                     
[f rx calc]("CRCL.ADJW")^CL_.=.,                                                
BW/1:1D^DW,                                                                     
CL/1:1D^C,                                                                      
("Pt's Dosing weight = ",(DW),"kg - 2mg/kg =",(BW*2:0D),"MG")^DW1,              
"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.44'<CL&(CL'<29.5)) 1,                                                    
("CrCl=",(C),"CrCl 30-40 = 2.5mg/kg, DW=",(DW),"kg =",(BW*2.5:0D),"MG Q24H")^D, 
[f rx msg](D);                                                                  
(60.4'<CL&(CL'<40.45)) 1,                                                       
("CrCl=",(C),"CrCl 40-60 = 3.5mg/kg, DW=",(DW),"kg =",(BW*3.5:0D),"MG Q24H")^D, 
[f rx msg](D);                                                                  
(80.4'<CL&(CL'<60.5)) 1,                                                        
("CrCl=",(C),"CrCl 60-80 = 4 mg/kg, DW=",(DW),"kg =",(BW*4:0D),"MG Q24H")^D,    
[f rx msg](D);                                                                  
(99.4'<CL&(CL'<80.5)) 1,                                                        
("CrCl=",(C),"CrCl 80-99 = 5 mg/kg, DW=",(DW),"kg =",(BW*5:0D),"MG Q24H")^D,    
[f rx msg](D);                                                                  
(120.4'<CL&(CL'<99.5)) 1,                                                       
("CrCl=",(C),"CrCl 100-120 = 6 mg/kg, DW=",(DW),"kg =",(BW*6:0D),"MG Q24H")^D,  
[f rx msg](D);                                                                  

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 32
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(120.5'>CL!(CL'>29.4)) [f rx msg](E),[f rx msg](DW1)};[f rx msg](E)};           

--------------------------------------------------------------------------------------------
ONCE             RX                EVL FILE              STOP USER FROM USING ONCE     
;THIS RULE WILL NOT ALLOW USER TO USE ONCE FOR SIG                              
"Do not use sig ONCE - something wrong with pyxis procar - starting 1/1/01"^A,  
"           Rx Inventory must be P in order for ONCE sig to work"^B,            
""^C,                                                                           
IF{[f pt status]'=("ADM IN"!([f pt status]'="ADM INo")) [f rx ok];              
IF{[f rx inventory]="P" [f rx ok];                                              
IF{[f rx sig]="ONCE" 1,                                                         
[f rx win init],[f rx win add](A),[f rx win add](B),                            
[f rx win disp];1}}};                                                           
; [f rx err msg](A);[f rx ok]}}};                                               

--------------------------------------------------------------------------------------------
ORD.CHG          RX                EVL MED               ORD.CHG - Restrict            
;ORDER TYPE MUST BE OC                                                          
"order type must be OC"^MES,                                                    
IF{[f rx ord type]="OC" [f rx ok];                                              
[f rx err msg](MES)};                                                           

--------------------------------------------------------------------------------------------
PED.AZTREO       RX                EVL MED               PED ATBX - AZTREONAM          
"INFO FROM Harriet lane handbook 15th edition - page 642"^SO,                   
;dose - 90 - 120 MG/KG/DAY - divided q6 -8 hrs                                  
;cystic fibrosis 150 - 200 mg/kg/24 q6-8h                                       
;max 8 grams aztreonam  per day.                                                
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{[f z user.prv] 1;                                                            
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*30):0D^D,                                                                   
(WT*40):0D^D2,                                                                  
(WT*150):0D^D3,                                                                 
(WT*200):0D^D4,                                                                 
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("Normal dose: 90-120mg/kg/day  WT= ",(WT2),"kg,= ",(D)," - ",(D2),"mg Q8H")^M, 
[f rx msg](M),[f rx set rx comment](M),                                         
("Cystic Fibr. 150-200mg/kg/day  WT= ",(WT2),"kg,=",(D3)," - ",(D4),"mg Q8H")^M,
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
"Max daily dose of Aztreonam = 8 grams/day"^M,                                  
IF{(D3)<2333 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.CEFOT        RX                EVL MED               PED ATBX -CEFOTAXIME (CLAFORAN
"INFO FROM Harriet lane handbook 15th edition - page 660"^SO,                   
;dose - child- 100 - 200 mg/kg/24                                               
;max 12 grams  per day.                                                         

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 33
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*33):0D^D,                                                                   
(WT*66):0D^D2,                                                                  
(WT*50):0D^D3,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 100 - 200mg/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q8H")^M,     
[f rx msg](M),[f rx set rx comment](M),                                         
("For MENINGITIS, dose = 50mg/kg/dose q6h = ",(D3)," mg Q6H")^M,                
[f rx msg](M),[f rx set rx comment](M),                                         
("Please note; Max total daily dose = 12 grams/day")^M,                         
IF{(D3)<3000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.CEFTAZ       RX                EVL MED               PED ATBX -CEFTAZIDIME-FORTAZ  
"INFO FROM Harriet lane handbook 15th edition - page 662"^SO,                   
;dose - child- 90 - 150 mg/kg/24                                                
;max 6 grams  per day.                                                          
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*30):0D^D,                                                                   
(WT*50):0D^D2,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 90 - 150 mg/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q8H")^M,     
[f rx msg](M),[f rx set rx comment](M),                                         
("MENINGITIS or CYSTIC FIBROSIS dose = 50mg/kg/dose q8h = ",(D2)," mg Q8H")^M,  
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Max total daily dose = 6 grams/day")^M,                          
IF{(D2)<2000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.CEFURO       RX                EVL MED               PED ATBX - CEFUROXIME         
"INFO FROM Harriet lane handbook 15th edition - page 664 - CEFUROXIME"^SO,      
;dose - child- 75-150 mg/kg/24 - divided q8h                                    
;max 6 grams   per day.                                                         
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 34
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*25):0D^D,                                                                   
(WT*50):0D^D2,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("WT=",(WT2),"kg, dose 25 - 50 mg/kg q8h = ",(D),"-",(D2),"mg IV Q8H")^M,       
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Do not exceed total cefuroxime dose of 6 grams/day")^M,          
IF{(D2)<2000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.CLIND        RX                EVL MED               PED ATBX -CLINDAMYCIN -CLEOCIN
"INFO FROM Harriet lane handbook 15th edition - page 676"^SO,                   
;dose - child- 25-40 mg/kg/24                                                   
;max ADULT dose= 4.8 grams  per day.                                            
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*25):0D^D,                                                                   
(WT*40):0D^D2,                                                                  
(WT*6.25):0D^D3,                                                                
(WT*10):0D^D4,                                                                  
(WT*8.3):0D^D5,                                                                 
(WT*13.3):0D^D6,                                                                
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 25 - 40 mg/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2),"mg PER DAY")^M,  
[f rx msg](M),[f rx set rx comment](M),                                         
("Q6H = ",(D3),"-",(D4),"mg/dose  If Q8H, dose = ",(D5)," - ",(D6),"mg/dose")^M,
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
"Max ADULT total daily dose = 4.8 grams/day - max peds not specified"^M,        
IF{(D2)<4800 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.COTR         RX                EVL MED               PED IV RX-COTRIMOX- SEPTRA    
"INFO FROM Harriet lane handbook 15th edition - page 678"^SO,                   
;dose based of trimethoprim 4 - 5 mg/kg bid.                                    
;max 320 mg/day (160 per dose)  per day.                                        
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 35
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*4):0D^D,                                                                    
(WT*5):0D^D2,                                                                   
WT:1D^WT2,                                                                      
(D:2D/16):1D^D3,                                                                
(D2:2D/16):1D^D4,                                                               
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 4 - 5 mg/kg/dose = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q12H")^M,      
[f rx msg](M),[f rx set rx comment](M),                                         
("DOSE ",(D),"-",(D2),"mg trimethoprim = ",(D3)," - ",(D4),"mls solution")^M,   
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
"Please note; Max dose with BID dosing = 160mg (10 ml)"^M,                      
IF{(D2)<160 1;[f rx msg](M),                                                    
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.GENT         RX                EVL MED               PED ATBX - GENTAMICIN IV      
"INFO FROM Harriet lane handbook 15th edition - page 728"^SO,                   
;dose - child- 6 - 7.5 mg/kg/day                                                
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*2):0D^D,                                                                    
(WT*2.5):0D^D2,                                                                 
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 2 - 2.5 mg/kg q8h = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q8H")^M,      
[f rx msg](M),[f rx set rx comment](M),                                         
[f rx set rx comment](SO)}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.NAFCI        RX                EVL MED               PED ATBX -NAFCILLIN - NAFCIL  
"INFO FROM Harriet lane handbook 15th edition - page 782"^SO,                   
;dose - child- MILD INFECTION 50 - 100 mg/kg/24 DIVIDED Q6H                     
;SEVERE 100-200 MG/KG/DAY DIVIDED EVERY 4 - 6 HOURS                             
;Max ped dose not given, max adult dose 12 grams  per day.                      
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*12.5):0D^D,                                                                 

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 36
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(WT*25):0D^D2,                                                                  
(WT*50):0D^D3,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 100-200 mg/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q6H")^M,      
[f rx msg](M),[f rx set rx comment](M),                                         
("Severe infections: 100-200mg/kg/day=",(D2),"-",(D3)," mg Q6H")^M,             
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Max total dose in peds not specified, max dose in adult = 12 g/day")^M,       
IF{(D2)<3000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.PENIC        RX                EVL MED               PED ATBX -PENICILLIN IV       
"INFO FROM Harriet lane handbook 15th edition - page 807"^SO,                   
;dose - child- 0.1 - 0.4 MU/kg/24                                               
;max 24 MU grams  per day.                                                      
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.1):1D^D,                                                                  
(WT*0.4):1D^D2,                                                                 
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE:0.1 - 0.4 MU/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2)," MU per DAY")^M,
[f rx msg](M),[f rx set rx comment](M),                                         
("Divide daily dose of ",(D),"-",(D2)," MU to give a dose every 4 - 6 hours")^M,
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Max total daily dose = 24 MU/day")^M,                            
IF{(D2)<24 1;[f rx msg](M),                                                     
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.PIPER        RX                EVL MED               PED ATBX -PIPERCILLIN         
"INFO FROM Harriet lane handbook 15th edition - page 817"^SO,                   
;dose - child- 200 - 300 mg/kg/24                                               
;max 24 grams  per day.                                                         
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*200):0D^D,                                                                  
(WT*300):0D^D2,                                                                 
(WT*350):0D^D3,                                                                 

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 37
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(WT*600):0D^D4,                                                                 
"Pipercillin should be dosed q4h - q6h, divide total daily dose by 4 or 6"^DO,  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](DO),[f rx msg](DO),                                       
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 200-300 mg/kg/day= WT =",(WT2),"kg =",(D)," - ",(D2),"mg Per DAY")^M,   
[f rx msg](M),[f rx set rx comment](M),                                         
"MENINGITIS or CYSTIC FIBROSIS = 350 - 600mg/kg/day"^CF,                        
((CF)," = ",(D3)," - ",(D4)," mg/day.")^M,                                      
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Max total daily dose = 24 grams/day")^M,                         
IF{(D4)<24000 1;[f rx msg](M),                                                  
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.PRIM         RX                EVL MED               PEDS- PRIMAXIN DOSING         
"INFO FROM Harriet lane handbook 15th edition - page 737"^SO,                   
;dose - child- 90 - 150 mg/kg/24                                                
;max 6 grams  per day.                                                          
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.246'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*15):0D^D,                                                                   
(WT*25):0D^D2,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 60 - 100 mg/kg/day = WT =",(WT2),"kg =",(D)," - ",(D2),"mg Q6H")^M,     
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Max total daily dose = 4 grams/day")^M,                          
IF{(D2)<1000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED.PROM         RX                EVL MED               Ped Promethazine warn if <2yo 
;HERB,                                                                          
;THERE IS A NEW WARNING ON PHENERGAN, IT IS CONTRAINDICATED IN CHILDREN UNDER 2 
;YEARS OLD AS                                                                   
;IT CAN CAUSE RESP. DEPRESSION. CAN WE HAVE THIS FLAG US WHEN IT IS ENTERED IN  
;MEDITECH FOR                                                                   
;A CHILD UNDER 2 YEARS OLD?                                                     
;                                                                               
;MELANIE                                                                        
[f z patient age in yrs]^A,                                                     
IF{(A'<2) 1;                                                                    
"Phenergan is CONTRAINDICATED in <2yo due to Resp. Depression OK! Cancel"^ASK,  
IF{1=[f rx yes/no](ASK) [f rx err msg]("Please Delete MED to exit order");      
[f rx msg]("This med is contraindicated if < 2yo-per FDA 5/26/06")}};           

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 38
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB

--------------------------------------------------------------------------------------------
PED.PROM.M       RX                EVL POM MED           Ped Phenergan warn if <2yo-MD 
;HERB,                                                                          
;THERE IS A NEW WARNING ON PHENERGAN, IT IS CONTRAINDICATED IN CHILDREN UNDER 2 
;YEARS OLD AS                                                                   
;IT CAN CAUSE RESP. DEPRESSION. CAN WE HAVE THIS FLAG US WHEN IT IS ENTERED IN  
;MEDITECH FOR                                                                   
;A CHILD UNDER 2 YEARS OLD?                                                     
;                                                                               
;MELANIE                                                                        
[f z patient age in yrs]^A,                                                     
IF{(A'<2) 1;                                                                    
"Phenergan is CONTRAINDICATED in children <2yo due to Resp. Depression OK?"^ASK,
IF{[f rx yes/no](ASK)=1 1;1}};                                                  

--------------------------------------------------------------------------------------------
PED.VANC         RX                EVL MED               PED ATBX - VANCOMYCIN         
"INFO FROM Harriet lane handbook 15th edition - page 878"^SO,                   
;dose - child- CNS: 60 MG/KG/DAY, OTHER INFEC 40 mg/kg/24                       
;max 1 gram per dose                                                            
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*10):0D^D,                                                                   
(WT*12.5):0D^D2,                                                                
(WT*15):0D^D3,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("DOSE: 40 mg/kg/day = WT =",(WT2),"kg =",(D),"mg Q6H or ",(D2),"mg Q8H")^M,    
[f rx msg](M),[f rx set rx comment](M),                                         
("For CNS infections: dose = 60mg/kg/day = ",(D3)," mg Q6H")^M,                 
[f rx msg](M),[f rx set rx comment](M),[f rx set rx comment](SO),               
("Please note; Max dose = 1 gram/dose")^M,                                      
IF{(D2)<1000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PED2.CEFAZ       RX                EVL MED               PED ATBX - CEFAZOLIN - VER 2  
;dose >1 MO - child- 50-100 mg/kg/24 - divided q8h                              
;max 6 grams   per day.                                                         
;IF{[f z user.prv] 1;                                                           
[f z patient age in yrs]^A,                                                     
IF{(0.082'<A!(A'<18)) 1;                                                        
"Following message displayed at time of order entry"^SCR,                       
IF{[f pt oe wt kgs]^WT_.=. 1,                                                   
"Weight Not Specified - Usual Ped dose with normal renal function:"^WNS,        
[f rx win init],                                                                
[f rx win add](WNS),                                                            
"50 - 100 mg/kg/day (divided q8h), Not to exceed 2 grams/day"^M1,               

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 39
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx win add](M1),                                                             
[f rx win disp],                                                                
[f rx set rx comment](SCR),                                                     
[f rx set rx comment](WNS),                                                     
[f rx set rx comment](M1);                                                      
(WT*16.67):0D^D,                                                                
(WT*33):0D^D2,                                                                  
WT:1D^WT2,                                                                      
[f rx win init],                                                                
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx win add](CAD),                                                            
[f rx set rx comment](SCR),                                                     
[f rx set rx comment](CAD),                                                     
("WT=",(WT2),"kg, dose 50 - 100 mg/kg/day = ",(D),"-",(D2),"mg IV Q8H")^M1,     
[f rx win add](M1),                                                             
[f rx set rx comment](M1),                                                      
IF{(D2)<2000 1;                                                                 
("Please note; Do not exceed total cefazolin dose of 6 grams/day")^M2,          
[f rx win add](M2),[f rx set rx comment](M2)},                                  
[f rx win disp],1};[f rx msg](WNS)};                                            

--------------------------------------------------------------------------------------------
PEDAMPIC         RX                EVL MED               PED ATBX -AMPICILLIN          
;INFO FROM Harriet lane handbook 15th edition - page 634                        
;dose - child- 100 - 200 mg/kg/24 - divided q6h (dose based on ampicillin       
;severe infections - 200 -- 400 mg/kg/day dived every 4- 6 hours.               
;max 12 grams ampicillin  per day.                                              
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*25):0D^D,                                                                   
(WT*50):0D^D2,                                                                  
(WT*100):0D^D3,                                                                 
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("WT=",(WT2),"kg, mild to mod. infect. = 100-200 mg/kg/day in divided doses")^M,
[f rx msg](M),[f rx set rx comment](M),                                         
"For severe infections 200 - 400 mg/kg/day  divided q4-6h"^M,                   
[f rx msg](M),[f rx set rx comment](M),                                         
("Weight= ",(WT2),"kg, 100 - 200mg/kg/day= ",(D)," - ",(D2)," mg IV Q6H")^M,    
[f rx msg](M),[f rx set rx comment](M),                                         
("For severe infections 200-400mg/kg/day = ",(D2)," - ",(D3)," mg IV Q6H")^M,   
[f rx msg](M),[f rx set rx comment](M),                                         
("Please note; Do not exceed total daily Ampicillin dose of 12 grams/day")^M,   
IF{(D3)<3000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PEDCEFTR         RX                EVL MED               PED ATBX - CEFTRIAXONE        
; NORMAL: 50- 75 MG/KG/DAY IN DIVIDED DOSES (Q12H)- 100 MG/KG/DAY FOR MENINGITIS

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 40
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;MAX 4 G PER DAY                                                                
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*25):0D^D,                                                                   
(WT*50):0D^D3,                                                                  
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
("WT=",(WT2),"kg, Dose 50-75 mg/kg/day in divided doses-meningitis=100mg/kg")^M,
[f rx msg](M),[f rx set rx comment](M),                                         
("Weight= ",(WT2),"kg,=50mg/kg/day=",(D),"mg Q12H, 100mg/kg=",(D3),"mg Q12H")^M,
[f rx msg](M),[f rx set rx comment](M),                                         
("Please note; Do not exceed total daily dose of 4 grams/day")^M,               
IF{(D3)<2000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PEDUNAS          RX                EVL MED               PED ATBX - UNASYN             
;INFO FROM Harriet lane handbook 15th edition - page 635                        
;dose - child- 100 - 200 mg/kg/24 - divided q6h (dose based on ampicillin       
;unasyn dose = 1.5 ampicillin dose;                                             
;severe infections - 200 -- 400 mg/kg/day dived every 4- 6 hours.               
;max 8 grams ampicillin - 12 grams unasyn per day.                              
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
;used wt *( 150 mg = unasyn dose/4 times/day) to get dose q6h - ie wt*37.5 q6h  
(WT*37.5):0D^D,                                                                 
(WT*75):0D^D2,                                                                  
(WT*150):0D^D3,                                                                 
WT:1D^WT2,                                                                      
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
"The following doses are for peds patient's with normal renal function"^CAD,    
[f rx msg](CAD),[f rx set rx comment](CAD),                                     
("WT=",(WT2),"kg, normal dose = 150-300 mg/kg/day(unasyn) in divided doses")^M, 
[f rx msg](M),[f rx set rx comment](M),                                         
"For severe infections 300 - 600 mg/kg/day (unasyn) divided q4-6h"^M,           
[f rx msg](M),[f rx set rx comment](M),                                         
("Weight= ",(WT2),"kg, 150 - 300mg/kg/day= ",(D)," - ",(D2)," mg IV Q6H")^M,    
[f rx msg](M),[f rx set rx comment](M),                                         
("For severe infections 300-600mg/kg/day = ",(D2)," - ",(D3)," mg IV Q6H")^M,   
[f rx msg](M),[f rx set rx comment](M),                                         
("Please note; Do not exceed total daily Unasyn dose of 12 grams/day")^M,       
IF{(D3)<3000 1;[f rx msg](M),                                                   
[f rx set rx comment](M)}}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 41
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
PEDZOSYN         RX                EVL MED               Peds zosyn flag               
;flag regarding use of zosyn in kids.                                           
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
"PEDS PATIENT - SEE RX COMMENTS FOR DOSING GUIDELINES"^M,                       
[f rx msg](M),                                                                  
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
" "^N,                                                                          
WT:1D^WT2,                                                                      
(WT*150):0D^D1,                                                                 
(WT*300):0D^D2,                                                                 
[f rx set rx comment](CAD),                                                     
"Info from email from SSD on 10/15/00"^RC1,                                     
[f rx set rx comment](RC1),                                                     
"ANSWER: Zosyn is not FDA approved for kids < 12 yr old, although  reports"^RC1,
[f rx set rx comment](RC1),                                                     
" in literature exist that it is used."^RC1,                                    
[f rx set rx comment](RC1),                                                     
" Piperacillin is approved for peds, however, Tazobactam not studied."^RC1,     
[f rx set rx comment](RC1),                                                     
"WHAT IS DONE AT OTHER PRACTICE SITES?"^RC1,                                    
[f rx set rx comment](RC1),                                                     
"1) Children's in St.Paul does not use Zosyn."^RC1,                             
"For intra-abd infections"^RC2,                                                 
[f rx set rx comment](RC1),                                                     
[f rx set rx comment](RC2),                                                     
"they use ampi, gent, clinda.  This choice has more to do with"^RC1,            
"controlled prescribing habits, as opposed to avoidance of tazobactam."^RC2,    
[f rx set rx comment](RC1),                                                     
[f rx set rx comment](RC2),                                                     
" 2)  St.Lukes in Fargo does use it. In kids < 6 month old: dose is "^RC1,      
[f rx set rx comment](RC1),                                                     
("150-300mg of pip component/kg/day (",(D1),"-",(D2),") mg divided q8hr.")^RC1, 
[f rx set rx comment](RC1),                                                     
" these doses are referenced in Pediatric Dosage Handbook."^RC1,                
[f rx set rx comment](RC1),                                                     
"BOTTOM LINE:OK to use. However,if pathogen sensitive to other a'biotics,"^RC1, 
[f rx set rx comment](RC1),                                                     
" pick one that is pediatric-approved."^RC1,                                    
[f rx set rx comment](RC1),                                                     
[f rx set rx comment](N)}};[f rx err msg](S)};                                  

--------------------------------------------------------------------------------------------
PHEN.CAR         CALC              EVL MED               PHENYTOIN TOTAL VOLUME CHECKER
;used for calculating if correct CONCENTRATION DILANTIN                         
;looking just for carrier                                                       
[f rx iv car vol]^PHEN.CAR;                                                     

--------------------------------------------------------------------------------------------
PHEN.TV          CALC              EVL MED               PHENYTOIN TOTAL VOLUME CHECKER
;used for calculating if correct CONCENTRATION DILANTIN                         

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 42
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx iv tot vol]^PHEN.TV;                                                      

--------------------------------------------------------------------------------------------
PHENY.BD         CALC              EVL MED               PHENYTOIN DOSE CHECKER        
;used for pulling Phenytoin dose                                                
[f rx iv add dose]^PHENY.BD;                                                    

--------------------------------------------------------------------------------------------
PHENY.IV         RX                EVL DOSE              PHENYTON CONCENTRATION        
;MESSAGES PHARMACIST OF MINIMUM CONCENTRATION NEEDED.                           
IF{[f rx ord type]'="I" [f rx ok];                                              
IF{[f rx calc]("PHENY.BD")^BD_.=.,                                              
[f z.carrier.vol]^ZV,                                                           
(BD:1D/50)^PV,                                                                  
PV+ZV^TV2,                                                                      
(BD:1D/TV2)^FC,                                                                 
(BD/6.7)^C,                                                                     
(C-PV)^MV,                                                                      
("Concentration =",(FC)," MG/ML")^FCM,                                          
("Max Conc. = 6.7 mg/ml-therefore minimum 0.9% NaCl required =",(MV),"ML")^MVM, 
("Max rate of infusion= 50mg/min-therefore-infuse over at LEAST ",(PV),"MIN")^R,
IF{FC<6.749 [f rx msg](R);[f rx msg](FCM),[f rx msg](MVM)}}};                   

--------------------------------------------------------------------------------------------
PHENY.IV2        RX                EVL FILE              PHENYTON CONCENTRATION        
;MESSAGES PHARMACIST OF MINIMUM CONCENTRATION NEEDED.                           
IF{[f rx ord type]'="I" [f rx ok];                                              
;IF{[f rx calc]("PHENY.BD")^BD_.=.,                                             
[f z.add.1]^BD,                                                                 
IF{[f rx calc]("PHEN.TV")^TB_.=.,                                               
(BD:3D/TB:2D)^CN,                                                               
IF{CN<6.8 1;                                                                    
("Max Conc. = 6.7 mg/ml- your concentration =",(CN)," mg/ml")^ME,               
[f rx err msg](ME)}}};                                                          

--------------------------------------------------------------------------------------------
PLT              RX                EVL MED               Platelet warning if low-loveno
IF{[f z pharmacist]="Y" 1,                                                      
[f rx nth ver Res-RES]("PLT",1)^PLT,                                            
[f rx nth ver Res-RES]("PLT",2)^PLT2,                                           
[f rx nth ver Res-RES]("PLT",3)^PLT3,                                           
[f rx nth ver Res-RES]("PLT",4)^PLT4,                                           
IF{PLT_.=. IF{[f rx yes/no]("Platelets not done.  Continue??")=1 1;             
[f rx err msg]("Consider obtaining platelet level")};                           
PLT#"0,"^VAL,PLT#"1,"^DATE,PLT#"2,"^TIME,                                       
"Lovenox check: Last Platelet level LOW! "^M1,                                  
(M1_VAL_" on "_DATE_" @ "_TIME_" Continue????")^MSG,                            
IF{VAL<81 1,                                                                    
IF{[f rx yes/no](MSG)=1 1,                                                      
[f rx win init],                                                                
[f rx win add]("Historical info below: Level,Date,Time"),                       
[f rx win add](PLT2),                                                           
[f rx win add](PLT3),                                                           
[f rx win add](PLT4),                                                           
[f rx win disp],1;                                                              
[f rx win init],                                                                
[f rx win add]("Historical info below: Level,Date,Time"),                       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 43
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
[f rx win add](PLT2),                                                           
[f rx win add](PLT3),                                                           
[f rx win add](PLT4),                                                           
[f rx win disp],1,                                                              
[f rx err msg]("Please call MD to discuss options")};                           
[f rx msg]("Last Platelet OK - "_VAL_" on "_DATE_" @ "_TIME)}};1};              

--------------------------------------------------------------------------------------------
PP2APAP          RX                EVL DOSE              APAP -ELIXIR PED. PAIN GUIDELI
;APAP - uses dose of 10 - 15 /kg/dose - Q4-6P PRN                               
;IF{[f z user.prv] 1;                                                           
[f z patient age in yrs]^A,                                                     
IF{(0.082'<A!(A'<20)) 1;                                                        
"Following message displayed at time of order entry: "^SCR,                     
IF{[f pt oe wt kgs]^WT_.=. 1,                                                   
"Weight Not Specified - Usual Ped dose = 10 - 15 mg/kg:"^WNS,                   
[f rx msg](WNS),                                                                
[f rx set rx comment](SCR),                                                     
[f rx set rx comment](WNS);                                                     
(WT*10):0D^D,(WT*15):0D^D2,                                                     
WT:1D^WT2,(D:1D/32)^EML,(D2:1D/32)^EML2,(EML/5)^T1,(EML2/5)^T2,                 
("Usual Dose 10 - 15 mg/kg/dose Q4H PRN, Patient's Weight = ",(WT2)," kg ")^PG, 
"teaspoonsful of ELIXIR "^TD,                                                   
("Dose=",(D),"-",(D2),"mg, =",(EML),"-",(EML2),"mls=",(T1),"-",(T2),(TD))^TDM,  
[f rx win init],                                                                
[f rx win add](PG),                                                             
[f rx win add](TDM),                                                            
[f rx win disp],1,                                                              
[f rx set rx comment](SCR_PG_TDM)},1};                                          

--------------------------------------------------------------------------------------------
PP3.APAP         RX                EVL MED               APAP -ELIXIR PED. PAIN GUIDELI
;APAP - uses dose of 10 - 15 /kg/dose - Q4-6P PRN                               
[f z patient age in yrs]^A,                                                     
IF{(0.082'<A!(A'<20)) 1;                                                        
IF{[f rx yes/no]("Caclulate Ped's Dose?")=1 1,                                  
"Following message displayed at time of order entry: "^SCR,                     
IF{[f pt oe wt kgs]^WT_.=. 1,                                                   
"Weight Not Specified - Usual Ped dose = 10 - 15 mg/kg:"^WNS,                   
[f rx msg](WNS),                                                                
[f rx set rx comment](SCR),                                                     
[f rx set rx comment](WNS);                                                     
(WT*10):0D^D,(WT*15):0D^D2,                                                     
WT:1D^WT2,(D:1D/32)^EML,(D2:1D/32)^EML2,(EML/5)^T1,(EML2/5)^T2,                 
("Usual Dose 10 - 15 mg/kg/dose Q4H PRN, Patient's Weight = ",(WT2)," kg ")^PG, 
"teaspoonsful of ELIXIR "^TD,                                                   
("Dose=",(D),"-",(D2),"mg, =",(EML),"-",(EML2),"mls=",(T1),"-",(T2),(TD))^TDM,  
[f rx win init],                                                                
[f rx win add](PG),                                                             
[f rx win add](TDM),                                                            
[f rx win disp],1,                                                              
[f rx set rx comment](SCR_PG_TDM)},1};                                          
[f rx set rx comment]("User chose not do have computer caculate dose"),1};      

--------------------------------------------------------------------------------------------
PPAPAPGTT        RX                EVL MED               APAP -GTTS PED. PAIN GUIDELI  
;APAP - uses dose of 10 - 15 /kg/dose - Q4-6P PRN - THIS IS FOR DROPS           

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 44
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*10):0D^D,                                                                   
(WT*15):0D^D2,                                                                  
WT:1D^WT2,                                                                      
(D:2D/100)^DML,                                                                 
(D2:2D/100)^DML2,                                                               
"Per Peds Pain Guidelines:"^PG,                                                 
("WT=",(WT2),"kg -",(PG)," Dose 10-15mg/kg =",(D),"-",(D2),"mg Q4H PRN")^M,     
[f rx msg](M),                                                                  
("Dose=",(D),"-",(D2),"mg, =",(DML),"-",(DML2),"mls of CONCENTRATED DROPS")^TDM,
[f rx msg](TDM),                                                                
("Since dose=",(D),"-",(D2),"mg & >80 mg - consider using tabs q4-6h PRN")^CC,  
IF{(D>80) [f rx msg](CC);1},                                                    
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M),[f rx set rx comment](TDM),                            
IF{(D>80) [f rx set rx comment](CC);1}}};[f rx err msg](S)};                    

--------------------------------------------------------------------------------------------
PPCODEI          RX                EVL MED               CODEINE - PED. PAIN GUIDELI   
;CODEINE - uses dose of 0.5 - 1 mg /kg/dose - Q4 - 6H PRN                       
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.5):1D^D,                                                                  
WT:1D^WT2,                                                                      
(D:3D/2.4):1D^ML,                                                               
(WT:3D/2.4)^ML2,                                                                
((((WT*0.5):3D/2.4))/5):1D^T1,                                                  
(((WT:3D/2.4))/5):1D^T2,                                                        
"Per Peds Pain Guidelines:"^PG,                                                 
("WT=",(WT2),"kg -",(PG)," Dose 0.5-1mg/kg =",(D),"-",(WT2),"mg Q4-6H PRN")^M,  
;[f rx msg](M),                                                                 
"teaspoonsful every 4 - 6 H PRN"^TD,                                            
("Dose=",(D),"-",(WT2),"mg, =",(ML),"-",(ML2),"mls - ",(T1),"-",(T2),(TD))^TDM, 
;[f rx msg](TDM),                                                               
[f rx win init],                                                                
[f rx win add](M),                                                              
[f rx win add](TDM),                                                            
[f rx win disp],                                                                
("Since dose = ",(WT2),"mg: & > 30 mg - consider using tabs q4-6h PRN")^CC,     
IF{(D>30) [f rx msg](CC);1},                                                    
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M),[f rx set rx comment](TDM),                            

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 45
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{(WT2>30) [f rx set rx comment](CC);1}}};[f rx err msg](S)};                  

--------------------------------------------------------------------------------------------
PPHYDROC3        RX                EVL MED               HYDROCODONE- PED. PAIN GUIDELI
;uses dose of 0.15 mg /kg/dose - Q4H PRN                                        
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.15):1D^D,                                                                 
WT:1D^WT2,                                                                      
D*2^ML,                                                                         
((WT*0.15)*2)/5:1D^T,                                                           
"Per Pediatric Pain Guidelines:"^PG,                                            
("WT=",(WT2),"kg -",(PG)," Dose 0.15mg/kg =",(D),"mg Q4P")^M,                   
("DOSE=",(D),"mg, =",(ML),"ml(s) of elixir,",(T),"teaspoonsful(s) Q4H PRN")^M2, 
[f rx win init],                                                                
[f rx win add](M),                                                              
[f rx win add](M2),                                                             
[f rx win disp],                                                                
("Since dose = ",(D),"mg: & >5 mg - consider using tabs/caps q4h PRN")^CC,      
IF{(D>4.99) [f rx msg](CC);1},                                                  
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M),[f rx set rx comment](M2),                             
IF{(D>4.99) [f rx set rx comment](CC);1}}};[f rx err msg](S)};                  

--------------------------------------------------------------------------------------------
PPIBUP           RX                EVL MED               IBUPROFEN -PEDIATRIC PAIN MED 
; DOSE: 5- 10 MG/KG/DOSE Q6-8 HOURS prn - MAXIMUM 40 MG /KG/24 HRS              
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*5):0D^D,                                                                    
(WT*10):0D^D2,                                                                  
(WT*40):0D^D3,                                                                  
WT:1D^WT2,                                                                      
"Per Peds Pain Guidelines:"^PG,                                                 
("WT=",(WT2),"kg -",(PG),"Dose 5-10mg/kg/dose =",(D),"-",(D2),"mg Q6-8H PRN")^M,
[f rx msg](M),                                                                  
("Based on wt of",(WT2),"kg - max total dose/day = 40mg/kg = ",(D3),"mg/day")^N,
[f rx msg](N),                                                                  
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M),[f rx set rx comment](N)}};[f rx err msg](S)};         

--------------------------------------------------------------------------------------------
PPMORPII         RX                EVL MED               PED PAIN- MS INT - 0.05- 0.1MG

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 46
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;MORPHINE- intermittent injections - 0.05 - 0.1 mg/kg/dose q2-4 prn             
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.0833'<A!(A'<18)) 1;[f rx yes/no](P);1,                                    
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.05):2D^D,                                                                 
WT:1D^WT2,                                                                      
WT*0.1:2D^D2,                                                                   
"Per Pediatric Pain Guidelines"^PG,                                             
("WT=",(WT2),"kg:",(PG),"Dose 0.05-0.1mg/kg=",(D),"-",(D2),"mg Q2-4 hrs prn")^M,
[f rx msg](M),                                                                  
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M)}};[f rx err msg](S)};                                  

--------------------------------------------------------------------------------------------
PPONDA           RX                EVL MED               ONDANSETRON- PED. PAIN GUIDELI
;uses dose of 0.075 mg /kg/dose - every 6 hours PRN                             
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.075):2D^D,                                                                
(D*0.5):2D^ML,                                                                  
IF{D>3.98 4^D,2^ML;1},                                                          
WT:1D^WT2,                                                                      
"Peds dose 0.075 mg/kg (max 4mg) = "^PG,                                        
") ml IV Q6H PRN"^MLM,                                                          
("WT=",(WT2),"kg:",(PG)_(D),"mg ("_(ML)_(MLM))^M,                               
[f rx msg](M),                                                                  
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M)}};[f rx err msg](S)};                                  

--------------------------------------------------------------------------------------------
PPPCA3           RX                EVL MED               PED PAIN- PCA 5 - 13.99       
;MORPHINE- BOLUS ONLY NO BASAL - DO NOT USE IN PATIENTS < 5 YO, >5 - 0.015MG/KG 
;DOSE - q10 minutes - max 0.24 mg/kg/4 hrs                                      
;BASEL INFO - BLOWN INTO COMMENTS ONLY.                                         
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(4.99'<A!(A'<14.5)) 1;[f rx yes/no](P);1,                                    
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.015):2D^DS,(WT*0.24):2D^MD,                                               
(WT*0.01):2D^DC,                                                                
WT:1D^WT2,                                                                      
(WT*0.02):2D^D2,                                                                

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 47
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"Continuous dosing info as follows"^CD,                                         
"If this PCA is for continuous infusion - see RX COMMENTS for dose"^RX,         
"Per Pediatric Pain Guidelines"^PG,                                             
("MAX dose in 4 hours =",(MD),"mg")^MDM,                                        
("WT=",(WT2),"kg:",(PG),"PCA dose=0.015mg/kg = ",(DS),"mg Q10 min PRN")^M,      
[f rx msg](M),                                                                  
[f rx msg](MDM),                                                                
[f rx msg](RX),                                                                 
("0.05 - 0.01mg/kg = ",(DC),"-",(D2),"mg/kg/hr")^L2,                            
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),[f rx set rx comment](M),[f rx set rx comment](MDM), 
[f rx set rx comment](CD),                                                      
[f rx set rx comment](L2)}};[f rx err msg](S)};                                 

--------------------------------------------------------------------------------------------
PPPCALT5         RX                EVL MED               PCA <5 - GIVES INT.INJ        
;MORPHINE- intermittent injections - 0.05 - 0.1 mg/kg/dose q2-4 prn             
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
IF{(0.0833'<A!(A'<5)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.05):2D^D,                                                                 
WT:1D^WT2,                                                                      
WT*0.1:2D^D2,                                                                   
(WT*0.01):2D^R,                                                                 
(WT*0.02):2D^T,                                                                 
;"Per Pediatric Pain Guidelines"^PG,                                            
"IF PCA is desired for continuous infusion - See comments for dose"^IM,         
"PCA NOT RECOMMENDED FOR PATIENT'S < 5 YO! "^W,                                 
"Following dose is for morphine intermittent Injections - WITHOUT PCA"^W2,      
;"Per Pediatric Pain Guidelines"^PG,                                            
("CI dose = 0.01-0.02mg/kg/hr= ",(R),"-",(T),"mg/kg/hr")^IN,                    
("WT=",(WT2),"kg:",(PG),"Dose 0.05-0.1mg/kg=",(D),"-",(D2),"mg Q2-4 hrs prn")^M,
[f rx msg](W),[f rx msg](W2),                                                   
[f rx msg](M),                                                                  
"Continuous infusion (CI) dose info below:"^IMM,                                
[f rx msg](IM),                                                                 
;("Intermittent bolus with basal ",(R)," mg dose q20 minutes prn")^LZ,          
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),[f rx set rx comment](W),[f rx set rx comment](W2),  
[f rx set rx comment](M),[f rx set rx comment](IMM),                            
[f rx set rx comment](IN)};[f rx err msg](S)};                                  

--------------------------------------------------------------------------------------------
PPPROM           RX                EVL MED               PROMETHAZIN- PED. PAIN GUIDELI
;uses dose of 0.25 - 0.5 mg /kg/dose - PR every 6 hours PRN                     
IF{[f z user.prv] 1;                                                            
[f z patient age in yrs]^A,                                                     
"Peds Patient!- Is dose calculated? Y or N (if N - computer will calculate) "^P,
"No Weight - Do you wish to skip computer aided dosing?"^Q,                     
"No WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S, 
"test"^N,                                                                       
IF{(0.082'<A!(A'<18)) 1;[f rx yes/no](P);1,                                     
IF{[f pt oe wt kgs]^WT_.=. [f rx yes/no](Q);                                    
(WT*0.25):1D^D,                                                                 

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 48
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(WT*0.5):1D^D2,                                                                 
IF{D>24.99 25^D;1},                                                             
IF{D2>24.99 25^D2;1},                                                           
"mg PR Q6H PRN"^M3,                                                             
IF{D=D2 " Pts weight results in max dose of 25 mg PR q6h PRN"^D,""^D2,""^M3;1}, 
WT:1D^WT2,                                                                      
"Peds dose 0.25 - 0.5 mg/kg (max 25 mg) = "^PG,                                 
("WT=",(WT2),"kg:",(PG))^M,                                                     
((D),"-",(D2),(M3))^MX,                                                         
[f rx msg](M),[f rx msg](MX),                                                   
"COMPUTER AIDED DOSING INFO AS FOLLOWS:"^CAD,                                   
[f rx set rx comment](CAD),                                                     
[f rx set rx comment](M),[f rx set rx comment](MX)}};1,[f rx err msg](S)};      

--------------------------------------------------------------------------------------------
PRED.CMB         RX                EVL DOSE              STOPS IF DOSE NOT ZERO        
;stops unless dose is zero                                                      
[f rx dose]^DOSE,                                                               
"DOSE FOR PRED-COMBO SHOULD BE ZERO"^ERROR,                                     
IF{DOSE'=0 [f rx err msg](ERROR);1};                                            

--------------------------------------------------------------------------------------------
PRICE.WARN       RX                EVL FILE              PRICE.WARN IF > XXXXX         
;enter max price in variable max.                                               
;code for custom keyword: @PHA.RX.number.to.dispense                            
5000^MAX,                                                                       
[f rx charge]^CHG,                                                              
[f z numb to dispense]^QTY,                                                     
CHG*QTY^TCHG,                                                                   
IF{CHG>MAX ("Rx with mnemonic: "_[f rx med])^ID,                                
[f rx yes/no](ID_" has a charge/dose = $"_CHG_" are you sure?");                
TCHG>MAX ("Rx with mnemonic: "_[f rx med])^ID,                                  
[f rx yes/no](ID_" Total $ for this txn =$"_TCHG_" are you sure?");1};          

--------------------------------------------------------------------------------------------
PRIM.RTE         RX                EVL FILE              ZOSYNCIPRO RATE -MUST BE 100  
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Primaxin should not exceed 120 ml/hr"^B,                              
IF{CIPRRATE>120 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
PROCHPED         RX                EVL MED               FLAGS COMPAZINE USE ON PEDS   
;Per pharmacist meeting 7/19/99 -  wE WILL ATTACH STICKERS IF COMPAZINE         
; IS ORDERED ON ANYONE < 14                                                     
"Per Parkin's request, please interevene on compazine order if<14yo"^A,         
"Rather than compazine, use ondansetron 0.075 mg/kg/dose -max of 4 mg."^B,      
"Please place the correct sticker on chart-either: PEDSCOMPAZ or PEDSPOSTOP"^C, 
IF{[f pt adm/ser age]>14 [f rx ok];[f rx msg](A),[f rx msg](B),[f rx msg](C)};  

--------------------------------------------------------------------------------------------
PY.AMIT50        RX                EVL DOSE              PYXIS REM: AMITRIPTYLINE 50   
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 50MG, please use the 50 MG mnemonic"^USETHIS,                     
IF{DOSE=50 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 49
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
PY.AMLO10        RX                EVL DOSE              PYXIS REM: AMLODIPINE 10MG    
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 10MG, please use the 10 MG mnemonic"^USETHIS,                     
IF{DOSE=10 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.ATEN50        RX                EVL DOSE              PYXIS REM: ATENOLOL 50 MG     
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 50MG, please use the 50 MG mnemonic"^USETHIS,                     
IF{DOSE=50 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.ATOR20        RX                EVL DOSE              PYXIS REM: ATORVASTIN 20MG    
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 20MG, please use the 20 MG mnemonic"^USETHIS,                     
IF{DOSE=20 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.DIPH50        RX                EVL DOSE              PYXIS REM: DIPHENHYDRAMINE 50 
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 50MG, please use the 50 MG mnemonic"^USETHIS,                     
IF{DOSE=50 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.GLIP10        RX                EVL DOSE              PYXIS REM: GLIPIZIDE XL       
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 10MG, please use the 10 MG XL mnemonic"^USETHIS,                  
IF{DOSE=10 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.ISOS30        RX                EVL DOSE              PYXIS REM: ISOSORBIDE MONO 30 
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 30MG, please use the 30 MG mg mnemonic"^USETHIS,                  
IF{DOSE=30 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.LIS2.5        RX                EVL DOSE              PYXIS REM: LISINOPRIL 2.5     
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 2.5 MG, please use the 2.5 mg tabs"^USETHIS,                      
IF{DOSE=2.5 [f rx msg](USETHIS);1};                                             

--------------------------------------------------------------------------------------------
PY.METO100       RX                EVL DOSE              PYXIS REM: METOPROLOL 100 MG  
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 100MG, please use the 100 mg tabs"^USETHIS,                       
IF{DOSE=100 [f rx msg](USETHIS);1};                                             

--------------------------------------------------------------------------------------------
PY.METR25        RX                EVL DOSE              PYXIS REM: METOPROLOL 25MG    

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 50
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 25MG, please use the 25 MG mnemonic"^USETHIS,                     
IF{DOSE=25 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.METR500       RX                EVL DOSE              PYXIS REM: METRONIDAZOLE 500  
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 500MG, please use the 500 MG mnemonic"^USETHIS,                   
IF{DOSE=500 [f rx msg](USETHIS);1};                                             

--------------------------------------------------------------------------------------------
PY.SERT100       RX                EVL DOSE              PYXIS REM: SERTRALINE 100 MG  
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 100MG, please use the 100 mg tabs"^USETHIS,                       
IF{DOSE=100 [f rx msg](USETHIS);1};                                             

--------------------------------------------------------------------------------------------
PY.VENL75        RX                EVL DOSE              PYXIS REM: VENLAFAXINE 75XR   
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 75MG, please use the 75 MG XR mnemonic"^USETHIS,                  
IF{DOSE=75 [f rx msg](USETHIS);1};                                              

--------------------------------------------------------------------------------------------
PY.WARF4         RX                EVL DOSE              PYXIS REM: WARFARIN 4 MG      
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 4MG, please use the 4 MG mnemonic"^USETHIS,                       
IF{DOSE=4 [f rx msg](USETHIS);1};                                               

--------------------------------------------------------------------------------------------
PY.WARF6         RX                EVL DOSE              PYXIS REM: WARFARIN 6MG       
;USED TO REMIND PHARMACY STAFF TO TRY AND SELECT CORRECT PRODUCT.               
[f rx dose]^DOSE,                                                               
"Since Dose = 6MG, please use the 6 MG mnemonic"^USETHIS,                       
IF{DOSE=6 [f rx msg](USETHIS);1};                                               

--------------------------------------------------------------------------------------------
PYXIS.BL         RX                EVL MED               CHG CHG TYPE TO NC FOR MEDICAR
;Rule written Herb Bromenshenkel 12/98 - uses calc rule of MC2.  MC2 determines 
; if patient is an outpatient and medicare.  If outpatient and medicare, blocks 
; charges except for those charge rules listed below                            
; will only work on PYXISMED order types                                        
"M IS smaller THAN 2"^W,                                                        
"NC"^P,                                                                         
IF{[f rx ord type]'="M" [f rx ok];                                              
IF{[f z out dft chg type]="INJ" 3^A;0^A},                                       
IF{[f z out dft chg type]="NARCINJ" 3^B;0^B},                                   
IF{[f z out dft chg type]="ANES" 3^C;0^C},                                      
IF{[f z out dft chg type]="ER" 3^D;0^D},                                        
A+B+C+D^M,                                                                      
IF{M>2 [f rx ok];                                                               
IF{[f rx calc]("MC2")^MC2_.=.;                                                  
IF{(MC2=1) [f rx set charge type](P);1}}}};                                     

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 51
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB

--------------------------------------------------------------------------------------------
Q6H.ARU          RX                EVL FILE              Q6H - ARU - 0000,0600,12,18   
IF{([f rx sig]="Q6H"&([f pt location]="ARU")) 1,                                
IF{[f rx start time]^STT="0000" 1;STT="0600" 1;STT="1200" 1;STT="1800" 1;       
[f rx msg]("ARU's Q6H should be on 0000 0600 1200 1800")};1};                   

--------------------------------------------------------------------------------------------
QD.STOP          RX                EVL FILE              STOP USER FROM USING SIG (QD) 
;THIS RULE WILL NOT ALLOW USER TO USE QD OR D FOR SIG                           
"Please use sig of DAILY instead of QD or D"^MES,                               
IF{[f rx sig]="QD"!([f rx sig]="D") [f rx err msg](MES);1};                     

--------------------------------------------------------------------------------------------
QXH.STOP         RX                EVL FILE              STOP USE OF QXH INP-INJ-PY-IV 
;THIS RULE WILL NOT ALLOW USER TO USE Q6H, Q8H, Q12H, Q24H ON MEDS WHERE CHARGE 
;RULE IS INJ-PY-IV                                                              
"DO NOT USE Q4H, USE Q4 INSTEAD - CHARGING WILL BE FROM PXYIS "^A,              
"DO NOT USE Q6H, USE Q6 INSTEAD - CHARGING WILL BE FROM PXYIS "^B,              
"DO NOT USE Q8H, USE Q8 INSTEAD - CHARGING WILL BE FROM PXYIS "^C,              
"DO NOT USE Q12H, USE Q12 INSTEAD - CHARGING WILL BE FROM PXYIS "^D,            
"DO NOT USE Q24H, USE Q24 INSTEAD - CHARGING WILL BE FROM PXYIS "^E,            
IF{[f pt status]'="ADM IN" [f rx ok];                                           
IF{([f rx sig]="Q4H"&([f rx chg type]="INJ-PY-IV")) [f rx err msg](A);          
IF{([f rx sig]="Q6H"&([f rx chg type]="INJ-PY-IV")) [f rx err msg](B);          
IF{([f rx sig]="Q8H"&([f rx chg type]="INJ-PY-IV")) [f rx err msg](C);          
IF{([f rx sig]="Q12H"&([f rx chg type]="INJ-PY-IV")) [f rx err msg](D);         
IF{([f rx sig]="Q24H"&([f rx chg type]="INJ-PY-IV")) [f rx err msg](E);         
[f rx ok]}}}}}};                                                                

--------------------------------------------------------------------------------------------
REFIL.CH.F       RX                EVL FILE              Flags useR will chg on FILE   
;checks at file                                                                 
;this rule flags user that med will charge on subsequent refill list.           
;occurs if dose not EQ =, sig has times.per.day. and ing = P                    
IF{"MED"'=[f z order.type.type] 1;                                              
[f rx dose]=0 1;                                                                
[f rx inventory]'="P" 1;                                                        
"SCH"'=[f rx sch] 1;                                                            
[f z sig.times.per.day]^TPD,                                                    
IF{TPD>0 1,                                                                     
("Refill list will charge "_TPD_" doses/day  OK?")^ASK,                         
IF{[f rx yes/no](ASK)=1 1;                                                      
[f rx err msg]("Please modify Dose, Sig, or Schedule to avoid charging")};1}};  

--------------------------------------------------------------------------------------------
REFIL.CH.S       RX                EVL DOSE              Refill may charge - Not disp.f
;This rule warns if inventory  where med is being dispensed does not have       
;dispense as stock equal to "Y"  Otherwise, intial dose may dispense            
;KEYWORD INFO:                                                                  
;z disp.stock= @PHA.DRUG.inv.from.stock[@med,@inventory]                        
; z order.type.type = @PHA.RX.order.type.short                                  
; z [f z pat.type] = @patient.type                                              
[f rx inventory]^INV,                                                           
[f z order.type.type]^TYPE,                                                     
[f z pat.type]^PTYPE,                                                           
IF{PTYPE'="INP" 1;                                                              

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 52
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{TYPE'="M"!(INV="P")!(INV_.=.) 1;                                             
[f z disp.stock]^STK,                                                           
IF{"Y"=STK 1;                                                                   
"Dispense as stock med in formulary is not Y. May charge on Refill! OK?"^ASK,   
IF{[f rx yes/no](ASK)=1 1;                                                      
("Enter Y in the Disp. as stock for Inv: "_INV_" (Pg 3 of Formulary)")^MES2,    
[f rx msg](MES2)}}}};                                                           

--------------------------------------------------------------------------------------------
REFIL.CHG        RX                EVL DOSE              Flags user that refill wil chg
;this rule flags user that med will charge on subsequent refill list.           
;occurs if dose not EQ =, sig has times.per.day. and ing = P                    
IF{"MED"'=[f z order.type.type] 1;                                              
[f rx dose]=0 1;                                                                
[f rx inventory]'="P" 1;                                                        
"SCH"'=[f rx sch] 1;                                                            
[f z sig.times.per.day]^TPD,                                                    
IF{TPD>0 1,                                                                     
[f rx win init],                                                                
"As currently entered, this order will charge for "^WC,                         
[f rx win add](WC_TPD_" doses/day"),                                            
[f rx win add]("To avoid charging, considering change dose to 0 and adding"),   
[f rx win add]("dose info in enter/edit dose information screen"),              
[f rx win disp],1;1}};                                                          

--------------------------------------------------------------------------------------------
SET.LB.1.D       RX                EVL DOSE              Set Label Comment Line 1/dose 
[f z label.comment.1]^LAB1,                                                     
;Removed below line - could not get z remove.dose to work                       
;IF{LAB1$5="*Dose" [f rx msg]("*dose"),[f z remove.dose];1},                    
[f z dose.and.unit]^DOSEU,                                                      
[f z drug.order.size]_" "_[f z drug.order.unit]^ORDD,                           
IF{DOSEU=ORDD 1;                                                                
[f rx dose]^CDOSE,                                                              
[f rx start date]^STK,                                                          
[f rx pt type]^PTY,                                                             
[f rx ord type]^OTY,                                                            
IF{STK_.=.!(PTY="OUT")!(CDOSE=0)!(OTY'="M") 1;                                  
IF{[f rx dose]=0&(OTY'="M") 1;                                                  
[f z disp.form.p.dos.un]^INFO,                                                  
IF{INFO=1!(INFO=LAB1)!(INFO_.=.) [f rx ok];                                     
("Set Internal Label Comments to:"_INFO)^ASK,                                   
IF{1'=[f rx yes/no](ASK) 1;[f z set.lab.com.1.4]}}};1}};                        

--------------------------------------------------------------------------------------------
SET.SP2300       RX                EVL DOSE              Set Stop Time to 2300         
; sets stop time to 2300 - set to put on individual meds                        
[f rx start date]^STARTD,                                                       
[f rx stop time]^STOPT,                                                         
[f rx sig]^SIG,                                                                 
IF{[f today]=STARTD&("2300"=STOPT) 1;SIG="QD";SIG="D";STARTD_.=. 1;             
"Set Internal Stop Date/Time to Today @2300"^ASK,                               
IF{1'=[f rx yes/no](ASK) 1;[f z set.stop.t.2300]},1};                           

--------------------------------------------------------------------------------------------
SET.ST1700       RX                EVL DOSE              Set Start time 1700           
; sets start time to 1700 - set to put on individual meds                       

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 53
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;used for warfarins. start of 1700 if schedule one                              
[f rx sch]^SCH,                                                                 
IF{SCH="ONE" [f z set.start.1700]},1;                                           

--------------------------------------------------------------------------------------------
TAKE.HM.W        RX                EVL MED               TAKE HOME RULE - MEDICARE MODI
;Intent of rule is to scan sdc and er to look for total # dispeed.              
; if greater than 1 - will warn shoudl use takehome                             
; will miss inhalers                                                            
;IF{[f pt type]'="OUT" [f rx ok];                                               
;IF{[f rx ord type]="TAKEHOME" [f rx ok]}};                                     
;[f rx dur days]^DU,                                                            
;IF{[f rx tot disp]>2                                                           

--------------------------------------------------------------------------------------------
TAKEHOME         RX                EVL MED               TAKE HOME RULE - ORIGINAL     
;modified 8/3/01-  to do the billing code as a TXN rule (TAKEHOMETX)            
;Intent of the rule is to charge misc. take home charge code to medications     
;dispensed to to patients.  If the order type is takehome, the misc. take       
;home number (16031122) is placed into billing prompt                           
"THIS MEDICATION WAS DISPENSED TO PATIENT AS A TAKE HOME PRESCRIPTION"^TH,      
IF{[f rx ord type]'="TAKEHOME" [f rx ok];                                       
"TAKEHOME"^TAKEHOME,                                                            
[f rx set charge type](TAKEHOME),                                               
[f rx set rx comment](TH)};                                                     

--------------------------------------------------------------------------------------------
TAKEHOME2        RX                EVL MED               TAKE HOME RULE - MEDICARE MODI
;MODIFIED FROM TAKEHOME - TO PREVENT CHARGING TO MEDICARE                       
;Intent of the rule is to charge misc. take home charge code to medications     
;dispensed to to patients.  If the order type is takehome, the misc. take       
;home number (16031122) is placed into billing prompt                           
"THIS MEDICATION WAS DISPENSED TO PATIENT AS A TAKE HOME PRESCRIPTION"^TH,      
IF{[f rx ord type]'="TAKEHOME" [f rx ok];                                       
"TAKEHOME"^TAKEHOME,                                                            
"NC"^P,                                                                         
IF{[f rx calc]("MC2TAKEH")^MC2TAKEH_.=.;                                        
IF{(MC2TAKEH=1) [f rx set charge type](P);                                      
[f rx set charge type](TAKEHOME)}},                                             
[f rx set billing code](16031122),                                              
[f rx set rx comment](TH)};                                                     
;IF{[f rx calc]("MC2TAKEH")^MC2TAKEH_.=.;                                       
;IF{(MC2TAKEH=1) [f rx set charge type](NC);1}}};                               

--------------------------------------------------------------------------------------------
TAKEHOMETX       RX                EVL TXN               TAKE HOME RULE - - TX         
;Intent of the rule is to charge misc. take home charge code to medications     
;dispensed to to patients.  If the order type is takehome, the misc. take       
;home number (16031122) is placed into billing prompt                           
IF{[f rx ord type]'="TAKEHOME" [f rx ok];                                       
[f rx set billing code](16031122)};                                             

--------------------------------------------------------------------------------------------
TEMAOV65         RX                EVL FILE              TEMAZEPAM>65,ST.ORD, LIMIT 15 
;standard orders contain temazepam <65=30mg, >65=15.                            
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients >= 65yo is for 15 mg temazepam, not 30mg"^W,      

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 54
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'<65&([f rx dose]=30)) [f rx err msg](W);[f rx ok]}};         

--------------------------------------------------------------------------------------------
TEMAUN65         RX                EVL FILE              TEMAZEPAM<65,ST.ORD, 30 MG    
;standard orders contain temazepam <65=30mg, >65=15.                            
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients <= 64yo is for 30 mg temazepam, not 15mg"^W,      
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'>64&([f rx dose]=15)) [f rx err msg](W);[f rx ok]}};         

--------------------------------------------------------------------------------------------
TEMP.LOC         RX                EVL MED               Flags user if in temp location
[f pt temp loc]^TLC,                                                            
IF{'TLC 1;                                                                      
[f pt location]^PLC,                                                            
IF{PLC=TLC 1;PLC="SDC" 1;                                                       
("Note:Nursing has patient in temp location of "_TLC_". Check PYXIS issues")^MS,
[f rx msg](MS)}};                                                               

--------------------------------------------------------------------------------------------
TEST             RX                EVL MED               TEST                          
IF{[f z pharmacist]="Y" 1,                                                      
[f rx nth ver Res-RES]("PLT",1)^PLT,                                            
IF{PLT_.=. [f rx msg]("Platelets not done"),1;                                  
PLT#"0,"^VAL,PLT#"1,"^DATE,PLT#"2,"^TIME,                                       
"Lovenox check: Last Platelet level LOW! "^M1,                                  
(M1_VAL_" on "_DATE_" @ "_TIME_" Continue????")^MSG,                            
IF{VAL<150 1,                                                                   
IF{[f rx yes/no](MSG)=1 [f rx ok];                                              
[f rx err msg]("Please call MD to discuss options")};                           
[f rx msg]("Last Platelet OK - "_VAL_" on "_DATE_" @ "_TIME)}};1};              

--------------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------------
TNA.SITE         RX                EVL FILE              TNA SITE MUST BE C OR P       
;This rule does not allow amino acids to be used unless order type "T"          
[f z.infusion.site]^IS,                                                         
("IV site for TNAs must C for Central or P for Peripheral- Not",(IS))^E,        
IF{(IS="C"!(IS="P")) [f rx ok];[f rx err msg](E)};                              

--------------------------------------------------------------------------------------------
TPN.ORD.TY       RX                EVL MED               MAKES AA FOR ORDER TYPE T ONLY
;This rule does not allow amino acids to be used unless order type "T"          
"IV order type for TPNs should be TNA "^E,                                      
IF{[f rx med]="AA10-WO-AD"&([f rx ord type]="TNA") [f rx ok];[f rx err msg](E)};

--------------------------------------------------------------------------------------------
TPN.TPN          RX                EVL MED               MAKESTPN FOR ORDER TYPE T ONLY
;This rule does not allow amino acids to be used unless order type "T"          

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 61
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
"IV order type for TPNs should be TNA"^E,                                       
IF{[f rx med]="TNA"&([f rx ord type]="TNA") [f rx ok];[f rx msg](E)};           

--------------------------------------------------------------------------------------------
TRIA0.25         RX                EVL FILE              TRIAZOLAM <65                 
;standard orders contain HALCION <65=0.25Mg, >65=0.125.                         
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients <= 64yo is for 0.25 mg Triazolam, not 0.125mg"^W, 
"Standard orders for patients >=65 is 0.125 mg Triazolam, not 0.25 mg"^R,       
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'>64&([f rx dose]=0.125)) [f rx err msg](W);                  
IF{([f pt cur age]'<65&([f rx dose]=0.25)) [f rx err msg](R);[f rx ok]}}};      

--------------------------------------------------------------------------------------------
TRIA0125         RX                EVL FILE              TRIAZOLAM >65                 
;standard orders contain HALCION <65=0.25Mg, >65=0.125.                         
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients >65 is for 0.125 mg Triazolam, not 0.25mg"^W,     
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'<65&([f rx dose]=0.25)) [f rx err msg](W);[f rx ok]}};       

--------------------------------------------------------------------------------------------
TROG.ALT         RX                EVL MED               TROGLITAZONE - ALT CHECK      
; 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)}};                                       

--------------------------------------------------------------------------------------------
UD.RATE.BL       RX                EVL FILE              UD - BLOCKS FROM ENTERING IV  
;PLAN IS TO BLOCK/PREVENT FROM FILING IV WITH UD                                
;[f rx iv rate];                                                                
IF{[f rx calc]("UD.RATE.CA")^RATE_.=.;                                          
"Please enter valid rate for IV"^MES,                                           
IF{RATE [f rx err msg](MES);1}};                                                

--------------------------------------------------------------------------------------------
UD.RATE.CA       CALC              EVL FILE              CALCULATES RATE FOR BLOCK     
;PLAN IS TO BLOCK/PREVENT FROM FILING IV WITH UD                                
""^BLOCK,                                                                       
IF{([f rx iv rate]="UD"&([f rx chg type]="EPID")) 1^BLOCK};                     

--------------------------------------------------------------------------------------------
UNAS.RATE        RX                EVL FILE              UNASYN RATE -MUST BE 100      
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Unasyn should not exceed 110 ml/hr"^B,                                
IF{CIPRRATE>116 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
VANC.0602        RX                EVL MED               Vanco- Feb 06                 
[f pt oe wt kgs]^ABW:0D^ABWD^ABD,                                               

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 62
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
ABW*10^DS1,                                                                     
ABW*15^DS2,                                                                     
DS1:8D/250^UD1:0D^UD1,                                                          
DS2:8D/250^UD2:0D^UD2,                                                          
UD1*250^CD1,                                                                    
UD2*250^CD2,                                                                    
CD1:10D/ABW^MGK1:0D^MGK1,                                                       
CD2:10D/ABW^MGK2:0D^MGK2,                                                       
""^IZ^IBWM,                                                                     
IF{[f pt sex]^SXR_.=. IZ_"*Missing Sex  "^IZ},                                  
IF{[f pt oe ht cm]^HTR_.=. IZ_"*Missing Ht  "^IZ},                              
IF{IZ_.=. 1,                                                                    
IF{SXR="M" 50;45.5}^SR,                                                         
IF{SXR="M" 1;0.85}^FR,                                                          
SR+(2.3*((HTR/2.54)-60)!0)^IBW:0D^IBWD;("IBW Not available "_IZ)^NIBW},         
IF{ABW>1&(IBW>1),((ABW-IBW)*0.4)+IBW^DW:0D^DDW},                                
IF{ABW_.=.&(IBW>1) ("IBW="_IBW_" Kg.  Missing Actual Body Weight")^IBWM},       
IF{ABW>1&(IBW>1) 1^OK,((ABW:8D/IBW)*100)^PIBW:0D^PIBWR},                        
IF{OK=1&(PIBW>130) (PIBWR_"% IBW, Since >130% Monitor more freq.")^PIBWD;1,     
(PIBWR_"% IBW")^PIBWD},                                                         
IF{OK=1 ("ABW="_ABWD_" Kg, DW:"_DDW_" Kg, IBW:"_IBWD_" Kg ("_PIBWD)_")"^IBWM},  
[f rx calc]("CRCL.C.IBW")^CRCL,                                                 
[f z patient age in yrs]^AGE,                                                   
[f pt cur age]^CAGE,                                                            
IF{AGE<16 [f rx msg]("Age < 16 will not calculate Vanco Dose");                 
""^VD1^VD2^PKG^VDM,                                                             
IF{AGE>65.99&(ABW>1) ">65yo ("_CAGE_"yo): Dose 10 - 15 Mg/Kg ABW("_ABD_")"^VDM, 
(VDM_" ("_CD1_"mg - "_CD2_"mg = "_MGK1_"-"_MGK2_"mg/kg)")^VDM},                 
IF{AGE<66&(ABW>1) ("<66yo ("_CAGE_"yo): Dose at 15 Mg/Kg ABW("_ABD_")")^VDM,    
(VDM_": ("_CD2_"mg="_MGK2_" Mg/Kg)")^VDM},                                      
IF{AGE>65.99&(ABW_.=.) 1,                                                       
">65yo ("_CAGE_"yo): Dose 10 - 15 Mg/Kg ABW (Missing Weight)"^VDM},             
IF{AGE<66&(ABW_.=.) 1,                                                          
"<66yo ("_CAGE_"yo): Dose 15 Mg/Kg ABW (Missing Weight)"^VDM},                  
IF{CRCL#0="*" 1,                                                                
[f rx win init],                                                                
[f rx win add]("Vanco Dosing"),                                                 
[f rx win add](IBWM),                                                           
[f rx win add](VDM),                                                            
[f rx win add]("Est. CrCl can not be calculated for the following reason(s)"),  
[f rx win add](CRCL),                                                           
IF{CRCL#9'="C" 1,                                                               
[f rx nth ver Res-RES]("CR",1)^RE1,                                             
("FYI Last Cr info:  "_(RE1#"0,")_" @"_(RE1#"1,")_" "_(RE1#"2,"))^L1},          
[f rx win add](L1),                                                             
[f rx win disp],1;                                                              
IF{CRCL>49.9&(AGE>65.99) "Q24H"^SIG;                                            
CRCL>49.9&(AGE<65.99) "Q12H"^SIG;CRCL>20 "Q24H"^SIG;"Q??H"^SIG},                
;IF{CRCL>49.9 "Q12H"^SIG;CRCL>20 "Q24H"^SIG;"Q??H"^SIG},                        
IF{AGE>65.99&(ABW>1) VDM_" "_SIG^VDM},                                          
IF{AGE<66&(ABW>1) VDM_" "_SIG^VDM},                                             
;(VDM_" ("_CD1_"mg - "_CD2_"mg = "_MGK1_"-"_MGK2_"mg/kg) "_SIG)^VDM;            
;(VDM_": ("_CD2_"mg="_MGK2_" Mg/Kg) "_SIG)^VDM},                                
IF{[f rx nth ver Res-RES]("CR",1)^RE1,                                          
("Based on Cr: "_(RE1#"0,")_" on "_(RE1#"1,")_" @ "_(RE1#"2,"))^M1,             
IF{[f rx nth ver Res-RES]("CR",2)^RE2_.=. " "^M2;                               
(" ":27_"Previous Cr "_(RE2#"0,")_" on "_(RE2#"1,")_" @ "_(RE2#"2,"))^M2},      

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 63
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;IF{[f rx nth ver Res-RES]("CR",3)^RE3_.=. " "^M3;                              
;(" ":39_(RE3#"0,")_" on "_(RE3#"1,")_" @ "_(RE3#"2,"))^M3},                    
(("Est. CrCl = ",CRCL," ml/min        "):26T_M1)^EST},                          
[f rx win init],                                                                
[f rx win add]("Vanco Dose"),                                                   
[f rx win add](IBWM),                                                           
[f rx win add](VDM),                                                            
[f rx win add](EST),                                                            
[f rx win add](M2),                                                             
;[f rx win add](M3),                                                            
[f rx win disp],1}};                                                            

--------------------------------------------------------------------------------------------
VECU.BOLUS       RX                EVL MED               VECURONIUM (NORCURON) BOLUS   
;USED TO CALCULATE VECURONIUM INTERMITTENT &  IV BOLUS DOSE                     
"Would you like the computer to calculate INTERMITTENT BOLUS & LOADING DOSE?"^P,
"No  WT, press SPECIAL FNC KEY - Edit PT Data - then enter weight."^S,          
"You will have to exit order and reenter the word SET at the type prompt "^S2,  
;"YOU have not weight"^T,                                                       
;"THIS IS NOT A M order"^NM,                                                    
;"lets calculate"^A,                                                            
"no calculations required"^B,                                                   
IF{[f rx ord type]="SIM" 1^X,                                                   
[f pt oe wt kgs]^WT_.=.,                                                        
IF{X IF{WT 1,                                                                   
(WT*0.1):1D^ILD,                                                                
(WT*0.2):1D^IHD,                                                                
(WT*0.08):1D^BLD,                                                               
("INTERMITTENT IV Dose = 0.1-0.2 mg/kg  = ",(ILD),"-",(IHD),"mg q 1-3 hrs")^BM1,
"Assuming a 20mg vial of vecuronium is reconstituted with 20 ml SWFI"^BM2,      
("Dose/volume = ",(ILD),"mg  (",(ILD),")ml  - ",(IHD),"mg (",(IHD),")ml")^BM3,  
("Loading dose for Inf.= ",(BLD),"-",(ILD),"mg -wait 20 min then start inf.")^I,
"See Rx Comments if wish to review doses"^BM5,                                  
[f rx win init],                                                                
[f rx win add](BM1),                                                            
[f rx win add](BM2),                                                            
[f rx win add](BM3),                                                            
[f rx win add](I),                                                              
[f rx win add](BM5),                                                            
[f rx win disp],                                                                
("INTERMITTENT bolus dose for",(WT),"kg= ",(ILD),"-",(IHD),"mg q 1-3 hrs")^CM,  
[f rx set rx comment](CM),                                                      
[f rx set rx comment](I);                                                       
[f rx win init],                                                                
[f rx win add](S),[f rx win add](S2),                                           
[f rx win disp]};                                                               
1};1};                                                                          
;                                                                               
;                     VECURONIUM (Norcuronium)                                  
;               USE IN THE MECHANICALLY VENTILATED                              
;                           ICU PATIENT                                         
;Vecuronium (Norcuron) is a non-depolarizing neuro- muscular                    
;blocking agent which is often used in the mechanically ventilated              
;ICU patient to achieve pharmacologic paralysis.  Paralysis                     
;improves oxygenation since the patient is prevented from                       
;"fighting the ventilator".                                                     
;                                                                               

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 64
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;Vecuronium can be given as intermittent boluses or by                          
;continuous infusion.  Of the class of non-depolarizing                         
;neuromuscular blocking agents, vecuronium is of intermediate                   
;duration of action and 25 - 85% of baseline muscle function will               
;return within 10 to 30 minutes of discontinuation.                             
;                                                                               
;DOSING:                                                                        
;1)  Intermittent IV boluses:  0.1 - 0.2 mg/kg every 1-3 hours.                 
;                                                                               
;2)  Continuous Infusion:  Give loading dose or 0.08 - 0.1 mg/kg.               
;    Wait 20- 40 minutes and start a maintenance infusion of                    
;    0.8-1.2 mcg/kg/min.                                                        
;                                                                               
;                          INFUSION DOSING CHART                                
;DOSE |Weight (Kg)| 40 | 50 | 60 | 70 | 80 | 90 | 100|                          
;(mcg/Kg/min)      |    |    |    |    |    |    |    |                         
;0.8               | 10 | 12 | 14 | 17 | 19 | 22 | 24 |                         
;0.9               | 11 | 14 | 16 | 19 | 22 | 24 | 27 |                         
;1.0             | | 12 | 15 | 18 | 21 | 24 | 27 | 30 |                         
;1.1             | | 13 | 17 | 20 | 23 | 26 | 30 | 33 |                         
;1.2             | | 14 | 18 | 22 | 25 | 29 | 32 | 36 |                         
;Above answers are in ml/hr                                                     
; ** MIXING INSTRUCTIONS **: Recon a 20 mg vial with 20 ml                      
;  sterile water. Withdraw 20 ml from a D5W 100 ml bag. Add                     
;  20 ml (20mg) vercuronium to 80 ml D5W. CONC = 200 mcg/ml**                   
;                                                                               
;    ** Maintenance infusions are usually started at the low                    
;        end of the dosing range and are titrated to desired level              
;        of paralysis, general not exceeding the maximum dose.                  
;                                                                               
;MONITORING:  Due to the variable response to Norcuron (tm),                    
;             which is patient specific, it is important to                     
;             monitor patients closely for excessive muscle                     
;             paralysis.                                                        
;                                                                               
;**IMPORTANT NOTE:  Therapy MUST include the concomitant                        
;use of a benzodiazepine such as lorazepam, diazepam, or                        
;midazolam, while the patient is on a neuromuscular blocker.                    
;This helps prevent anxiety which is associated with muscle                     
;paralysis.  Please review each patient on a neuromuscular blocker              
;for adequate levels of conscious sedation.                                     
;                                                                               
;**THIS IS NOT A PROTOCOL AND IS NOT TO BE PLACED IN THE PATIENT'S              
;  CHART. FOR REFERENCE PURPOSES ONLY**                                         

--------------------------------------------------------------------------------------------
VECU.DRIP        RX                EVL MED               VECURONIUM (NORCURON) DRIP    
;USED TO CALCULATE VECURONIUM DRIP FROM STANDARD ORDER                          
"Would you like the computer to aid in dosing a Vecuronium BOLUS?"^P,           
"No  WT, to enter WT, Line feed med and press SPECIAL FNC KEY - Edit PT Data"^S,
"Once Weight is entered, select the med again to proceed with calcuations"^S2,  
;"YOU have not weight"^T,                                                       
IF{[f rx ord type]="SII" 1^X,                                                   
[f pt oe wt kgs]^WT_.=.,                                                        
IF{X IF{WT 1,                                                                   
(((WT*0.8)*60)*0.005):1D^I1,                                                    
(((WT*0.9)*60)*0.005):1D^I2,                                                    

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 65
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
(((WT*1)*60)*0.005):1D^I3,                                                      
(((WT*1.1)*60)*0.005):1D^I4,                                                    
(((WT*1.2)*60)*0.005):1D^I5,                                                    
"Note following rates below assume vecuronium drip with a final "^M1,           
"concentration of 20mg/100ml - these rates are accurate for 1mg/5ml conc."^M2,  
("[0.8 mcg/kg/min =",(I1),"ml/hr], [0.9 mcg/kg/min = ",(I2),"ml/hr]")^MI2,      
("[1 mcg/kg/min = ",(I3),"ml/hr], [1.1 mcg/kg/min= ",(I4),"ml/hr],")^MI4,       
("[1.2 mcg/kg/min = ",(I5),"ml/hr] - SEE RX COMMENTS FOR DOSE DETAILS")^MI5,    
[f rx win init],                                                                
[f rx win add](M1),                                                             
[f rx win add](M2),                                                             
[f rx win add](MI2),                                                            
[f rx win add](MI4),                                                            
[f rx win add](MI5),                                                            
[f rx win disp],                                                                
[f rx set rx comment](M2),                                                      
[f rx set rx comment](MI2),[f rx set rx comment](MI4),                          
[f rx set rx comment](MI5);                                                     
[f rx win init],                                                                
[f rx win add](S),[f rx win add](S2),                                           
[f rx win disp]};                                                               
1};1};                                                                          
;                                                                               
;                     VECURONIUM (Norcuronium)                                  
;               USE IN THE MECHANICALLY VENTILATED                              
;                           ICU PATIENT                                         
;Vecuronium (Norcuron) is a non-depolarizing neuro- muscular                    
;blocking agent which is often used in the mechanically ventilated              
;ICU patient to achieve pharmacologic paralysis.  Paralysis                     
;improves oxygenation since the patient is prevented from                       
;"fighting the ventilator".                                                     
;                                                                               
;Vecuronium can be given as intermittent boluses or by                          
;continuous infusion.  Of the class of non-depolarizing                         
;neuromuscular blocking agents, vecuronium is of intermediate                   
;duration of action and 25 - 85% of baseline muscle function will               
;return within 10 to 30 minutes of discontinuation.                             
;                                                                               
;DOSING:                                                                        
;1)  Intermittent IV boluses:  0.1 - 0.2 mg/kg every 1-3 hours.                 
;                                                                               
;2)  Continuous Infusion:  Give loading dose or 0.08 - 0.1 mg/kg.               
;    Wait 20- 40 minutes and start a maintenance infusion of                    
;    0.8-1.2 mcg/kg/min.                                                        
;                                                                               
;                          INFUSION DOSING CHART                                
;DOSE |Weight (Kg)| 40 | 50 | 60 | 70 | 80 | 90 | 100|                          
;(mcg/Kg/min)      |    |    |    |    |    |    |    |                         
;0.8               | 10 | 12 | 14 | 17 | 19 | 22 | 24 |                         
;0.9               | 11 | 14 | 16 | 19 | 22 | 24 | 27 |                         
;1.0             | | 12 | 15 | 18 | 21 | 24 | 27 | 30 |                         
;1.1             | | 13 | 17 | 20 | 23 | 26 | 30 | 33 |                         
;1.2             | | 14 | 18 | 22 | 25 | 29 | 32 | 36 |                         
;Above answers are in ml/hr                                                     
; ** MIXING INSTRUCTIONS **: Recon a 20 mg vial with 20 ml                      
;  sterile water. Withdraw 20 ml from a D5W 100 ml bag. Add                     
;  20 ml (20mg) vercuronium to 80 ml D5W. CONC = 200 mcg/ml**                   

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 66
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
;                                                                               
;    ** Maintenance infusions are usually started at the low                    
;        end of the dosing range and are titrated to desired level              
;        of paralysis, general not exceeding the maximum dose.                  
;                                                                               
;MONITORING:  Due to the variable response to Norcuron (tm),                    
;             which is patient specific, it is important to                     
;             monitor patients closely for excessive muscle                     
;             paralysis.                                                        
;                                                                               
;**IMPORTANT NOTE:  Therapy MUST include the concomitant                        
;use of a benzodiazepine such as lorazepam, diazepam, or                        
;midazolam, while the patient is on a neuromuscular blocker.                    
;This helps prevent anxiety which is associated with muscle                     
;paralysis.  Please review each patient on a neuromuscular blocker              
;for adequate levels of conscious sedation.                                     
;                                                                               
;**THIS IS NOT A PROTOCOL AND IS NOT TO BE PLACED IN THE PATIENT'S              
;  CHART. FOR REFERENCE PURPOSES ONLY**                                         

--------------------------------------------------------------------------------------------
VOL.TOT          CALC              EVL MED               DETERMINES IV'S TOTAL VOL     
;DETERMINES VOLUME - PUTS INTO VOL                                              
[f rx iv tot vol]^VOL;                                                          

--------------------------------------------------------------------------------------------
WCOMP            RX                EVL FILE              ZERO CHARGE FOR WORKMANS COMP 
;WILL NO ALLOW CHARGES FOR WORKMANS COMP                                        
;"CHARGE FOR WORKMANS COMP SHOULD BE $0.00"^B,                                  
;"dit 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]};              
;--------------------                                                           
;MODIFIED 6/21/00- won't allow wcomp charge type period- must be wcomp2 and     
;and order type wcomp                                                           
"WCOMP is no longer a valid charge type, must be WCOMP2 and ORDER TYPE=WCOMP"^N,
"ALL WORKMANS COMP should be entered with an ORDER TYPE of WCOMP - not M"^L,    
IF{[f rx chg type]="WCOMP" [f rx err msg](N);                                   
IF{([f rx chg type]="WCOMP2"&([f rx ord type]'="WCOMP")) [f rx err msg](L);1}}; 

--------------------------------------------------------------------------------------------
WCOMP2           RX                EVL MED               WORKMANS COMP2 CHARGE TYPE    
;This rule sets charge type of wcomp2 to wcomp order types.                     
;the label autocalculates - charge/cost for info systems.                       
IF{[f rx ord type]'="WCOMP" [f rx ok];                                          
[f rx set charge type]("WCOMP2")};                                              

--------------------------------------------------------------------------------------------
WCOMPPT          RX                EVL MED               WCOMP- PATIENT IDENTIFIER     
;This rule warns RPhs when filling rx for a employee who is on workmans comp    
"WARNING-THIS IS A WORKMANS COMP PATIENT!! - SHOULD THE ORDER TYPE BE WCOMP?"^W,
IF{[f pt location]'="EMP" [f rx ok];                                            
IF{[f rx ord type]="WCOMP" [f rx ok];                                           
IF{[f z ins2]="WC" [f rx msg](W);[f rx ok]}}};                                  

--------------------------------------------------------------------------------------------

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 67
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
WCOMPPTF         RX                EVL FILE              WCOMP- PATIENT IDENTIFIER     
;This rule warns RPhs when filling rx for a employee who is on workmans comp    
"IF med is for Workmans comp- ORDER type should be WCOMP "^W,                   
"IF med is not for workmans comp - please disregard message"^W1,                
"IF pt is no longer Workmans comp, please update ADM profile or notify Herb"^W2,
IF{[f pt location]'="EMP" [f rx ok];                                            
IF{[f rx ord type]="WCOMP" [f rx ok];                                           
IF{[f z ins2]="WC" [f rx msg](W),[f rx msg](W1),[f rx msg](W2);[f rx ok]}}};    

--------------------------------------------------------------------------------------------
ZADEN.BLK        RX                EVL MED               ADENOSINE - NOCALC FOR MEDICRE
IF{[f rx calc]("MEDICARE")^INS_.=.;                                             
"NOCALC"^P,                                                                     
IF{INS=1 [f rx set charge type](P),[f rx msg]("MEDICARE");                      
[f rx msg]("not mc")}};                                                         
;IF{[f rx calc]("MC2")^MC2_.=.;                                                 
;IF{(MC2=1) [f rx set charge type](P);[f rx set charge type](O)}}}};            

--------------------------------------------------------------------------------------------
ZEMP.CHG         RX                EVL MED               EMP-CONTRACT charge code chg  
;This rule changes the charge code based on employee status                     
;The reason it is ZEMP.CHG is so it's evaluated after the MEDBLOCK CHG          
"PLEASE EDIT PATIENT'S GUARANTOR'S OCCUPATION IN THE PATIENT CENSUS ROUTINE"^U, 
"IF med is a OTC, please change charge code to HOS-OTC"^H,                      
IF{[f pt facility]="." [f rx ok];                                               
IF{[f rx ord type]'="M" [f rx ok];                                              
IF{[f pt guar occ]="MNA" [f rx set charge type]("RN");                          
IF{[f pt guar occ]="RN" [f rx set charge type]("RN");                           
IF{[f pt guar occ]="AFSCME" [f rx set charge type]("EMP");                      
IF{[f pt guar occ]="NC" [f rx set charge type]("RN");                           
IF{[f pt guar occ]="DS" [f rx set charge type]("DS");                           
IF{[f pt guar occ]="HOS" [f rx set charge type]("HOS");                         
IF{[f pt guar occ]="HOSP" [f rx set charge type]("HOS");                        
IF{[f pt guar occ]="AMB" [f rx set charge type]("AMB");                         
[f rx msg](U)}}}}}}}}}};                                                        

--------------------------------------------------------------------------------------------
ZHOS             RX                EVL MED               HOSPICE CONTRACT              
;This rule changes the charge code based on HOSPICE PATIENTS.                   
;THERE ARE TO RULES. ZEMP (FOR NOT "." FACILTY PATINETS.                        
; AS OF 2/1/99 - ALL HOSPICE PATIENT'S WILL BE IN THE ". FACILITY               
;The reason it is ZEMP.CHG is so it's evaluated after the MEDBLOCK CHG          
IF{[f pt facility]'="." [f rx ok];                                              
IF{[f rx ord type]'="M" [f rx ok];                                              
IF{[f pt location]="NP-HOSPICE" [f rx set charge type]("HOS");[f rx ok]}}};     

--------------------------------------------------------------------------------------------
ZOLPOV65         RX                EVL FILE              ZOLPIDEM OV 65, ONLY 5MG DOSE 
;standard orders contain ZOLPIDEM <65=10mg, >65=5.                              
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients >= 65yo is for 5 mg ZOLPIDEM, not 10mg"^W,        
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'<65&([f rx dose]=10)) [f rx err msg](W);[f rx ok]}};         

--------------------------------------------------------------------------------------------
ZOLPUN65         RX                EVL FILE              ZOLPIDEM <65,ST.ORD, 10 MG    
;standard orders contain ZOLPIDEM <65=10mg, >65=5.                              

RUN DATE: 01/11/07        NORTH COUNTRY NPR PHARMACY 4.6 **LIVE**                    PAGE 68
RUN TIME: 0849                   pha.rule.zcus.hab.download              
RUN USER: HAB
; they are not alway entered correctly, rule will monitor age.                  
"Standard orders for patients <= 64yo is for 10 mg zolpidem, not 5mg"^W,        
IF{[f rx ord type]'="T" [f rx ok];                                              
IF{([f pt cur age]'>64&([f rx dose]=5)) [f rx err msg](W);[f rx ok]}};          

--------------------------------------------------------------------------------------------
ZOSY.RTE         RX                EVL FILE              ZOSYNCIPRO RATE -MUST BE 100  
IF{[f rx calc]("CIPRRATE")^CIPRRATE_.=.;                                        
"Rate for Zosyn should not exceed 120 ml/hr"^B,                                 
IF{CIPRRATE>120 [f rx err msg](B);1}};                                          

--------------------------------------------------------------------------------------------
ZOSY.VOL         RX                EVL FILE              ZOSYN <100 ML WARNING         
;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]};                                          

--------------------------------------------------------------------------------------------



Keywords

CALC z drug ndc numb drug ndc number @PHA.DRUG.ndc.din.number -------------------------------------------------------------------------------------------- CALC z insurance mne.#1 insurance mnemnlic #1 ADM.PAT.insurance.mnemonic[1] -------------------------------------------------------------------------------------------- CALC z numb.to.disp.calc number to dispense- outpat - calc rule @PHA.RX.out.refill.num.dispense -------------------------------------------------------------------------------------------- CALC z out dft chg type outpt dft charge type @PHA.DRUG.dft.out.chg.type -------------------------------------------------------------------------------------------- CALC z rx first carrier rx first carrier @PHA.RX.first.carrier -------------------------------------------------------------------------------------------- PAT z test.mri.urn z mri.urn @mri.urn -------------------------------------------------------------------------------------------- PAT z test.pat2 z test.pat2 @PHA.RX.patient -------------------------------------------------------------------------------------------- RX z additive z additive (checks to see if additive) @PHA.DRUG.additive -------------------------------------------------------------------------------------------- RX z adr class in Inactive Class ADR ""^PR^CNT, DO{@Next(PHA.PAT.class.adr) IF{@PHA.CLASS.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z adr gen in Inactive generic ADRS ""^PR^CNT, DO{@Next(PHA.PAT.generic.adr) IF{@PHA.GENERIC.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z all class - last Last class allergy for patient @Last(PHA.PAT.class.allergy) -------------------------------------------------------------------------------------------- RX z all class 2 allergies - class - 2 ""^PR^CNT, DO{@Next(PHA.PAT.class.allergy) IF{@PHA.CLASS.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z all class in Inactive Class Allergies ""^PR^CNT, DO{@Next(PHA.PAT.class.allergy) IF{@PHA.CLASS.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z all class last in allergy class last inactive @PHA.CLASS.active[@First(PHA.PAT.class.allergy)] -------------------------------------------------------------------------------------------- RX z all class list List Class Allergies ""^CLS, DO{@Next(PHA.PAT.class.allergy) IF{@PHA.PAT.class.allergy'="NKA" 1, CLS_" "_@PHA.PAT.class.allergy^CLS}},CLS -------------------------------------------------------------------------------------------- RX z all gen and cls ls Generic and Class List allergies ""^GEN^CLS^GENA^AGEN^ACLS^ALLG^AGENA, DO{@Next(PHA.PAT.generic.allergy) 1, IF{@PHA.PAT.generic.allergy^GENA="NKA"!(GENA="NONE") 1; GEN_" "_@PHA.PAT.generic.allergy^GEN}}, DO{@Next(PHA.PAT.class.allergy) IF{@PHA.PAT.class.allergy="NKA" 1; CLS_" "_@PHA.PAT.class.allergy^CLS}}, ;CRASHING WHEN GO TO ADRS - SUSPECT ISSUE WITH SYMBOL TABLE OVERFLOW ;IF{@PHA.PAT.generic.adr^AGENA="NKA"!(AGENA="NONE") 1; ;AGEN_" "_AGENA^AGEN}}, ;DO{@Next(PHA.PAT.class.adr) IF{@PHA.PAT.class.adr'="NKA" 1, ;ACLS_" "_@PHA.PAT.class.adr^ACLS}}, GEN_AGEN_CLS_ACLS^ALLG, IF{L(ALLG)>40 ALLG$40_"..+ more..";ALLG} -------------------------------------------------------------------------------------------- RX z all gen in Inactive generic allergies ""^PR^CNT, DO{@Next(PHA.PAT.generic.allergy) IF{@PHA.GENERIC.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z all generic first allergy - First Generic @First(PHA.PAT.generic.allergy) -------------------------------------------------------------------------------------------- RX z all generic last all - Generic last @Last(PHA.PAT.generic.allergy) -------------------------------------------------------------------------------------------- RX z all generic list Generic allergies list ""^GEN, DO{@Next(PHA.PAT.generic.allergy) IF{@PHA.PAT.generic.allergy'="NKA" 1, GEN_" "_@PHA.PAT.generic.allergy^GEN}},GEN -------------------------------------------------------------------------------------------- RX z all ing in Inactive Ingredient allergies ""^PR^CNT, DO{@Next(PHA.PAT.allergy.code) IF{@PHA.ALLERGY.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z all.class.nka First allergy class (not just nka) @First(PHA.PAT.class.allergy) -------------------------------------------------------------------------------------------- RX z all.gen.in Invactive Generic Allergies ""^PR^CNT, DO{@Next(PHA.PAT.generic.allergy) IF{@PHA.GENERIC.active="N" 1+CNT^CNT}},CNT -------------------------------------------------------------------------------------------- RX z carrier Checks to see if drug can be a carrier @PHA.DRUG.carrier -------------------------------------------------------------------------------------------- RX z chk.med.mnem.dup check pt to see if other orders for me {@Z.rpt.fragment}^SV.F,{1}^{@Z.rpt.fragment}, @PHA.DRUG.mnemonic^/ZRPT.MED, %PHA.RX.zcus.hab.frag.rule.edm.dup.mnem.R("")X, ""^/ZRPT.MED, SV.F^{@Z.rpt.fragment},""^SV.F -------------------------------------------------------------------------------------------- RX z disp.form.p.dos.un Dispense forms per dose with Unit IF{@dose^V1, @PHA.DRUG.order.unit[@med]^V1A, @PHA.DRUG.order.size[@med]^V2, @PHA.DRUG.dispense.size[@med]^V3, @PHA.DRUG.strength.amt1[@med]^ST1, @PHA.DRUG.strength.amt2[@med]^ST2, @PHA.DRUG.dispense.unit[@med]^VU, @PHA.DRUG.dispense.form[@med]^VF, @PHA.DRUG.admin.form[@med]^AF, IF{(V2=V3)&(AF'=V1A) 1, IF{V2'=V1 1, V1:10D/V2^VR, VR:3D^VR, %Z.strip.trailing.zeros(VR)^MSDOSE, "*Dose: "_MSDOSE_" "_VF_"S X "_V3_" "_V1A_" = "_V1_" "_V1A^/Z.INFO}; IF{(AF'=V1A) 1, ST1:10D/ST2^CON, %Z.strip.trailing.zeros(CON)^CON, V1:10D/CON^VR, VR:3D^VR, %Z.strip.trailing.zeros(VR)_" "_VU^MSDOSE, "*Dose: "_MSDOSE_" = "_V1_" "_V1A^/Z.INFO};1;1}} -------------------------------------------------------------------------------------------- RX z disp.stock Dispense from stock for inventory @PHA.DRUG.inv.from.stock[@med,@inventory] -------------------------------------------------------------------------------------------- RX z dose.and.unit PHA.RX.dose.and.unit @PHA.RX.dose.and.unit -------------------------------------------------------------------------------------------- RX z drug ndc numb drug ndc number @PHA.DRUG.ndc.din.number -------------------------------------------------------------------------------------------- RX z drug.order.size PHA.DRUG.order.size @PHA.DRUG.order.size[@med] -------------------------------------------------------------------------------------------- RX z drug.order.unit PHA.DRUG.order.unit @PHA.DRUG.order.unit[@med] -------------------------------------------------------------------------------------------- RX z drug.type Med's Drug Type @PHA.DRUG.drug.type[@med] -------------------------------------------------------------------------------------------- RX z dup.mne.mri Duplicate Mnemonic on MRI {@Z.rpt.fragment}^SV.F,{1}^{@Z.rpt.fragment}, @PHA.DRUG.mnemonic^/ZRPT.MED, %PHA.RX.zcus.hab.frag.rule.dup.mne.mri.R("")X, ""^/ZRPT.MED^/ZRPT.MRI, SV.F^{@Z.rpt.fragment},""^SV.F -------------------------------------------------------------------------------------------- RX z elapsed.time elapsed time IF{%Z.elapsed.time(@.today,@.now,%Z.bdate.in(DATE),TIME,"hh")^ET},ET -------------------------------------------------------------------------------------------- RX z ins2 z insurance 2nd @ADM.PAT.ins.mnemonic.2 -------------------------------------------------------------------------------------------- RX z insur.mnemonic1 Insurance menonic #1 (DOESN'T WORK) ADM.PAT.insurance.mnemonic.1 -------------------------------------------------------------------------------------------- RX z lab.d-10 lab date minuts 10 %Z.date.add(@.today,0-10)^TEN, %Z.bdate.in(DATE)^LABD, IF{TEN<LABD "OK";"NOTOK"} -------------------------------------------------------------------------------------------- RX z label.comment.1 Label Comment 1 - Inp @label.comment[1] -------------------------------------------------------------------------------------------- RX z last lab ver date last lab verified date and time @LAB.L.SPEC.collection.date.and.time(Q)} -------------------------------------------------------------------------------------------- RX z mdx.allergy.y z mdx allergy IF{'@ADM.PAT.ccdqr.response["PHA.MDX.AL"] "NOT"; @ADM.PAT.ccdqr.response["PHA.MDX.AL"]="N" "NOT";1} -------------------------------------------------------------------------------------------- RX z med awp med's awp @PHA.DRUG.unit.awp[@med] -------------------------------------------------------------------------------------------- RX z med cost med's cost @PHA.DRUG.unit.cost[@med] -------------------------------------------------------------------------------------------- RX z mg.days.old MG - Level - days since done mg= MGD %Z.date.sub(@.today,%Z.bdate.in(MGD)) -------------------------------------------------------------------------------------------- RX z nui dectects NUI - test @.path -------------------------------------------------------------------------------------------- RX z numb to dispense number to dispense @PHA.RX.number.to.dispense -------------------------------------------------------------------------------------------- RX z number.to.disp Number to dispense - Inpatient use @number.to.dispense -------------------------------------------------------------------------------------------- RX z oe.pat.temp z oe.pat.temp @OE.PAT.temporary.location[@patient] -------------------------------------------------------------------------------------------- RX z order.string z order string @PHA.RX.order.string^/Z.STRING -------------------------------------------------------------------------------------------- RX z order.string.dose order.string used in IV - WORKS PHA.RX.order.string -------------------------------------------------------------------------------------------- RX z order.string.mn original.string.-shows string - works @PHA.RX.order.string -------------------------------------------------------------------------------------------- RX z order.type.type used to see if order.type.type = med @PHA.RX.order.type.short -------------------------------------------------------------------------------------------- RX z out dft chg type outpt dft charge type @PHA.DRUG.dft.out.chg.type -------------------------------------------------------------------------------------------- RX z pat.type patient type (out or in) @patient.type -------------------------------------------------------------------------------------------- RX z patient age in yrs patient age in yrs (decimal) %Z.date.sub(@.today,IF{@MIS.PAT.birthdate;@MIS.PAT.computed.birthdate})^AGE, (AGE:2D/365) -------------------------------------------------------------------------------------------- RX z patient urn z patient urn ** NOT WORKING ** @patient -------------------------------------------------------------------------------------------- RX z pharmacist z pharmacist - user in access dictionary IF{@.user^EU,""^PHA.ACCESS.user^PHA.ACCESS.mnemonic^P, DO{@Next(PHA.ACCESS.mnemonic,PHA.ACCESS.main) ""^PHA.ACCESS.user, DO{@Next(PHA.ACCESS.user,PHA.ACCESS.users) 1, IF{@PHA.ACCESS.user=EU @PHA.ACCESS.pharmacist^P^FN}}}},FN -------------------------------------------------------------------------------------------- RX z pt age in days patient age in days %Z.date.sub(@.today,IF{@MIS.PAT.birthdate;@MIS.PAT.computed.birthdate}) -------------------------------------------------------------------------------------------- RX z rate IV Rate (may only work at file) @rate -------------------------------------------------------------------------------------------- RX z rate.volume Rate Volume (just the number) ?file only @rate.volume -------------------------------------------------------------------------------------------- RX z remove.dose Remove *dose in line 1 of label comments %PHA.RX.zcus.hab.rule.label.comment.rem.dose.M.ck(urn); -------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- RX z rule generic.dup rule to send generic to report, chk dups {@Z.rpt.fragment}^SV.F,{1}^{@Z.rpt.fragment}, @PHA.DRUG.generic^/ZRPT.GENERIC, %PHA.RX.zcus.hab.frag.rule.edm.dup.order.R("")X, ""^/ZRPT.GENERIC, SV.F^{@Z.rpt.fragment},""^SV.F -------------------------------------------------------------------------------------------- RX z rx access pharmacy access IF{@.user^EU,""^PHA.ACCESS.user^PHA.ACCESS.mnemonic^P, DO{@Next(PHA.ACCESS.mnemonic,PHA.ACCESS.main) ""^PHA.ACCESS.user, DO{@Next(PHA.ACCESS.user,PHA.ACCESS.users) 1, IF{@PHA.ACCESS.user=EU @PHA.ACCESS.mnemonic^P^FN}}}},FN -------------------------------------------------------------------------------------------- RX z rx.inv.std.2e Standard inventory 2 east -page 2 form. @PHA.DRUG.query.response["RX.P.S.2E"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.2w Inventory Standard 2west @PHA.DRUG.query.response["RX.P.S.2W"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.aru inv.standard. aru- page 2 formulary @PHA.DRUG.query.response["RX.P.S.ARU"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.fc Inv. Standard stock.fc-page 2 formulary @PHA.DRUG.query.response["RX.P.S.FC"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.icu inv.stand.icu-page2 formulary @PHA.DRUG.query.response["RX.P.S.ICU"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.ob inventory standard ob-page 2 cust field @PHA.DRUG.query.response["RX.P.S.OB"] -------------------------------------------------------------------------------------------- RX z rx.inv.std.sbu Standard in SBU @PHA.DRUG.query.response["RX.P.S.SBU"] -------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- RX z set.lab.com.1.4 set 1, move 2-4 down 1 line %PHA.RX.zcus.hab.rule.label.comment.1.4.M.ck(urn); -------------------------------------------------------------------------------------------- RX z set.start.1700 Set Start Time 1700.stop 2300- warfarins %PHA.RX.zcus.hab.rule.start.1700.stop.2300.M.ck(urn); -------------------------------------------------------------------------------------------- RX z set.stop.t.2300 Set Stop to to Today @2300 %PHA.RX.zcus.hab.rule.stop.2300.M.ck(urn); -------------------------------------------------------------------------------------------- RX z sig.times.per.day sigs # times per day @MIS.DIR.times.per.day[@sig,".","PHA"] -------------------------------------------------------------------------------------------- RX z staff title z staff tile from mis page 6 *NOT WORK @MIS.USER.cd.response[@.user,"OA.TITLE"] -------------------------------------------------------------------------------------------- RX z stockmed date stockmed ee date (does not work) @PHA.RX.ee.stk.date -------------------------------------------------------------------------------------------- RX z t-1 T-1 %Z.date.add(@.today,0-1) ---------------------------------------------------------------- -------------------------------------------------------------------------------------------- RX z test.mri.urn mri.urn @patient[@urn] -------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------- RX z test.urn test if see temp urn /urn -------------------------------------------------------------------------------------------- RX z user mis office z user MIS office (Location) @MIS.USER.office[@.user] -------------------------------------------------------------------------------------------- RX z user.prv user provider @MIS.USER.user.doctor[@.user] -------------------------------------------------------------------------------------------- RX z.add.1 additive 1 - dose @PHA.RX.additive.dose[1] -------------------------------------------------------------------------------------------- RX z.any.allergies Any Allergis Exist @PHA.PAT.any.allergies -------------------------------------------------------------------------------------------- RX z.carrier.vol carrier.volume-line 1 test @PHA.RX.carrier.volume[1] -------------------------------------------------------------------------------------------- RX z.g.allergy Generic Allergy DO{@Next(PHA.PAT.generic.allergy) IF{@PHA.PAT.generic.allergy="YOUR ALLERGY" 1^X}},X -------------------------------------------------------------------------------------------- RX z.infusion.site Rx Infusion Site @PHA.RX.site -------------------------------------------------------------------------------------------- RX z.out.refill.num.dis Out patient refill .numb to dispense @PHA.RX.out.refill.num.dispense[0] --------------------------------------------------------------------------------------------

NPR Reports for Keywords


These are Magic 5.5 You can use Double T's viewer to view the report if you don't want to directly load them in your system. http://www.thomast357.com/magic_nprv.htm
To download, Right Click and select Save as Pharmacy NPR Reports for Rule KEYWORDS