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HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
D WDT^BGP9CPU4(BGPVINP)
Q:BGPQUIT
K BGPPROC
D SCIP1^BGP9CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPPROC)
S BGPPPD=$P(BGPPROC(1),U,3) ;principle procedure date
D WPP1^BGP9CPU4
Q:BGPQUIT
D WOTHPROC^BGP9CPU4
K BGPDATA
Q:BGPQUIT
D WPPDPOV^BGP9CPU4(BGPVSIT)
Q:BGPQUIT
D OTHDPOVS^BGP9CPU4(BGPVSIT)
Q:BGPQUIT
I 'BGPEXCL D PERI^BGP9CPU4
Q:BGPQUIT
D INF^BGP9CPU4
Q:BGPQUIT
D OTHSURG^BGP9CPU4
Q:BGPQUIT
K BGPDATA
;antibiotic rx status?
D ANTIRX^BGP9CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
D WANTIRX^BGP9CPU3
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
;
SCIP3 ;EP
I $Y>(BGPIOSL-3) D HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
D WDT^BGP9CPU4(BGPVINP)
Q:BGPQUIT
K BGPPROC
D SCIP1^BGP9CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPPROC)
S BGPPPD=$P(BGPPROC(1),U,3) ;principle procedure date
D WPP1^BGP9CPU4
Q:BGPQUIT
D WOTHPROC^BGP9CPU4
K BGPDATA
Q:BGPQUIT
D WPPDPOV^BGP9CPU4(BGPVSIT)
Q:BGPQUIT
D OTHDPOVS^BGP9CPU4(BGPVSIT)
Q:BGPQUIT
I 'BGPEXCL D PERI^BGP9CPU4
Q:BGPQUIT
D INF^BGP9CPU4
Q:BGPQUIT
K BGPDATA
S BGPPOSTI=$$POSTINF^BGP9CU5(DFN,$$DSCH^BGP9CU(BGPVINP),BGPPROC(1))
D WPOSTINF^BGP9CPU4
Q:BGPQUIT
K BGPDATA
D OTHSURG^BGP9CPU4
Q:BGPQUIT
K BGPDATA
;antibiotic rx status?
D ANTIRX^BGP9CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
D WANTIRX^BGP9CPU3
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
;
TRANSIN ;
I $Y>(BGPIOSL-4) D HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
W !!?3,"NOTE: Since Admission Type was ","""","Transferred,",""""," review patient's chart"
W !,"to determine if patient should be excluded if transfer was from another"
W !,"acute care hospital, including ER from another hospital.",!
Q
;
TRANSN ;
I $Y>(BGPIOSL-4) D HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
W !!?3,"NOTE: Since Discharge Type was ","""","Transferred,",""""," review patient's chart"
W !,"to determine if patient should be excluded if transferred to another"
W !,"acute care hospital or federal hospital.",!
Q
;
BGP9CP6 ; IHS/CMI/LAB - IHS gpra print ;
+1 ;;9.0;IHS CLINICAL REPORTING;;JUL 1, 2009
+2 ;
+3 ;
SCALL ;EP
+1 ;I $Y>(BGPIOSL-3) D HDR^BGP9CP Q:BGPQUIT D L1H^BGP9CP
+2 ;S BGPNOBA=1
+3 ;D WDT^BGP9CPU4(BGPVINP)
+4 ;Q:BGPQUIT
+5 ;I $$TRANS^BGP9CU(BGPVINP) D WTT^BGP9CPU4(BGPVINP) Q:BGPQUIT
+6 ;K BGPDATA
+7 ;D SCIP^BGP9CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
+8 ;D WPP^BGP9CPU4
+9 ;D WPPDPOV^BGP9CPU4(BGPVSIT)
+10 ;K BGPNOBA
+11 ;Q
+12 IF $Y>(BGPIOSL-3)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+13 SET BGPNOBA=1
+14 DO WRACE^BGP9CPU(DFN)
+15 IF BGPQUIT
QUIT
+16 DO WDOB^BGP9CPU(DFN)
+17 IF BGPQUIT
QUIT
+18 DO WZIP^BGP9CPU(DFN)
+19 IF BGPQUIT
QUIT
+20 DO WINS^BGP9CPU(BGPVSIT,DFN)
+21 IF BGPQUIT
QUIT
+22 DO WADM^BGP9CPU(BGPVINP)
+23 IF BGPQUIT
QUIT
+24 DO WADM92^BGP9CPU(BGPVINP)
+25 IF BGPQUIT
QUIT
+26 DO WADMS92^BGP9CPU(BGPVINP)
+27 IF BGPQUIT
QUIT
+28 DO WDT^BGP9CPU(BGPVINP)
+29 IF BGPQUIT
QUIT
+30 DO WDSGS92^BGP9CPU(BGPVINP)
+31 IF BGPQUIT
QUIT
+32 IF $$TRANS^BGP9CU(BGPVINP)
DO WTT^BGP9CPU(BGPVINP)
IF BGPQUIT
QUIT
+33 KILL BGPNOBA
+34 DO WPPDPOV^BGP9CPU(BGPVSIT)
+35 IF BGPQUIT
QUIT
+36 SET BGPNOBA=1
+37 DO OTHDPOVS^BGP9CPU(BGPVSIT)
+38 IF BGPQUIT
QUIT
+39 KILL BGPDATA
+40 DO SCIP^BGP9CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
+41 DO WPP^BGP9CPU4
+42 IF BGPQUIT
QUIT
+43 DO WOTHPROS^BGP9CPU2
+44 KILL BGPNOBA
+45 QUIT
+46 ;
SCIP1 ;EP
+1 IF $Y>(BGPIOSL-3)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+2 DO WDT^BGP9CPU4(BGPVINP)
+3 IF BGPQUIT
QUIT
+4 KILL BGPPROC
+5 DO SCIP1^BGP9CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPPROC)
+6 ;principle procedure date
SET BGPPPD=$PIECE(BGPPROC(1),U,3)
+7 DO WPP1^BGP9CPU4
+8 IF BGPQUIT
QUIT
+9 DO WOTHPROC^BGP9CPU4
+10 KILL BGPDATA
+11 IF BGPQUIT
QUIT
+12 DO WPPDPOV^BGP9CPU4(BGPVSIT)
+13 IF BGPQUIT
QUIT
+14 DO OTHDPOVS^BGP9CPU4(BGPVSIT)
+15 IF BGPQUIT
QUIT
+16 IF 'BGPEXCL
DO PERI^BGP9CPU4
+17 IF BGPQUIT
QUIT
+18 DO INF^BGP9CPU4
+19 IF BGPQUIT
QUIT
+20 DO OTHSURG^BGP9CPU4
+21 IF BGPQUIT
QUIT
+22 KILL BGPDATA
+23 ;antibiotic rx status?
+24 DO ANTIRX^BGP9CU3(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
+25 DO WANTIRX^BGP9CPU3
+26 IF BGPQUIT
QUIT
+27 DO ALLALG1^BGP9CU1(DFN,DT,$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
+28 DO WALLALG^BGP9CPU
+29 IF BGPQUIT
QUIT
+30 KILL BGPDATA
+31 DO ALLALGA1^BGP9CU1(DFN,DT,.BGPDATA)
+32 DO WALLALGT^BGP9CPU
+33 KILL BGPDATA
+34 DO IVUD^BGP9CU1(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),,.BGPDATA)
+35 DO WIVUD^BGP9CPU
+36 QUIT
+37 ;
SCIP3 ;EP
+1 IF $Y>(BGPIOSL-3)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+2 DO WDT^BGP9CPU4(BGPVINP)
+3 IF BGPQUIT
QUIT
+4 KILL BGPPROC
+5 DO SCIP1^BGP9CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),.BGPPROC)
+6 ;principle procedure date
SET BGPPPD=$PIECE(BGPPROC(1),U,3)
+7 DO WPP1^BGP9CPU4
+8 IF BGPQUIT
QUIT
+9 DO WOTHPROC^BGP9CPU4
+10 KILL BGPDATA
+11 IF BGPQUIT
QUIT
+12 DO WPPDPOV^BGP9CPU4(BGPVSIT)
+13 IF BGPQUIT
QUIT
+14 DO OTHDPOVS^BGP9CPU4(BGPVSIT)
+15 IF BGPQUIT
QUIT
+16 IF 'BGPEXCL
DO PERI^BGP9CPU4
+17 IF BGPQUIT
QUIT
+18 DO INF^BGP9CPU4
+19 IF BGPQUIT
QUIT
+20 KILL BGPDATA
+21 SET BGPPOSTI=$$POSTINF^BGP9CU5(DFN,$$DSCH^BGP9CU(BGPVINP),BGPPROC(1))
+22 DO WPOSTINF^BGP9CPU4
+23 IF BGPQUIT
QUIT
+24 KILL BGPDATA
+25 DO OTHSURG^BGP9CPU4
+26 IF BGPQUIT
QUIT
+27 KILL BGPDATA
+28 ;antibiotic rx status?
+29 DO ANTIRX^BGP9CU3(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
+30 DO WANTIRX^BGP9CPU3
+31 IF BGPQUIT
QUIT
+32 DO ALLALG1^BGP9CU1(DFN,DT,$$DSCH^BGP9CU(BGPVINP),.BGPDATA)
+33 DO WALLALG^BGP9CPU
+34 IF BGPQUIT
QUIT
+35 KILL BGPDATA
+36 DO ALLALGA1^BGP9CU1(DFN,DT,.BGPDATA)
+37 DO WALLALGT^BGP9CPU
+38 KILL BGPDATA
+39 DO IVUD^BGP9CU1(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP9CU(BGPVINP),,.BGPDATA)
+40 DO WIVUD^BGP9CPU
+41 QUIT
+42 ;
TRANSIN ;
+1 IF $Y>(BGPIOSL-4)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+2 WRITE !!?3,"NOTE: Since Admission Type was ","""","Transferred,",""""," review patient's chart"
+3 WRITE !,"to determine if patient should be excluded if transfer was from another"
+4 WRITE !,"acute care hospital, including ER from another hospital.",!
+5 QUIT
+6 ;
TRANSN ;
+1 IF $Y>(BGPIOSL-4)
DO HDR^BGP9CP
IF BGPQUIT
QUIT
DO L1H^BGP9CP
+2 WRITE !!?3,"NOTE: Since Discharge Type was ","""","Transferred,",""""," review patient's chart"
+3 WRITE !,"to determine if patient should be excluded if transferred to another"
+4 WRITE !,"acute care hospital or federal hospital.",!
+5 QUIT
+6 ;