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

ABMMUPV2.m

Go to the documentation of this file.
ABMMUPV2 ;IHS/SD/SDR - MU Patient Volume EP Report ;
 ;;2.6;IHS 3P BILLING SYSTEM;**7,8**;NOV 12, 2009
 ;
CALC ;EP
 I ABMY("RTYP")="GRP" D CALC2 Q  ;abm*2.6*8
 S ABMSDT=0
 F  S ABMSDT=$O(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT)) Q:'ABMSDT  D
 .S ABMPRV=0
 .F  S ABMPRV=$O(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMPRV)) Q:'ABMPRV  D
 ..S ABMPERCT=$J((+$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT,ABMPRV))/(+$G(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMPRV))))*100,0,1)
 ..S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT,ABMPRV)=ABMPERCT
 ..I '$D(^XTMP("ABM-PVP",$J,"PRV TOP",ABMPRV)) S ^XTMP("ABM-PVP",$J,"PRV TOP",ABMPRV)=ABMPERCT_"^"_ABMSDT
 ..I +$P($G(^XTMP("ABM-PVP",$J,"PRV TOP",ABMPRV)),U)<ABMPERCT S ^XTMP("ABM-PVP",$J,"PRV TOP",ABMPRV)=ABMPERCT_"^"_ABMSDT
 ..;
 ..S ABMVLOC=0
 ..F  S ABMVLOC=$O(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMPRV,ABMVLOC)) Q:'ABMVLOC  D
 ...I +$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT,ABMPRV,ABMVLOC))=0 S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT,ABMPRV,ABMVLOC)=0 Q
 ...S ABMPERCT=$J((+$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT,ABMPRV,ABMVLOC))/(+$G(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMPRV,ABMVLOC))))*100,0,1)
 ...S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT,ABMPRV,ABMVLOC)=ABMPERCT
 Q
 ;start new code abm*2.6*8
CALC2 ;EP
 S ABMSDT=0
 F  S ABMSDT=$O(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT)) Q:'ABMSDT  D
 .S ABMPERCT=$J((+$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT))/(+$G(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT))))*100,0,1)
 .S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT)=ABMPERCT
 .I '$D(^XTMP("ABM-PVP",$J,"PRV TOP")) S ^XTMP("ABM-PVP",$J,"PRV TOP")=ABMPERCT_"^"_ABMSDT
 .I +$P($G(^XTMP("ABM-PVP",$J,"PRV TOP")),U)<ABMPERCT S ^XTMP("ABM-PVP",$J,"PRV TOP")=ABMPERCT_"^"_ABMSDT
 .;
 .S ABMVLOC=0
 .F  S ABMVLOC=$O(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMVLOC)) Q:'ABMVLOC  D
 ..I +$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT,ABMVLOC))=0 S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT,ABMVLOC)=0 Q
 ..S ABMPERCT=$J((+$G(^XTMP("ABM-PVP",$J,"PRV-NUM",ABMSDT,ABMVLOC))/(+$G(^XTMP("ABM-PVP",$J,"PRV-DENOM",ABMSDT,ABMVLOC))))*100,0,1)
 ..S ^XTMP("ABM-PVP",$J,"PRV PERCENT",ABMSDT,ABMVLOC)=ABMPERCT
 Q
 ;end new code abm*2.6*8