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

BGP8CP3.m

Go to the documentation of this file.
BGP8CP3 ; IHS/CMI/LAB - IHS gpra print ; 02 Jul 2008  9:07 AM
 ;;8.0;IHS CLINICAL REPORTING;**2**;MAR 12, 2008
 ;
 ;
 ;
AMI4 ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 D WDT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
 D WPPDPOV^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 K BGPDATA
 S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
 D WCOMFORT^BGP8CPU(X)
 Q:BGPQUIT
 K BGPDATA
 S BGPC=0
 D SMOKER^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WSMOKER^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D CESS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WCESS^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D CESSMEDS^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($$DSCH^BGP8CU(BGPVINP),30),.BGPDATA)
 D WCESSMED^BGP8CPU
 K BGPDATA
 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
 ;
AMI4W ;EP
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 D WDOD^BGP8CPU(DFN)
 D WDT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
 D WPPDPOV^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 K BGPDATA
 S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
 D WCOMFORT^BGP8CPU(X)
 Q:BGPQUIT
 K BGPDATA
 S BGPC=0
 D SMOKER^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WSMOKER^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D CESS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WCESS^BGP8CPU
 Q:BGPQUIT
 K BGPDATA
 D CESSMEDS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 D WCESSMED^BGP8CPU
 K BGPDATA
 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
 ;
AMI8AW ;EP
 S BGPASTER=0
 I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT  D L1H^BGP8CP
 I $$TRANSIN^BGP8CU(BGPVINP) D TRANSIN Q:BGPQUIT
 D WDT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
 Q:BGPQUIT
 I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
 D WPPDPOV^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 D OTHDPOVS^BGP8CPU(BGPVSIT)
 Q:BGPQUIT
 S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
 D WCOMFORT^BGP8CPU(X)
 Q:BGPQUIT
 ;FIB MEDS
 S BGPFIB=""
 K BGPDATA
 D TARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($$DSCH^BGP8CU(BGPVINP),30),0,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
 K BGPUD
 D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),$O(^ATXAX("B","BGP CMS THROMBOLYTIC MEDS",0)),.BGPUD,"",$O(^ATXAX("B","BGP THROMBOLYTIC AGENTS CLASS",0)))
 S BGPTAPRO=$$LASTPRCI^BGP8UTL1(DFN,"99.10",$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP)) I BGPTAPRO S BGPTAPRO=$$DATE^BGP8UTL($P(BGPTAPRO,U,3))_"  ["_$P(BGPTAPRO,U,2)_"]  "_$$VAL^XBDIQ1(9000010.08,$P(BGPTAPRO,U,5),.04)
 D WFIB^BGP8CPU2
 Q:BGPQUIT
 K BGPST1
 S BGPST1=$$LASTDX^BGP8UTL1(DFN,"BGP ST ELEVATION DX",$$FMADD^XLFDT($P($P(BGPVSIT0,U),"."),-1),$$DSCH^BGP8CU(BGPVINP))
 I BGPST1 S BGPST1=$$DATE^BGP8UTL($P(BGPST1,U,3))_"  ["_$P(BGPST1,U,2)_"]  "_$$VAL^XBDIQ1(9000010.07,$P(BGPST1,U,5),.04)
 D WST^BGP8CPU2
 ;LBBB ON ECG
 K BGPLBPC,BGPLBDX
 S BGPLBDX=$$LBBBDX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(BGPVSIT0,U),"."),-1),$$DSCH^BGP8CU(BGPVINP)) I BGPLBDX S BGPLBDX=$$DATE^BGP8UTL($P(BGPLBDX,U,3))_"  ["_$P(BGPLBDX,U,2)_"]  "_$$VAL^XBDIQ1(9000010.07,$P(BGPLBDX,U,5),.04)
 D LBBBPROC^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(BGPVSIT0,U),"."),-1),$$DSCH^BGP8CU(BGPVINP),.BGPLBPC)
 D WLBBB^BGP8CPU2
 Q:BGPQUIT
 S BGPPCI=$$LASTPRCI^BGP8UTL1(DFN,"00.66",$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP)) I BGPPCI S BGPPCI=$$DATE^BGP8UTL($P(BGPPCI,U,3))_"  ["_$P(BGPPCI,U,2)_"]  "_$$VAL^XBDIQ1(9000010.08,$P(BGPPCI,U,5),.04)
 D WPCI^BGP8CPU2
 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 ;EP
 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
 ;