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

BGP2C4.m

Go to the documentation of this file.
BGP2C4 ; IHS/CMI/LAB - calc CMS measures ;
 ;;12.1;IHS CLINICAL REPORTING;;MAY 17, 2012;Build 66
 ;
SCALL ;EP
 K BGPDATA
 D SCIP^BGP2CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP2CU(BGPVINP),.BGPDATA)
 Q:'$D(BGPDATA)
 K BGPDATA
 I $$AGE^AUPNPAT(DFN,$P($P(BGPVSIT0,U),"."))<18 Q  ; no one under 18 at admission date
 S ^XTMP("BGP2C1",BGPJ,BGPH,"LIST",BGPIND,BGPPLSTL,$P(^DPT(DFN,0),U),DFN,BGPVSIT)=""
 Q
 ;
SCIP1 ;EP
 S BGPEX=""
 K BGPDATA
 D SCIP1^BGP2CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP2CU(BGPVINP),.BGPDATA)
 I '$D(BGPDATA) Q  ;no procedure
 I $$AGE^AUPNPAT(DFN,$P($P(BGPVSIT0,U),"."))<18 Q  ; no one under 18 at admission date
 ;exclusions
 I $$ADMPRIM^BGP2CU5(BGPVINP,"BGP CMS INFECTIOUS DXS") S BGPEX=BGPEX_"1|"
SCIP1A ;
 I $G(BGPEXCL),BGPEX]"" Q
 S ^XTMP("BGP2C1",BGPJ,BGPH,"LIST",BGPIND,BGPPLSTL,$P(^DPT(DFN,0),U),DFN,BGPVSIT)=BGPEX
 Q
 ;
SCIP3 ;EP
 S BGPEX=""
 K BGPDATA
 D SCIP1^BGP2CU5(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP2CU(BGPVINP),.BGPDATA)
 I '$D(BGPDATA) Q  ;no procedure
 I $$AGE^AUPNPAT(DFN,$P($P(BGPVSIT0,U),"."))<18 Q  ; no one under 18 at admission date
 ;exclusions
 I $$ADMPRIM^BGP2CU5(BGPVINP,"BGP CMS INFECTIOUS DXS") S BGPEX=BGPEX_"1|"
 K BGPDATA
 D ANTIRX^BGP2CU3(DFN,$P($P(BGPVSIT0,U),"."),$$DSCH^BGP2CU(BGPVINP),.BGPDATA)
 I '$D(BGPDATA) S BGPEX=BGPEX_"|7"
SCIP3A ;
 I $G(BGPEXCL),BGPEX]"" Q
 S ^XTMP("BGP2C1",BGPJ,BGPH,"LIST",BGPIND,BGPPLSTL,$P(^DPT(DFN,0),U),DFN,BGPVSIT)=BGPEX
 Q
 ;