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

BGP0CP6.m

Go to the documentation of this file.
BGP0CP6 ; IHS/CMI/LAB - IHS gpra print ;
 ;;10.0;IHS CLINICAL REPORTING;;JUN 18, 2010
 ;
 ;
SCALL ;EP
 ;I $Y>(BGPIOSL-3) D HDR^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 ;S BGPNOBA=1
 ;D WDT^BGP0CPU4(BGPVINP)
 ;Q:BGPQUIT
 ;I $$TRANS^BGP0CU(BGPVINP) D WTT^BGP0CPU4(BGPVINP) Q:BGPQUIT
 ;K BGPDATA
 ;D SCIP^BGP0CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),.BGPDATA)
 ;D WPP^BGP0CPU4
 ;D WPPDPOV^BGP0CPU4(BGPVSIT)
 ;K BGPNOBA
 ;Q
 I $Y>(BGPIOSL-3) D HDR^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 S BGPNOBA=1
 D WRACE^BGP0CPU(DFN)
 Q:BGPQUIT
 D WDOB^BGP0CPU(DFN)
 Q:BGPQUIT
 D WZIP^BGP0CPU(DFN)
 Q:BGPQUIT
 D WINS^BGP0CPU(BGPVSIT,DFN)
 Q:BGPQUIT
 D WADM^BGP0CPU(BGPVINP)
 Q:BGPQUIT
 D WADM92^BGP0CPU(BGPVINP)
 Q:BGPQUIT
 D WADMS92^BGP0CPU(BGPVINP)
 Q:BGPQUIT
 D WDT^BGP0CPU(BGPVINP)
 Q:BGPQUIT
 D WDSGS92^BGP0CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP0CU(BGPVINP) D WTT^BGP0CPU(BGPVINP) Q:BGPQUIT
 K BGPNOBA
 D WPPDPOV^BGP0CPU(BGPVSIT)
 Q:BGPQUIT
 S BGPNOBA=1
 D OTHDPOVS^BGP0CPU(BGPVSIT)
 Q:BGPQUIT
 K BGPDATA
 D SCIP^BGP0CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),.BGPDATA)
 D WPP^BGP0CPU4
 Q:BGPQUIT
 D WOTHPROS^BGP0CPU2
 K BGPNOBA
 Q
 ;
SCIP1 ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 D WDT^BGP0CPU4(BGPVINP)
 Q:BGPQUIT
 K BGPPROC
 D SCIP1^BGP0CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),.BGPPROC)
 S BGPPPD=$P(BGPPROC(1),U,3)  ;principle procedure date
 D WPP1^BGP0CPU4
 Q:BGPQUIT
 D WOTHPROC^BGP0CPU4
 K BGPDATA
 Q:BGPQUIT
 D WPPDPOV^BGP0CPU4(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP0CPU4(BGPVSIT)
 Q:BGPQUIT
 I 'BGPEXCL D PERI^BGP0CPU4
 Q:BGPQUIT
 D INF^BGP0CPU4
 Q:BGPQUIT
 D OTHSURG^BGP0CPU4
 Q:BGPQUIT
 K BGPDATA
 ;antibiotic rx status?
 D ANTIRX^BGP0CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
 D WANTIRX^BGP0CPU3
 Q:BGPQUIT
 D ALLALG1^BGP0CU1(DFN,DT,$$DSCH^BGP0CU(BGPVINP),.BGPDATA)
 D WALLALG^BGP0CPU
 Q:BGPQUIT
 K BGPDATA
 D ALLALGA1^BGP0CU1(DFN,DT,.BGPDATA)
 D WALLALGT^BGP0CPU
 K BGPDATA
 D IVUD^BGP0CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),,.BGPDATA)
 D WIVUD^BGP0CPU
 Q
 ; 
SCIP3 ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 D WDT^BGP0CPU4(BGPVINP)
 Q:BGPQUIT
 K BGPPROC
 D SCIP1^BGP0CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),.BGPPROC)
 S BGPPPD=$P(BGPPROC(1),U,3)  ;principle procedure date
 D WPP1^BGP0CPU4
 Q:BGPQUIT
 D WOTHPROC^BGP0CPU4
 K BGPDATA
 Q:BGPQUIT
 D WPPDPOV^BGP0CPU4(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP0CPU4(BGPVSIT)
 Q:BGPQUIT
 I 'BGPEXCL D PERI^BGP0CPU4
 Q:BGPQUIT
 D INF^BGP0CPU4
 Q:BGPQUIT
 K BGPDATA
 S BGPPOSTI=$$POSTINF^BGP0CU5(DFN,$$DSCH^BGP0CU(BGPVINP),BGPPROC(1))
 D WPOSTINF^BGP0CPU4
 Q:BGPQUIT
 K BGPDATA
 D OTHSURG^BGP0CPU4
 Q:BGPQUIT
 K BGPDATA
 ;antibiotic rx status?
 D ANTIRX^BGP0CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
 D WANTIRX^BGP0CPU3
 Q:BGPQUIT
 D ALLALG1^BGP0CU1(DFN,DT,$$DSCH^BGP0CU(BGPVINP),.BGPDATA)
 D WALLALG^BGP0CPU
 Q:BGPQUIT
 K BGPDATA
 D ALLALGA1^BGP0CU1(DFN,DT,.BGPDATA)
 D WALLALGT^BGP0CPU
 K BGPDATA
 D IVUD^BGP0CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP0CU(BGPVINP),,.BGPDATA)
 D WIVUD^BGP0CPU
 Q
 ; 
TRANSIN ;
 I $Y>(BGPIOSL-4) D HDR^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 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^BGP0CP Q:BGPQUIT  D L1H^BGP0CP
 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
 ;