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

BGP1CP6.m

Go to the documentation of this file.
BGP1CP6 ; IHS/CMI/LAB - IHS gpra print ;
 ;;11.1;IHS CLINICAL REPORTING SYSTEM;;JUN 27, 2011;Build 33
 ;
 ;
SCALL ;EP
 ;I $Y>(BGPIOSL-3) D HDR^BGP1CP Q:BGPQUIT  D L1H^BGP1CP
 ;S BGPNOBA=1
 ;D WDT^BGP1CPU4(BGPVINP)
 ;Q:BGPQUIT
 ;I $$TRANS^BGP1CU(BGPVINP) D WTT^BGP1CPU4(BGPVINP) Q:BGPQUIT
 ;K BGPDATA
 ;D SCIP^BGP1CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
 ;D WPP^BGP1CPU4
 ;D WPPDPOV^BGP1CPU4(BGPVSIT)
 ;K BGPNOBA
 ;Q
 I $Y>(BGPIOSL-3) D HDR^BGP1CP Q:BGPQUIT  D L1H^BGP1CP
 S BGPNOBA=1
 D WRACE^BGP1CPU(DFN)
 Q:BGPQUIT
 D WDOB^BGP1CPU(DFN)
 Q:BGPQUIT
 D WZIP^BGP1CPU(DFN)
 Q:BGPQUIT
 D WINS^BGP1CPU(BGPVSIT,DFN)
 Q:BGPQUIT
 D WADM^BGP1CPU(BGPVINP)
 Q:BGPQUIT
 D WADM92^BGP1CPU(BGPVINP)
 Q:BGPQUIT
 D WADMS92^BGP1CPU(BGPVINP)
 Q:BGPQUIT
 D WDT^BGP1CPU(BGPVINP)
 Q:BGPQUIT
 D WDSGS92^BGP1CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP1CU(BGPVINP) D WTT^BGP1CPU(BGPVINP) Q:BGPQUIT
 K BGPNOBA
 D WPPDPOV^BGP1CPU(BGPVSIT)
 Q:BGPQUIT
 S BGPNOBA=1
 D OTHDPOVS^BGP1CPU(BGPVSIT)
 Q:BGPQUIT
 K BGPDATA
 D SCIP^BGP1CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP1CU(BGPVINP),.BGPDATA)
 D WPP^BGP1CPU4
 Q:BGPQUIT
 D WOTHPROS^BGP1CPU2
 K BGPNOBA
 Q
 ;
SCIP1 ;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
 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
 ;