BGP9CP11 ; IHS/CMI/LAB - IHS gpra print ;
;;9.0;IHS CLINICAL REPORTING;;JUL 1, 2009
;
;
;
AMI3W ;EP
I $Y>(BGPIOSL-3) D HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
D WDOD^BGP9CPU(DFN)
D WDT^BGP9CPU(BGPVINP)
Q:BGPQUIT
I $$TRANS^BGP9CU(BGPVINP) D WTT^BGP9CPU(BGPVINP)
Q:BGPQUIT
I $$TRANS^BGP9CU(BGPVINP) D TRANSN^BGP9CP2 Q:BGPQUIT
D WPPDPOV^BGP9CPU(BGPVSIT)
Q:BGPQUIT
D OTHDPOVS^BGP9CPU(BGPVSIT)
Q:BGPQUIT
K BGPDATA
S BGPC=0
D LVSD^BGP9CU1(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
D EJECFRAC^BGP9CU1(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,BGPC)
D WLVSD^BGP9CPU
Q:BGPQUIT
K BGPDATA
S X=$$COMFORT^BGP9CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
D WCOMFORT^BGP9CPU(X)
K BGPDATA
K BGPY
Q:BGPQUIT
S X=$$ACEALLEG^BGP9CU1(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP9CU(BGPVINP))
S Z=$$ARBALLEG^BGP9CU1(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP9CU(BGPVINP))
D WACEALEG^BGP9CPU
K BGPDATA
S BGPC=0
D ALLDXS^BGP9CU2(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,BGPC,"BGP CMS AORTIC STENOSIS DXS")
D WAORTIC^BGP9CPU
Q:BGPQUIT
K BGPDATA,BGPDX
S BGPXX=0
D ANGIOED^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
S X=0 F S X=$O(BGPDATA(X)) Q:X'=+X S BGPXX=BGPXX+1,BGPDX(BGPXX)=BGPDATA(X)
K BGPDATA D HYPERKAL^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
S X=0 F S X=$O(BGPDATA(X)) Q:X'=+X S BGPXX=BGPXX+1,BGPDX(BGPXX)=BGPDATA(X)
K BGPDATA D HYPOTEN^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
S X=0 F S X=$O(BGPDATA(X)) Q:X'=+X S BGPXX=BGPXX+1,BGPDX(BGPXX)=BGPDATA(X)
K BGPDATA D RENART^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
S X=0 F S X=$O(BGPDATA(X)) Q:X'=+X S BGPXX=BGPXX+1,BGPDX(BGPXX)=BGPDATA(X)
K BGPDATA D RENAL^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
S X=0 F S X=$O(BGPDATA(X)) Q:X'=+X S BGPXX=BGPXX+1,BGPDX(BGPXX)=BGPDATA(X)
D WDXS^BGP9CPU
K BGPDATA
K BGPY
Q:BGPQUIT
K BGPDATA
S BGPC=0
D NMIDRUG^BGP9CU1(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."),.BGPDATA,"BGP CMS ACEI MEDS",0)
D NMIDRUG^BGP9CU1(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."),.BGPDATA,"BGP CMS ARB MEDS",BGPC)
D WNMIACE^BGP9CPU(.BGPDATA)
Q:BGPQUIT
S X=$$LASTMED^BGP9CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS ACEI MEDS","","BGP CMS ACEI MEDS CLASS")
S Z=$$LASTMED^BGP9CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS ARB MEDS","","BGP CMS ARB MEDS CLASS")
D WLASTACE^BGP9CPU
Q:BGPQUIT
Q:BGPQUIT
D ALLALG1^BGP9CU1(DFN,DT,$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
D WALLALG^BGP9CPU
Q:BGPQUIT
K BGPDATA
D ALLALGA1^BGP9CU1(DFN,DT,.BGPDATA)
D WALLALGT^BGP9CPU
K BGPDATA
D IVUD^BGP9CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),,.BGPDATA)
D WIVUD^BGP9CPU
Q
;
BGP9CP11 ; IHS/CMI/LAB - IHS gpra print ;
+1 ;;9.0;IHS CLINICAL REPORTING;;JUL 1, 2009
+2 ;
+3 ;
+4 ;
AMI3W ;EP
+1 IF $Y>(BGPIOSL-3)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+2 DO WDOD^BGP9CPU(DFN)
+3 DO WDT^BGP9CPU(BGPVINP)
+4 IF BGPQUIT
QUIT
+5 IF $$TRANS^BGP9CU(BGPVINP)
DO WTT^BGP9CPU(BGPVINP)
+6 IF BGPQUIT
QUIT
+7 IF $$TRANS^BGP9CU(BGPVINP)
DO TRANSN^BGP9CP2
IF BGPQUIT
QUIT
+8 DO WPPDPOV^BGP9CPU(BGPVSIT)
+9 IF BGPQUIT
QUIT
+10 DO OTHDPOVS^BGP9CPU(BGPVSIT)
+11 IF BGPQUIT
QUIT
+12 KILL BGPDATA
+13 SET BGPC=0
+14 DO LVSD^BGP9CU1(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+15 DO EJECFRAC^BGP9CU1(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,BGPC)
+16 DO WLVSD^BGP9CPU
+17 IF BGPQUIT
QUIT
+18 KILL BGPDATA
+19 SET X=$$COMFORT^BGP9CU(DFN,$PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),$PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."))
+20 DO WCOMFORT^BGP9CPU(X)
+21 KILL BGPDATA
+22 KILL BGPY
+23 IF BGPQUIT
QUIT
+24 SET X=$$ACEALLEG^BGP9CU1(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP9CU(BGPVINP))
+25 SET Z=$$ARBALLEG^BGP9CU1(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP9CU(BGPVINP))
+26 DO WACEALEG^BGP9CPU
+27 KILL BGPDATA
+28 SET BGPC=0
+29 DO ALLDXS^BGP9CU2(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,BGPC,"BGP CMS AORTIC STENOSIS DXS")
+30 DO WAORTIC^BGP9CPU
+31 IF BGPQUIT
QUIT
+32 KILL BGPDATA,BGPDX
+33 SET BGPXX=0
+34 DO ANGIOED^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+35 SET X=0
FOR
SET X=$ORDER(BGPDATA(X))
IF X'=+X
QUIT
SET BGPXX=BGPXX+1
SET BGPDX(BGPXX)=BGPDATA(X)
+36 KILL BGPDATA
DO HYPERKAL^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+37 SET X=0
FOR
SET X=$ORDER(BGPDATA(X))
IF X'=+X
QUIT
SET BGPXX=BGPXX+1
SET BGPDX(BGPXX)=BGPDATA(X)
+38 KILL BGPDATA
DO HYPOTEN^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+39 SET X=0
FOR
SET X=$ORDER(BGPDATA(X))
IF X'=+X
QUIT
SET BGPXX=BGPXX+1
SET BGPDX(BGPXX)=BGPDATA(X)
+40 KILL BGPDATA
DO RENART^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+41 SET X=0
FOR
SET X=$ORDER(BGPDATA(X))
IF X'=+X
QUIT
SET BGPXX=BGPXX+1
SET BGPDX(BGPXX)=BGPDATA(X)
+42 KILL BGPDATA
DO RENAL^BGP9CU6(DFN,$$FMADD^XLFDT($$DSCH^BGP9CU(BGPVINP),-365),$$DSCH^BGP9CU(BGPVINP),.BGPDATA,0)
+43 SET X=0
FOR
SET X=$ORDER(BGPDATA(X))
IF X'=+X
QUIT
SET BGPXX=BGPXX+1
SET BGPDX(BGPXX)=BGPDATA(X)
+44 DO WDXS^BGP9CPU
+45 KILL BGPDATA
+46 KILL BGPY
+47 IF BGPQUIT
QUIT
+48 KILL BGPDATA
+49 SET BGPC=0
+50 DO NMIDRUG^BGP9CU1(DFN,$PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),$PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),.BGPDATA,"BGP CMS ACEI MEDS",0)
+51 DO NMIDRUG^BGP9CU1(DFN,$PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),$PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),.BGPDATA,"BGP CMS ARB MEDS",BGPC)
+52 DO WNMIACE^BGP9CPU(.BGPDATA)
+53 IF BGPQUIT
QUIT
+54 SET X=$$LASTMED^BGP9CU1(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS ACEI MEDS","","BGP CMS ACEI MEDS CLASS")
+55 SET Z=$$LASTMED^BGP9CU1(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS ARB MEDS","","BGP CMS ARB MEDS CLASS")
+56 DO WLASTACE^BGP9CPU
+57 IF BGPQUIT
QUIT
+58 IF BGPQUIT
QUIT
+59 DO ALLALG1^BGP9CU1(DFN,DT,$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
+60 DO WALLALG^BGP9CPU
+61 IF BGPQUIT
QUIT
+62 KILL BGPDATA
+63 DO ALLALGA1^BGP9CU1(DFN,DT,.BGPDATA)
+64 DO WALLALGT^BGP9CPU
+65 KILL BGPDATA
+66 DO IVUD^BGP9CU1(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),,.BGPDATA)
+67 DO WIVUD^BGP9CPU
+68 QUIT
+69 ;