BGP8CON ; IHS/CMI/LAB - measure AHR.A ;
;;18.1;IHS CLINICAL REPORTING;;MAY 25, 2018;Build 66
;
;
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
;
S NMIB=$G(NMIB),NMIE=$G(NMIE)
G BETACONT^BGP8D724
;
;
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^BGP8CON1
;
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^BGP8CON1
;
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^BGP8CON1
;
BGP8CON ; IHS/CMI/LAB - measure AHR.A ;
+1 ;;18.1;IHS CLINICAL REPORTING;;MAY 25, 2018;Build 66
+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 SET NMIB=$GET(NMIB)
SET NMIE=$GET(NMIE)
+20 GOTO BETACONT^BGP8D724
+21 ;
+22 ;
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^BGP8CON1
+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^BGP8CON1
+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^BGP8CON1
+18 ;