BGP1CON ; IHS/CMI/LAB - measure AHR.A ;
;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
;
;
BETA(P,BDATE,EDATE,NMIB,NMIE) ;EP - BETA BLOCKER CONTRAINDICATION
;P - patient DFN
;BDATE - beginning date to search for contraindication
;EDATE - ending date of search for contraindication
;NMIB - beginning date to search for NMI refusal (not medically indicated)
;NMIE - ending date to search for NMI refusal (not medically indicated)
;
;return value = piece 1 = 1 for yes, contraindication found
; BLANK for no, contraindication not found
; piece 2 = text of what was found
;logic:
;2 different asthma diagnoses on 2 different dates between bdate and edate
;Hypotension dx between bdate and edate
;heart block >1 degree diagnosis between bdate and edate
;sinus bradycardia 1 dx between bdate and edate
;COPD - 2 diagnoses between bdate and edate on different dates
;NMI refusal documented for beta blocker between NMIB and NMIE
;CPT G8011 between NMIB and NMIE
;
G BETA^BGP1CON1
;
;
ASA(P,BDATE,EDATE,NMIB,NMIE) ;EP - does patient have an aspirin CONTRAINDICATION
;P - PATIENT DFN
;BDATE - BEGINNING DATE TO LOOK FOR DATA
;EDATE - ENDING DATE TO LOOK FOR DATA
;NMIB - nmi beginning date
;NMIE - ending date to look for nmi
;
;return value = piece 1 = 1 for yes, contraindication found
; blank for no, contraindication not found
; piece 2 = text of what was found
;
;Non-discontinued Prescription for warfarin between bdate and edate.
;Diagnosis 459.0 - Hemorrage DX EVER before EDATE
;NMI Refusal between NMIB and NMIE
;CPT G8008 between NMIB and NMIE
;
G ASA^BGP1CON1
;
ACEI(P,BDATE,EDATE,NMIB,NMIE) ;EP does patient have an ACEI contraidication
;P - patient DFN
;BDATE - beginning date to search for contraindication
;EDATE - ending date of search for contraindication
;NMIBD - beginning date to search for NMI refusal (not medically indicated)
;NMIED - ending date to search for NMI refusal (not medically indicated)
;
;return value = piece 1 = 1 for yes, contraindication found
; blank for no, contraindication not found
; piece 2 = text of what was found
;LOGIC:
;diagnosis between BDATE and EDATE in BGP CMS AORTIC STENOSIS DXS
;NMI refusal for drug in BGP HEDIS ACEI MEDS taxonomy between NMIB and NMIE
;NMI refusal for drug in BGP HEDIS ARB MEDS taxonomy between NMIB and NMIE
G ACEI^BGP1CON1
;
STATIN(P,BDATE,EDATE,NMIB,NMIE) ;EP does patient have an STATIN contraidication
;P - patient DFN
;BDATE - beginning date to search for contraindication
;EDATE - ending date of search for contraindication
;NMIBD - beginning date to search for NMI refusal (not medically indicated)
;NMIED - ending date to search for NMI refusal (not medically indicated)
;
;return value = piece 1 = 1 for yes, contraindication found
; blank for no, contraindication not found
; piece 2 = text of what was found
;LOGIC:
;PREGNANCY diagnosis between BDATE and EDATE
;NMI refusal for drug in BGP HEDIS STATIN MEDS taxonomy between NMIB and NMIE
;BREASTFEEDING education between BDATE and EDATE
;BREASTFEEDING POV between BDATE and EDATE
;alchohol hepatitis pov between BDATE and EDATE
;
G STATIN^BGP1CON1
;
BGP1CON ; IHS/CMI/LAB - measure AHR.A ;
+1 ;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
+2 ;
+3 ;
BETA(P,BDATE,EDATE,NMIB,NMIE) ;EP - BETA BLOCKER CONTRAINDICATION
+1 ;P - patient DFN
+2 ;BDATE - beginning date to search for contraindication
+3 ;EDATE - ending date of search for contraindication
+4 ;NMIB - beginning date to search for NMI refusal (not medically indicated)
+5 ;NMIE - ending date to search for NMI refusal (not medically indicated)
+6 ;
+7 ;return value = piece 1 = 1 for yes, contraindication found
+8 ; BLANK for no, contraindication not found
+9 ; piece 2 = text of what was found
+10 ;logic:
+11 ;2 different asthma diagnoses on 2 different dates between bdate and edate
+12 ;Hypotension dx between bdate and edate
+13 ;heart block >1 degree diagnosis between bdate and edate
+14 ;sinus bradycardia 1 dx between bdate and edate
+15 ;COPD - 2 diagnoses between bdate and edate on different dates
+16 ;NMI refusal documented for beta blocker between NMIB and NMIE
+17 ;CPT G8011 between NMIB and NMIE
+18 ;
+19 GOTO BETA^BGP1CON1
+20 ;
+21 ;
ASA(P,BDATE,EDATE,NMIB,NMIE) ;EP - does patient have an aspirin CONTRAINDICATION
+1 ;P - PATIENT DFN
+2 ;BDATE - BEGINNING DATE TO LOOK FOR DATA
+3 ;EDATE - ENDING DATE TO LOOK FOR DATA
+4 ;NMIB - nmi beginning date
+5 ;NMIE - ending date to look for nmi
+6 ;
+7 ;return value = piece 1 = 1 for yes, contraindication found
+8 ; blank for no, contraindication not found
+9 ; piece 2 = text of what was found
+10 ;
+11 ;Non-discontinued Prescription for warfarin between bdate and edate.
+12 ;Diagnosis 459.0 - Hemorrage DX EVER before EDATE
+13 ;NMI Refusal between NMIB and NMIE
+14 ;CPT G8008 between NMIB and NMIE
+15 ;
+16 GOTO ASA^BGP1CON1
+17 ;
ACEI(P,BDATE,EDATE,NMIB,NMIE) ;EP does patient have an ACEI contraidication
+1 ;P - patient DFN
+2 ;BDATE - beginning date to search for contraindication
+3 ;EDATE - ending date of search for contraindication
+4 ;NMIBD - beginning date to search for NMI refusal (not medically indicated)
+5 ;NMIED - ending date to search for NMI refusal (not medically indicated)
+6 ;
+7 ;return value = piece 1 = 1 for yes, contraindication found
+8 ; blank for no, contraindication not found
+9 ; piece 2 = text of what was found
+10 ;LOGIC:
+11 ;diagnosis between BDATE and EDATE in BGP CMS AORTIC STENOSIS DXS
+12 ;NMI refusal for drug in BGP HEDIS ACEI MEDS taxonomy between NMIB and NMIE
+13 ;NMI refusal for drug in BGP HEDIS ARB MEDS taxonomy between NMIB and NMIE
+14 GOTO ACEI^BGP1CON1
+15 ;
STATIN(P,BDATE,EDATE,NMIB,NMIE) ;EP does patient have an STATIN contraidication
+1 ;P - patient DFN
+2 ;BDATE - beginning date to search for contraindication
+3 ;EDATE - ending date of search for contraindication
+4 ;NMIBD - beginning date to search for NMI refusal (not medically indicated)
+5 ;NMIED - ending date to search for NMI refusal (not medically indicated)
+6 ;
+7 ;return value = piece 1 = 1 for yes, contraindication found
+8 ; blank for no, contraindication not found
+9 ; piece 2 = text of what was found
+10 ;LOGIC:
+11 ;PREGNANCY diagnosis between BDATE and EDATE
+12 ;NMI refusal for drug in BGP HEDIS STATIN MEDS taxonomy between NMIB and NMIE
+13 ;BREASTFEEDING education between BDATE and EDATE
+14 ;BREASTFEEDING POV between BDATE and EDATE
+15 ;alchohol hepatitis pov between BDATE and EDATE
+16 ;
+17 GOTO STATIN^BGP1CON1
+18 ;