Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BGP4DHE1

BGP4DHE1.m

Go to the documentation of this file.
BGP4DHE1 ; IHS/CMI/LAB - indicator HEDIS ;
 ;;7.0;IHS CLINICAL REPORTING;;JAN 24, 2007
 ;
I1 ;EP
 S (BGPN1,BGPN2,BGPN3,BGPN4,BGPN5,BGPN6,BGPD1,BGPD2,BGPD3,BGPD4,BGPD5,BGPD6,BGPD7,BGPD8,BGPD9)=0
 I BGPAGEB<52 S BGPSTOP=1 Q
 I BGPACTCL S BGPD1=1
 I 'BGPD1 S BGPSTOP=1 Q
 S BGPFOB=$$FOB^BGP4D61(DFN,BGPEDATE)
 S BGPRECT=$$RECT^BGP4D61(DFN,BGPEDATE)
 I BGPFOB]"" S BGPN2=1,BGPN1=1
 I BGPRECT]"" S BGPN3=1,BGPN1=1
 S BGPOTH=""
 I BGPN1=0 S BGPOTH=$$IBH^BGP4D61(DFN,BGPEDATE)
 I BGPOTH]"" S BGPN1=1
 S BGPVALUE=$S(BGPFOB]"":BGPFOB,BGPRECT]"":BGPRECT,1:BGPOTH),BGPVALUE=$P(BGPVALUE,U,2)_" "_$P(BGPVALUE,U)
 ;S BGPDV=$S(BGPD1:"UP",1:"")_$S(BGPACTCL:",AC",1:"")
 ;S BGPVALUE=BGPDV_";"_BGPVALUE
 K X,Y,Z,%,A,B,C,D,E,H,BDATE,EDATE,P
 Q
I4 ;EP
 S (BGPN1,BGPN2,BGPN3,BGPN4,BGPN5,BGPN6,BGPD1,BGPD2,BGPD3,BGPD4,BGPD5,BGPD6,BGPD7,BGPD8,BGPD9)=0
 I 'BGPACTUP S BGPSTOP=1 Q
 I BGPSEX'="F" S BGPSTOP=1 Q
 I BGPAGEB<16 S BGPSTOP=1 Q
 I BGPAGEB>25 S BGPSTOP=1 Q
 I BGPACTUP S BGPD2=1
 I BGPACTCL S BGPD1=1
 S BGPN1=$$CHL^BGP4D5(DFN,BGP365,BGPEDATE)
 S BGPVALUE=""
 K X,Y,Z,%,A,B,C,D,E,H,BDATE,EDATE,P,V,S,F,T
 Q
I7 ;EP
 K BGPN1,BGPN2,BGPN3,BGPN4,BGPVALUE,BGPLHGB,BGPN5,BGPN6,BGPN7,BGPN8
 S BGPD1=0
 I 'BGPDMD2 S BGPSTOP=1 Q  ;not active diabetic
 I BGPDMD2 S BGPD1=1
 I 'BGPDM1 S BGPSTOP=1 Q  ;don't process this indicator, pt not diabetic
 S BGPLHGB=$$HGBA1C^BGP4D2(DFN,BGP365,BGPEDATE)
 S BGPN1=$P(BGPLHGB,U)
 S BGPN2=$S($P(BGPLHGB,U,2)=3:1,1:0)
 S BGPVALUE=""
 I BGPN1 S BGPVALUE=BGPVALUE_"hgb:"_$$DATE^BGP4UTL($P(BGPLHGB,U,3))_" "_$P(BGPLHGB,U,4)
 K X,Y,Z,%,A,B,C,D,E,H,BDATE,EDATE,P,V,S,F,J,K,G,I,L,T,BGPG
73 S BGPEYE=$$EYE^BGP4D21(DFN,BGP365,BGPEDATE)
 S A=0 I $P(BGPEYE,U)=1 S A=1
 S B=0 I $P(BGPEYE,U)=2 S B=1
 S BGPN3=0 I A!(B) S BGPN3=1
 I BGPN3 S BGPVALUE=BGPVALUE_";eye: "_$$DATE^BGP4UTL($P(BGPEYE,U,2))_" "_$P(BGPEYE,U,3)
 K BGPG
 K ^TMP($J,"A")
74 ;
 S BGPLDL=$$LDL^BGP4D2(DFN,BGP365,BGPEDATE)
 S BGPN4=$P(BGPLDL,U),BGPN5=0,BGPN6=0
 I $P(BGPLDL,U,3)]"",$P(BGPLDL,U,3)'>100 S BGPN6=1
 I $P(BGPLDL,U,3)]"",$P(BGPLDL,U,3)<130 S BGPN5=1
 I BGPN4 S BGPVALUE=BGPVALUE_";ldl: "_$$DATE^BGP4UTL($P(BGPLDL,U,2))_" "_$P(BGPLDL,U,3)
 K X,Y,Z,%,A,B,C,D,E,H,BDATE,EDATE,P,V,S,F,B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