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

BGP8CP2.m

Go to the documentation of this file.
  1. BGP8CP2 ; IHS/CMI/LAB - IHS gpra print 02 Nov 2007 10:40 AM ;
  1. ;;8.0;IHS CLINICAL REPORTING;**2**;MAR 12, 2008
  1. ;
  1. ;
  1. AMI5W ;EP
  1. I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. D WDOD^BGP8CPU(DFN)
  1. Q:BGPQUIT
  1. D WDT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
  1. D WPPDPOV^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. D OTHDPOVS^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
  1. D WCOMFORT^BGP8CPU(X)
  1. Q:BGPQUIT
  1. K Z
  1. S X=$$BETAALEG^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. I X S X=$P(X,U,2)
  1. D WBETAAL^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPBRADY
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPBRADY,0,"BGP CMS BRADYCARDIA DXS")
  1. ;on active med for beta blocker?
  1. K BGPBETA
  1. D BETARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-180),$$DSCH^BGP8CU(BGPVINP),1,.BGPBETA)
  1. D WBRADY5^BGP8CPU2
  1. Q:BGPQUIT
  1. K BGPDATA
  1. K BGP23RD
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGP23RD,0,"BGP CMS 2/3 HEART BLOCK DXS")
  1. S BGPPACE=$$PACE^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. D W23RD^BGP8CPU2
  1. K BGPY
  1. D NMIDRUG^BGP8CU1(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,"BGP CMS BETA BLOCKER MEDS",0)
  1. S E=+$$CODEN^ICPTCOD("G8011")
  1. S Z=$$CPTI^BGP8DU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8011]"
  1. D WNMIBETA^BGP8CPU
  1. Q:BGPQUIT
  1. S X=$$LASTMED^BGP8CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS BETA BLOCKER MEDS","BGP CMS BETA BLOCKER NDC","BGP CMS BETA BLOCKER CLASS")
  1. S E=+$$CODEN^ICPTCOD("G8009")
  1. S Z=$$CPTI^BGP8DU(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8009]"
  1. D WLASTBB^BGP8CPU
  1. Q:BGPQUIT
  1. D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
  1. D WALLALG^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
  1. D WALLALGT^BGP8CPU
  1. K BGPDATA
  1. D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
  1. D WIVUD^BGP8CPU
  1. Q
  1. ;
  1. AMI5 ;EP
  1. I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. D WDT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
  1. D WPPDPOV^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. D OTHDPOVS^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
  1. D WCOMFORT^BGP8CPU(X)
  1. Q:BGPQUIT
  1. K BGPBRADY
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPBRADY,0,"BGP CMS BRADYCARDIA DXS")
  1. ;on active med for beta blocker?
  1. K BGPBETA
  1. D BETARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-180),$$DSCH^BGP8CU(BGPVINP),1,.BGPBETA)
  1. D WBRADY5^BGP8CPU2
  1. Q:BGPQUIT
  1. K BGPDATA
  1. K BGP23RD
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGP23RD,0,"BGP CMS 2/3 HEART BLOCK DXS")
  1. S BGPPACE=$$PACE^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. D W23RD^BGP8CPU2
  1. K BGPY
  1. D NMIDRUG^BGP8CU1(DFN,$$VD^APCLV(BGPVSIT),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,"BGP CMS BETA BLOCKER MEDS",0)
  1. S E=+$$CODEN^ICPTCOD("G8011")
  1. S Z=$$CPTI^BGP8DU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8011]"
  1. D WNMIBETA^BGP8CPU
  1. Q:BGPQUIT
  1. S X=$$LASTMED^BGP8CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS BETA BLOCKER MEDS","BGP CMS BETA BLOCKER NDC","BGP CMS BETA BLOCKER CLASS")
  1. S E=+$$CODEN^ICPTCOD("G8009")
  1. S Z=$$CPTI^BGP8DU(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8009]"
  1. D WLASTBB^BGP8CPU
  1. Q:BGPQUIT
  1. D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
  1. D WALLALG^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
  1. D WALLALGT^BGP8CPU
  1. K BGPDATA
  1. D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
  1. D WIVUD^BGP8CPU
  1. Q
  1. ;
  1. AMI6 ;EP
  1. I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. I $$TRANSIN^BGP8CU(BGPVINP) D TRANSIN Q:BGPQUIT
  1. D WDT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
  1. D WPPDPOV^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. D OTHDPOVS^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
  1. D WCOMFORT^BGP8CPU(X)
  1. Q:BGPQUIT
  1. K BGPBRADY
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPBRADY,0,"BGP CMS BRADYCARDIA DXS")
  1. ;on active med for beta blocker?
  1. K BGPBETA
  1. D BETARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-180),$$DSCH^BGP8CU(BGPVINP),1,.BGPBETA)
  1. S BGPASTER=1 D WBRADY6^BGP8CPU2 S BGPASTER=0
  1. Q:BGPQUIT
  1. K BGPDATA
  1. A6WHF1 ;
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,0,"BGP CMS HEART FAILURE DXS")
  1. D WHF^BGP8CPU2
  1. K BGPDATA
  1. Q:BGPQUIT
  1. K BGP23RD
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGP23RD,0,"BGP CMS 2/3 HEART BLOCK DXS")
  1. S BGPPACE=$$PACE^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. D W23RD^BGP8CPU2
  1. K BGPY
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,0,"BGP CMS CIRCULATORY SHOCK DXS")
  1. D WCS^BGP8CPU2
  1. K BGPDATA
  1. Q:BGPQUIT
  1. K BGPY
  1. D NMIDRUG^BGP8CU1(DFN,$$VD^APCLV(BGPVSIT),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,"BGP CMS BETA BLOCKER MEDS",0)
  1. S E=+$$CODEN^ICPTCOD("G8011")
  1. S Z=$$CPTI^BGP8DU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8011]"
  1. D WNMIBETA^BGP8CPU
  1. Q:BGPQUIT
  1. S X=$$LASTMED^BGP8CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS BETA BLOCKER MEDS","BGP CMS BETA BLOCKER NDC","BGP CMS BETA BLOCKER CLASS")
  1. S E=+$$CODEN^ICPTCOD("G8009")
  1. S Z=$$CPTI^BGP8DU(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8009]"
  1. D WLASTBB^BGP8CPU
  1. Q:BGPQUIT
  1. D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
  1. D WALLALG^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
  1. D WALLALGT^BGP8CPU
  1. K BGPDATA
  1. D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
  1. D WIVUD^BGP8CPU
  1. Q
  1. ;
  1. AMI6W ;EP
  1. S BGPASTER=0
  1. I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. I $$TRANSIN^BGP8CU(BGPVINP) D TRANSIN Q:BGPQUIT
  1. D WDOD^BGP8CPU(DFN)
  1. Q:BGPQUIT
  1. D WDT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
  1. D WPPDPOV^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. D OTHDPOVS^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
  1. D WCOMFORT^BGP8CPU(X)
  1. Q:BGPQUIT
  1. S X=$$BETAALEG^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. I X S X=$P(X,U,2)
  1. D WBETAAL^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPBRADY
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPBRADY,0,"BGP CMS BRADYCARDIA DXS")
  1. ;on active med for beta blocker?
  1. K BGPBETA
  1. D BETARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-180),$$DSCH^BGP8CU(BGPVINP),1,.BGPBETA)
  1. S BGPASTER=1 D WBRADY6^BGP8CPU2 S BGPASTER=0
  1. Q:BGPQUIT
  1. K BGPDATA
  1. A6WHF ;
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,0,"BGP CMS HEART FAILURE DXS")
  1. D WHF^BGP8CPU2
  1. K BGPDATA
  1. Q:BGPQUIT
  1. K BGP23RD
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGP23RD,0,"BGP CMS 2/3 HEART BLOCK DXS")
  1. S BGPPACE=$$PACE^BGP8CU2(DFN,$$DOB^AUPNPAT(DFN),$$DSCH^BGP8CU(BGPVINP))
  1. D W23RD^BGP8CPU2
  1. K BGPY
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLDXS^BGP8CU2(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,0,"BGP CMS CIRCULATORY SHOCK DXS")
  1. D WCS^BGP8CPU2
  1. K BGPDATA
  1. Q:BGPQUIT
  1. D NMIDRUG^BGP8CU1(DFN,$$VD^APCLV(BGPVSIT),$$DSCH^BGP8CU(BGPVINP),.BGPDATA,"BGP CMS BETA BLOCKER MEDS",0)
  1. S E=+$$CODEN^ICPTCOD("G8011")
  1. S Z=$$CPTI^BGP8DU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$$DSCH^BGP8CU(BGPVINP),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8011]"
  1. D WNMIBETA^BGP8CPU
  1. Q:BGPQUIT
  1. S X=$$LASTMED^BGP8CU1(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),"BGP CMS BETA BLOCKER MEDS","BGP CMS BETA BLOCKER NDC","BGP CMS BETA BLOCKER CLASS")
  1. S E=+$$CODEN^ICPTCOD("G8009")
  1. S Z=$$CPTI^BGP8DU(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($P($P(^AUPNVINP(BGPVINP,0),U),"."),30),E) I Z]"" S Z=$$DATE^BGP8UTL($P(Z,U,2))_" [G8009]"
  1. D WLASTBB^BGP8CPU
  1. Q:BGPQUIT
  1. D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
  1. D WALLALG^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
  1. D WALLALGT^BGP8CPU
  1. K BGPDATA
  1. D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
  1. D WIVUD^BGP8CPU
  1. Q
  1. ;
  1. AMI7AW ;EP
  1. S BGPASTER=0
  1. I $Y>(BGPIOSL-3) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. I $$TRANSIN^BGP8CU(BGPVINP) D TRANSIN Q:BGPQUIT
  1. D WDT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D WTT^BGP8CPU(BGPVINP)
  1. Q:BGPQUIT
  1. I $$TRANS^BGP8CU(BGPVINP) D TRANSN Q:BGPQUIT
  1. D WPPDPOV^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. D OTHDPOVS^BGP8CPU(BGPVSIT)
  1. Q:BGPQUIT
  1. S X=$$COMFORT^BGP8CU(DFN,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),$P($P(^AUPNVINP(BGPVINP,0),U),"."))
  1. D WCOMFORT^BGP8CPU(X)
  1. Q:BGPQUIT
  1. K BGPST1
  1. S BGPST1=$$LASTDX^BGP8UTL1(DFN,"BGP ST ELEVATION DX",$$FMADD^XLFDT($P($P(BGPVSIT0,U),"."),-1),$$DSCH^BGP8CU(BGPVINP))
  1. I BGPST1 S BGPST1=$$DATE^BGP8UTL($P(BGPST1,U,3))_" ["_$P(BGPST1,U,2)_"] "_$$VAL^XBDIQ1(9000010.07,$P(BGPST1,U,5),.04)
  1. D WST^BGP8CPU2
  1. ;LBBB ON ECG
  1. K BGPLBPC,BGPLBDX
  1. 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)
  1. D LBBBPROC^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(BGPVSIT0,U),"."),-1),$$DSCH^BGP8CU(BGPVINP),.BGPLBPC)
  1. D WLBBB^BGP8CPU2
  1. ;FIB MEDS
  1. S BGPFIB=""
  1. K BGPDATA
  1. D TARX^BGP8CU2(DFN,$$FMADD^XLFDT($P($P(^AUPNVSIT(BGPVSIT,0),U),"."),-365),$$FMADD^XLFDT($$DSCH^BGP8CU(BGPVINP),30),0,$P($P(^AUPNVSIT(BGPVSIT,0),U),"."),.BGPDATA)
  1. K BGPUD
  1. 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)))
  1. 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)
  1. D WFIB^BGP8CPU2
  1. Q:BGPQUIT
  1. D ALLALG1^BGP8CU1(DFN,DT,$$DSCH^BGP8CU(BGPVINP),.BGPDATA)
  1. D WALLALG^BGP8CPU
  1. Q:BGPQUIT
  1. K BGPDATA
  1. D ALLALGA1^BGP8CU1(DFN,DT,.BGPDATA)
  1. D WALLALGT^BGP8CPU
  1. K BGPDATA
  1. D IVUD^BGP8CU1(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP8CU(BGPVINP),,.BGPDATA)
  1. D WIVUD^BGP8CPU
  1. Q
  1. ;
  1. TRANSIN ;
  1. I $Y>(BGPIOSL-4) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. W !!?3,"NOTE: Since Admission Type was ","""","Transferred,",""""," review patient's chart"
  1. W !,"to determine if patient should be excluded if transfer was from another"
  1. W !,"acute care hospital, including ER from another hospital.",!
  1. Q
  1. ;
  1. TRANSN ;EP
  1. I $Y>(BGPIOSL-4) D HDR^BGP8CP Q:BGPQUIT D L1H^BGP8CP
  1. W !!?3,"NOTE: Since Discharge Type was ","""","Transferred,",""""," review patient's chart"
  1. W !,"to determine if patient should be excluded if transferred to another"
  1. W !,"acute care hospital or federal hospital."
  1. Q
  1. ;