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BGPIOSL-3) D HDR^BGP1CP Q:BGPQUIT D L1H^BGP1CP
D WDT^BGP1CPU4(BGPVINP)
Q:BGPQUIT
K BGPPROC
D SCIP1^BGP1CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPPROC)
S BGPPPD=$P(BGPPROC(1),U,3) ;principle procedure date
D WPP1^BGP1CPU4
Q:BGPQUIT
D WOTHPROC^BGP1CPU4
K BGPDATA
Q:BGPQUIT
D WPPDPOV^BGP1CPU4(BGPVSIT)
Q:BGPQUIT
D OTHDPOVS^BGP1CPU4(BGPVSIT)
Q:BGPQUIT
I 'BGPEXCL D PERI^BGP1CPU4
Q:BGPQUIT
D INF^BGP1CPU4
Q:BGPQUIT
D OTHSURG^BGP1CPU4
Q:BGPQUIT
K BGPDATA
;antibiotic rx status?
D ANTIRX^BGP1CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
D WANTIRX^BGP1CPU3
Q:BGPQUIT
D ALLALG1^BGP1CU1(DFN,DT,$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
D WALLALG^BGP1CPU
Q:BGPQUIT
K BGPDATA
D ALLALGA1^BGP1CU1(DFN,DT,.BGPDATA)
D WALLALGT^BGP1CPU
K BGPDATA
D IVUD^BGP1CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),,.BGPDATA)
D WIVUD^BGP1CPU
Q
;
SCIP3 ;EP
I $Y>(BGPIOSL-3) D HDR^BGP1CP Q:BGPQUIT D L1H^BGP1CP
D WDT^BGP1CPU4(BGPVINP)
Q:BGPQUIT
K BGPPROC
D SCIP1^BGP1CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPPROC)
S BGPPPD=$P(BGPPROC(1),U,3) ;principle procedure date
D WPP1^BGP1CPU4
Q:BGPQUIT
D WOTHPROC^BGP1CPU4
K BGPDATA
Q:BGPQUIT
D WPPDPOV^BGP1CPU4(BGPVSIT)
Q:BGPQUIT
D OTHDPOVS^BGP1CPU4(BGPVSIT)
Q:BGPQUIT
I 'BGPEXCL D PERI^BGP1CPU4
Q:BGPQUIT
D INF^BGP1CPU4
Q:BGPQUIT
K BGPDATA
S BGPPOSTI=$$POSTINF^BGP1CU5(DFN,$$DSCH^BGP1CU(BGPVINP),BGPPROC(1))
D WPOSTINF^BGP1CPU4
Q:BGPQUIT
K BGPDATA
D OTHSURG^BGP1CPU4
Q:BGPQUIT
K BGPDATA
;antibiotic rx status?
D ANTIRX^BGP1CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
D WANTIRX^BGP1CPU3
Q:BGPQUIT
D ALLALG1^BGP1CU1(DFN,DT,$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
D WALLALG^BGP1CPU
Q:BGPQUIT
K BGPDATA
D ALLALGA1^BGP1CU1(DFN,DT,.BGPDATA)
D WALLALGT^BGP1CPU
K BGPDATA
D IVUD^BGP1CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),,.BGPDATA)
D WIVUD^BGP1CPU
Q
;
TRANSIN ;
I $Y>(BGPIOSL-4) D HDR^BGP1CP Q:BGPQUIT D L1H^BGP1CP
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^BGP1CP Q:BGPQUIT D L1H^BGP1CP
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
;
BGP1CP6 ; IHS/CMI/LAB - IHS gpra print ;
+1 ;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
+2 ;
+3 ;
SCALL ;EP
+1 ;I $Y>(BGPIOSL-3) D HDR^BGP1CP Q:BGPQUIT D L1H^BGP1CP
+2 ;S BGPNOBA=1
+3 ;D WDT^BGP1CPU4(BGPVINP)
+4 ;Q:BGPQUIT
+5 ;I $$TRANS^BGP1CU(BGPVINP) D WTT^BGP1CPU4(BGPVINP) Q:BGPQUIT
+6 ;K BGPDATA
+7 ;D SCIP^BGP1CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
+8 ;D WPP^BGP1CPU4
+9 ;D WPPDPOV^BGP1CPU4(BGPVSIT)
+10 ;K BGPNOBA
+11 ;Q
+12 IF $Y>(BGPIOSL-3)
DO HDR^BGP1CP
IF BGPQUIT
QUIT
DO L1H^BGP1CP
+13 SET BGPNOBA=1
+14 DO WRACE^BGP1CPU(DFN)
+15 IF BGPQUIT
QUIT
+16 DO WDOB^BGP1CPU(DFN)
+17 IF BGPQUIT
QUIT
+18 DO WZIP^BGP1CPU(DFN)
+19 IF BGPQUIT
QUIT
+20 DO WINS^BGP1CPU(BGPVSIT,DFN)
+21 IF BGPQUIT
QUIT
+22 DO WADM^BGP1CPU(BGPVINP)
+23 IF BGPQUIT
QUIT
+24 DO WADM92^BGP1CPU(BGPVINP)
+25 IF BGPQUIT
QUIT
+26 DO WADMS92^BGP1CPU(BGPVINP)
+27 IF BGPQUIT
QUIT
+28 DO WDT^BGP1CPU(BGPVINP)
+29 IF BGPQUIT
QUIT
+30 DO WDSGS92^BGP1CPU(BGPVINP)
+31 IF BGPQUIT
QUIT
+32 IF $$TRANS^BGP1CU(BGPVINP)
DO WTT^BGP1CPU(BGPVINP)
IF BGPQUIT
QUIT
+33 KILL BGPNOBA
+34 DO WPPDPOV^BGP1CPU(BGPVSIT)
+35 IF BGPQUIT
QUIT
+36 SET BGPNOBA=1
+37 DO OTHDPOVS^BGP1CPU(BGPVSIT)
+38 IF BGPQUIT
QUIT
+39 KILL BGPDATA
+40 DO SCIP^BGP1CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
+41 DO WPP^BGP1CPU4
+42 IF BGPQUIT
QUIT
+43 DO WOTHPROS^BGP1CPU2
+44 KILL BGPNOBA
+45 QUIT
+46 ;
SCIP1 ;EP
+1 IF $Y>(BGPIOSL-3)
DO HDR^BGP1CP
IF BGPQUIT
QUIT
DO L1H^BGP1CP
+2 DO WDT^BGP1CPU4(BGPVINP)
+3 IF BGPQUIT
QUIT
+4 KILL BGPPROC
+5 DO SCIP1^BGP1CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPPROC)
+6 ;principle procedure date
SET BGPPPD=$PIECE(BGPPROC(1),U,3)
+7 DO WPP1^BGP1CPU4
+8 IF BGPQUIT
QUIT
+9 DO WOTHPROC^BGP1CPU4
+10 KILL BGPDATA
+11 IF BGPQUIT
QUIT
+12 DO WPPDPOV^BGP1CPU4(BGPVSIT)
+13 IF BGPQUIT
QUIT
+14 DO OTHDPOVS^BGP1CPU4(BGPVSIT)
+15 IF BGPQUIT
QUIT
+16 IF 'BGPEXCL
DO PERI^BGP1CPU4
+17 IF BGPQUIT
QUIT
+18 DO INF^BGP1CPU4
+19 IF BGPQUIT
QUIT
+20 DO OTHSURG^BGP1CPU4
+21 IF BGPQUIT
QUIT
+22 KILL BGPDATA
+23 ;antibiotic rx status?
+24 DO ANTIRX^BGP1CU3(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
+25 DO WANTIRX^BGP1CPU3
+26 IF BGPQUIT
QUIT
+27 DO ALLALG1^BGP1CU1(DFN,DT,$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
+28 DO WALLALG^BGP1CPU
+29 IF BGPQUIT
QUIT
+30 KILL BGPDATA
+31 DO ALLALGA1^BGP1CU1(DFN,DT,.BGPDATA)
+32 DO WALLALGT^BGP1CPU
+33 KILL BGPDATA
+34 DO IVUD^BGP1CU1(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),,.BGPDATA)
+35 DO WIVUD^BGP1CPU
+36 QUIT
+37 ;
SCIP3 ;EP
+1 IF $Y>(BGPIOSL-3)
DO HDR^BGP1CP
IF BGPQUIT
QUIT
DO L1H^BGP1CP
+2 DO WDT^BGP1CPU4(BGPVINP)
+3 IF BGPQUIT
QUIT
+4 KILL BGPPROC
+5 DO SCIP1^BGP1CU5(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPPROC)
+6 ;principle procedure date
SET BGPPPD=$PIECE(BGPPROC(1),U,3)
+7 DO WPP1^BGP1CPU4
+8 IF BGPQUIT
QUIT
+9 DO WOTHPROC^BGP1CPU4
+10 KILL BGPDATA
+11 IF BGPQUIT
QUIT
+12 DO WPPDPOV^BGP1CPU4(BGPVSIT)
+13 IF BGPQUIT
QUIT
+14 DO OTHDPOVS^BGP1CPU4(BGPVSIT)
+15 IF BGPQUIT
QUIT
+16 IF 'BGPEXCL
DO PERI^BGP1CPU4
+17 IF BGPQUIT
QUIT
+18 DO INF^BGP1CPU4
+19 IF BGPQUIT
QUIT
+20 KILL BGPDATA
+21 SET BGPPOSTI=$$POSTINF^BGP1CU5(DFN,$$DSCH^BGP1CU(BGPVINP),BGPPROC(1))
+22 DO WPOSTINF^BGP1CPU4
+23 IF BGPQUIT
QUIT
+24 KILL BGPDATA
+25 DO OTHSURG^BGP1CPU4
+26 IF BGPQUIT
QUIT
+27 KILL BGPDATA
+28 ;antibiotic rx status?
+29 DO ANTIRX^BGP1CU3(DFN,$$FMADD^XLFDT($PIECE($PIECE(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($PIECE($PIECE(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
+30 DO WANTIRX^BGP1CPU3
+31 IF BGPQUIT
QUIT
+32 DO ALLALG1^BGP1CU1(DFN,DT,$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
+33 DO WALLALG^BGP1CPU
+34 IF BGPQUIT
QUIT
+35 KILL BGPDATA
+36 DO ALLALGA1^BGP1CU1(DFN,DT,.BGPDATA)
+37 DO WALLALGT^BGP1CPU
+38 KILL BGPDATA
+39 DO IVUD^BGP1CU1(DFN,$PIECE($PIECE(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),,.BGPDATA)
+40 DO WIVUD^BGP1CPU
+41 QUIT
+42 ;
TRANSIN ;
+1 IF $Y>(BGPIOSL-4)
DO HDR^BGP1CP
IF BGPQUIT
QUIT
DO L1H^BGP1CP
+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^BGP1CP
IF BGPQUIT
QUIT
DO L1H^BGP1CP
+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 ;