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

ACRFPPR1.m

Go to the documentation of this file.
ACRFPPR1 ;IHS/OIRM/DSD/THL,AEF - PROMPT PAYMENT REPORT;  [ 11/01/2001   9:44 AM ]
 ;;2.1;ADMIN RESOURCE MGT SYSTEM;;NOV 05, 2001
 ;;
GATHER ;EP;GATHER REPORT DATA
 S (ACRIA,ACRIB,ACRIIA,ACRIIB,ACRIIC1,ACRIIC2,ACRIIC3)=0
 S ACROBJDA=$O(^AUTTOBJC("B","4319 ",0))
 Q:'ACROBJDA
 S ACRDATE=ACRBEGIN
 F  S ACRDATE=$O(^AFSLAFP("R",ACRDATE)) Q:'ACRDATE!(ACRDATE>ACREND)  D G1
 Q
G1 S ACRFYDA=0
 F  S ACRFYDA=$O(^AFSLAFP("R",ACRDATE,ACRFYDA)) Q:'ACRFYDA  D G11
 Q
G11 S ACRBATDA=0
 F  S ACRBATDA=$O(^AFSLAFP("R",ACRDATE,ACRFYDA,ACRBATDA)) Q:'ACRBATDA  D
 .S ACRSEQDA=0
 .F  S ACRSEQDA=$O(^AFSLAFP(ACRFYDA,1,ACRBATDA,1,ACRSEQDA)) Q:'ACRSEQDA  D
 ..S X=$G(^AFSLAFP(ACRFYDA,1,ACRBATDA,1,ACRSEQDA,0))
 ..Q:$P(X,U,24)
 ..S ACRIB=ACRIB+1
 ..S ACRIA=ACRIA+$P(X,U,11)
 ..I $P(X,U,8)=ACROBJDA D
 ...S ACRPEN=$P(X,U,11)
 ...S ACRIIC1=ACRIIC1+ACRPEN
 ...S ACRIIC2=ACRIIC2+1
 ...S ACRX=$G(^AFSLAFP(ACRFYDA,1,ACRBATDA,1,ACRSEQDA-1,0))
 ...S ACRIIA=ACRIIA+$P(ACRX,U,11)
 ...S ACRIIB=ACRIIC2
 ...I ACRPEN<25 S ACRIIC4(1)=$G(ACRIIC4(1))+1,ACRIIC4(11)=$G(ACRIIC4(11))+ACRPEN
 ...E  I ACRPEN<500 S ACRIIC4(2)=$G(ACRIIC4(2))+1,ACRIIC4(22)=$G(ACRIIC4(22))+ACRPEN
 ...E  I ACRPEN<1000 S ACRIIC4(3)=$G(ACRIIC4(3))+1,ACRIIC4(33)=$G(ACRIIC4(33))+ACRPEN
 ...E  I ACRPEN<2500 S ACRIIC4(4)=$G(ACRIIC4(4))+1,ACRIIC4(44)=$G(ACRIIC4(44))+ACRPEN
 ...E  I ACRPEN<3000 S ACRIIC4(5)=$G(ACRIIC4(5))+1,ACRIIC4(55)=$G(ACRIIC4(55))+ACRPEN
 ...E  S ACRIIC4(6)=$G(ACRIIC4(6))+1,ACRIIC4(66)=$G(ACRIIC4(66))+ACRPEN
 Q