BGP7ALG ; IHS/CMI/LAB - measure AHR.A ;
;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
;
;
BETA(P,EDATE) ;EP - BETA BLOCKER ALLERGY/ADR
;P - patient DFN
;EDATE - ending date of search for ALLERGY/ADR
;
;return value = piece 1 = 1 for yes, ALLERGY/ADR found
; blank for no, ALLERGY/ADR not found
; piece 2 = text of what was found
;Logic: any pov 995.0-995.3 or V14.8 with a narrative of BETA BLOCK,
; BBLOCK or B BLOCK
; any problem list entry of 995.0-995.3 or V14.8 with
; a narrative of BETA BLOCK, BBLOCK or B BLOCK
; any pov 995.0-995.3 with ECODE E942.0
; allergy tracking entry containing BETA BLOCK
;
G BETA^BGP7ALG1
;
;
;
ASA(P,EDATE) ;does patient have an aspirin ALLERGY/ADR
;P - PATIENT DFN
;EDATE - ENDING DATE TO LOOK FOR DATA
;
;return value = piece 1 = 1 for yes, ALLERGY/ADR found
; blank for no, ALLERGY/ADR not found
; piece 2 = text of what was found
;
;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ASPIRIN or ASA
; any problem list entry of 995.0-995.3 or V14.8 with
; a narrative of ASPIRIN or ASA
; any pov 995.0-995.3 with ecode E935.3
; allergy tracking entry containing ASPIRIN or ASA
;
;
G ASA^BGP7ALG1
;
ACEI(P,EDATE) ;EP does patient have an ACEI ALLERGY/ADR
;P - patient DFN
;EDATE - ending date of search for ALLERGY/ADR
;
;return value = piece 1 = 1 for yes, ALLERGY/ADR found
; BLANK for no, ALLERGY/ADR not found
; piece 2 = text of what was found
;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ACEI or ACE INHIBITOR
; any problem list entry of 995.0-995.3 or V14.8 with
; a narrative of ASPIRIN or ASA
; any pov 995.0-995.3 with ecode E942.6
; allergy tracking entry containing ACE I or ACEI
;
G ACEI^BGP7ALG1
;
ARB(P,EDATE) ;EP does patient have an ARB ALLERGY/ADR
;P - patient DFN
;EDATE - ending date of search for ALLERGY/ADR
;
;return value = piece 1 = 1 for yes, ALLERGY/ADR found
; BLANK for no, ALLERGY/ADR not found
; piece 2 = text of what was found
;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ARB or ANGIOTENSIN RECEPTOR BLOCKER
; any problem list entry of 995.0-995.3 or V14.8 with
; a narrative of ASPIRIN or ASA
; any pov 995.0-995.3 with ecode E942.6
; allergy tracking entry containing ARB or ANGIOTENSIN RECEPTOR BLOCKER
;
G ARB^BGP7ALG1
;
STATIN(P,BDATE,EDATE) ;EP does patient have an STATIN ALLERGY/ADR
;P - patient DFN
;
;return value = piece 1 = 1 for yes, ALLERGY/ADR found
; blank for no, ALLERGY/ADR not found
; piece 2 = text of what was found
;LOGIC:
; ANY OF THE FOLLOWING DOCUMENTED EVER BEFORE EDATE
; any pov 995.0-995.3 or V14.8 with a narrative of STATIN or STATINS
; any problem list entry of 995.0-995.3 or V14.8 with
; a narrative of STATIN or STATINS
; any pov 995.0-995.3 with ecode E942.9
; allergy tracking entry containing STATIN or STATINS
;
; ANY OF THE FOLLOWING DOCUMENTED BETWEEN BDATE AND EDATE
; ALT and/or AST > 3x upper limit of normal on 2 or more consecutive
; visits between bdate and edate
; creatine kinase levels >10x ULN or CK>10,000 IU/L between bdate and edate
; pov in BGP MYOPATHY/MYALGIA taxonomy between BDATE and EDATE
;
G STATIN^BGP7ALG2
;
BGP7ALG ; IHS/CMI/LAB - measure AHR.A ;
+1 ;;17.1;IHS CLINICAL REPORTING;;MAY 10, 2017;Build 29
+2 ;
+3 ;
BETA(P,EDATE) ;EP - BETA BLOCKER ALLERGY/ADR
+1 ;P - patient DFN
+2 ;EDATE - ending date of search for ALLERGY/ADR
+3 ;
+4 ;return value = piece 1 = 1 for yes, ALLERGY/ADR found
+5 ; blank for no, ALLERGY/ADR not found
+6 ; piece 2 = text of what was found
+7 ;Logic: any pov 995.0-995.3 or V14.8 with a narrative of BETA BLOCK,
+8 ; BBLOCK or B BLOCK
+9 ; any problem list entry of 995.0-995.3 or V14.8 with
+10 ; a narrative of BETA BLOCK, BBLOCK or B BLOCK
+11 ; any pov 995.0-995.3 with ECODE E942.0
+12 ; allergy tracking entry containing BETA BLOCK
+13 ;
+14 GOTO BETA^BGP7ALG1
+15 ;
+16 ;
+17 ;
ASA(P,EDATE) ;does patient have an aspirin ALLERGY/ADR
+1 ;P - PATIENT DFN
+2 ;EDATE - ENDING DATE TO LOOK FOR DATA
+3 ;
+4 ;return value = piece 1 = 1 for yes, ALLERGY/ADR found
+5 ; blank for no, ALLERGY/ADR not found
+6 ; piece 2 = text of what was found
+7 ;
+8 ;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ASPIRIN or ASA
+9 ; any problem list entry of 995.0-995.3 or V14.8 with
+10 ; a narrative of ASPIRIN or ASA
+11 ; any pov 995.0-995.3 with ecode E935.3
+12 ; allergy tracking entry containing ASPIRIN or ASA
+13 ;
+14 ;
+15 GOTO ASA^BGP7ALG1
+16 ;
ACEI(P,EDATE) ;EP does patient have an ACEI ALLERGY/ADR
+1 ;P - patient DFN
+2 ;EDATE - ending date of search for ALLERGY/ADR
+3 ;
+4 ;return value = piece 1 = 1 for yes, ALLERGY/ADR found
+5 ; BLANK for no, ALLERGY/ADR not found
+6 ; piece 2 = text of what was found
+7 ;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ACEI or ACE INHIBITOR
+8 ; any problem list entry of 995.0-995.3 or V14.8 with
+9 ; a narrative of ASPIRIN or ASA
+10 ; any pov 995.0-995.3 with ecode E942.6
+11 ; allergy tracking entry containing ACE I or ACEI
+12 ;
+13 GOTO ACEI^BGP7ALG1
+14 ;
ARB(P,EDATE) ;EP does patient have an ARB ALLERGY/ADR
+1 ;P - patient DFN
+2 ;EDATE - ending date of search for ALLERGY/ADR
+3 ;
+4 ;return value = piece 1 = 1 for yes, ALLERGY/ADR found
+5 ; BLANK for no, ALLERGY/ADR not found
+6 ; piece 2 = text of what was found
+7 ;Logic: any pov 995.0-995.3 or V14.8 with a narrative of ARB or ANGIOTENSIN RECEPTOR BLOCKER
+8 ; any problem list entry of 995.0-995.3 or V14.8 with
+9 ; a narrative of ASPIRIN or ASA
+10 ; any pov 995.0-995.3 with ecode E942.6
+11 ; allergy tracking entry containing ARB or ANGIOTENSIN RECEPTOR BLOCKER
+12 ;
+13 GOTO ARB^BGP7ALG1
+14 ;
STATIN(P,BDATE,EDATE) ;EP does patient have an STATIN ALLERGY/ADR
+1 ;P - patient DFN
+2 ;
+3 ;return value = piece 1 = 1 for yes, ALLERGY/ADR found
+4 ; blank for no, ALLERGY/ADR not found
+5 ; piece 2 = text of what was found
+6 ;LOGIC:
+7 ; ANY OF THE FOLLOWING DOCUMENTED EVER BEFORE EDATE
+8 ; any pov 995.0-995.3 or V14.8 with a narrative of STATIN or STATINS
+9 ; any problem list entry of 995.0-995.3 or V14.8 with
+10 ; a narrative of STATIN or STATINS
+11 ; any pov 995.0-995.3 with ecode E942.9
+12 ; allergy tracking entry containing STATIN or STATINS
+13 ;
+14 ; ANY OF THE FOLLOWING DOCUMENTED BETWEEN BDATE AND EDATE
+15 ; ALT and/or AST > 3x upper limit of normal on 2 or more consecutive
+16 ; visits between bdate and edate
+17 ; creatine kinase levels >10x ULN or CK>10,000 IU/L between bdate and edate
+18 ; pov in BGP MYOPATHY/MYALGIA taxonomy between BDATE and EDATE
+19 ;
+20 GOTO STATIN^BGP7ALG2
+21 ;