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

BGP8CP6.m

Go to the documentation of this file.
BGP8CP6 ; IHS/CMI/LAB - IHS gpra print ;
 ;;8.0;IHS CLINICAL REPORTING;**2**;MAR 12, 2008
 ;
 ;
SCALL ;EP
 ;I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 ;S BGPNOBA=1
 ;D WDT^BGP8CPU4(BGPVINP)
 ;Q:BGPQUIT
 ;I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU4(BGPVINP) Q:BGPQUIT
 ;K BGPDATA
 ;D SCIP^BGP8CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 ;D WPP^BGP8CPU4
 ;D WPPDPOV^BGP8CPU4(BGPVSIT)
 ;K BGPNOBA
 ;Q
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 S BGPNOBA=1
 D WRACE^BGP8CPU(DFN)
 Q:BGPQUIT
 D WDOB^BGP8CPU(DFN)
 Q:BGPQUIT
 D WZIP^BGP8CPU(DFN)
 Q:BGPQUIT
 D WINS^BGP8CPU(BGPVSIT,DFN)
 Q:BGPQUIT
 D WADM^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 D WADM92^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 D WADMS92^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 D WDT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 D WDSGS92^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP) Q:BGPQUIT
 K BGPNOBA
 D WPPDPOV^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 S BGPNOBA=1
 D OTHDPOVS^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 K BGPDATA
 D SCIP^BGP8CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WPP^BGP8CPU4
 Q:BGPQUIT
 D WOTHPROS^BGP8CPU2
 K BGPNOBA
 Q
 ;
SCIP1 ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 D WDT^BGP8CPU4(BGPVINP)
 Q:BGPQUIT
 K BGPPROC
 D SCIP1^BGP8CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPPROC)
 S BGPPPD=$P(BGPPROC(1),U,3)  ;principle procedure date
 D WPP1^BGP8CPU4
 Q:BGPQUIT
 D WOTHPROC^BGP8CPU4
 K BGPDATA
 Q:BGPQUIT
 D WPPDPOV^BGP8CPU4(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP8CPU4(BGPVSIT)
 Q:BGPQUIT
 I 'BGPEXCL D PERI^BGP8CPU4
 Q:BGPQUIT
 D INF^BGP8CPU4
 Q:BGPQUIT
 D OTHSURG^BGP8CPU4
 Q:BGPQUIT
 K BGPDATA
 ;antibiotic rx status?
 D ANTIRX^BGP8CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
 D WANTIRX^BGP8CPU3
 Q:BGPQUIT
 D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WALLALG^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
 D WALLALGT^BGP8CPU
 K BGPDATA
 D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
 D WIVUD^BGP8CPU
 Q
 ; 
SCIP3 ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 D WDT^BGP8CPU4(BGPVINP)
 Q:BGPQUIT
 K BGPPROC
 D SCIP1^BGP8CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPPROC)
 S BGPPPD=$P(BGPPROC(1),U,3)  ;principle procedure date
 D WPP1^BGP8CPU4
 Q:BGPQUIT
 D WOTHPROC^BGP8CPU4
 K BGPDATA
 Q:BGPQUIT
 D WPPDPOV^BGP8CPU4(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP8CPU4(BGPVSIT)
 Q:BGPQUIT
 I 'BGPEXCL D PERI^BGP8CPU4
 Q:BGPQUIT
 D INF^BGP8CPU4
 Q:BGPQUIT
 K BGPDATA
 S BGPPOSTI=$$POSTINF^BGP8CU5(DFN,$$DSCH^BGP8CU(BGPVINP),BGPPROC(1))
 D WPOSTINF^BGP8CPU4
 Q:BGPQUIT
 K BGPDATA
 D OTHSURG^BGP8CPU4
 Q:BGPQUIT
 K BGPDATA
 ;antibiotic rx status?
 D ANTIRX^BGP8CU3(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),.BGPDATA)
 D WANTIRX^BGP8CPU3
 Q:BGPQUIT
 D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WALLALG^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
 D WALLALGT^BGP8CPU
 K BGPDATA
 D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
 D WIVUD^BGP8CPU
 Q
 ; 
TRANSIN ;
 I $Y>(BGPIOSL-4) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 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^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 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
 ;