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

ACGSUP.m

Go to the documentation of this file.
ACGSUP ;IHS/OIRM/DSD/THL,AEF - UTILITY TO CHECK FOR ACTIVE STATUS; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;modified for y2k;mlp
 ;;UTILITY TO CHECK FOR ACTIVE STATUS
INACT ;EP;TO CHECK ACTIVE STATUS
 D ^XBKVAR
 D FY^ACGSEXP
 W ! D WAIT^DICD W !
 Q:$D(ACGQUIT)!'$D(ACGFY)
FY ;EP; TO CHECK FOR ACTIVE STATUS
 W !,"All records will now be checked for active status.",!,"Please do not interrupt."
 S (ACGI,ACGJ,ACGX)=0,U="^"
 S ACGX=0
 D CHANGES
 Q
 F  S ACGX=$O(^ACGS("C",ACGX)) Q:'ACGX  K ACG91 I $D(^ACGS(ACGX,"DT")) S ACGDT=+^("DT") D
 .I ACGDT'=15,ACGDT'=17 S ACGT="T"
 .E  S ACGT="SPP"
 .S ACGY=0
 .F  S ACGY=$O(^ACGS("C",ACGX,ACGY)) Q:'ACGY!$D(ACG91)  I $D(^ACGS(ACGY,"DT")),$D(^("DT1")) S ACG2=$P(^("DT"),U,2),ACGDT1=^("DT1") F I=2,3,4 I $E($P(ACGDT1,U,I),1,3)>(ACGFY-1) S ACG91="" Q  ;y2k;mlp
 .S ACGY=0
 .F  S ACGY=$O(^ACGS("C",ACGX,ACGY)) Q:'ACGY  D
 ..I $D(^ACGS(ACGY,"DT")),$D(^("DT1")) S ACG2=$P(^("DT"),U,2),ACGDT1=^("DT1")
 ..E  Q
 ..I $E($P(ACGDT1,U,3),1,3)>$S($E($P(ACGDT1,U,3),4,5)<10:ACGFY,1:ACGFY-1) Q  ;mlp;y2k
 ..I ACGT="T","^102^161^235^239^241^242^243^244^245^246^247^248^249^285^GS0^GS1^"'[(U_$E(ACG2,1,3)_U) K ACG2
 ..S $P(^ACGS(ACGY,"IHS"),U,23)=$S($D(ACG2)&$D(ACG91)&($E($P(^ACGS(ACGY,"DT"),U,2),4,5)'>ACGFY):1,1:"")
 ..I $P(^ACGS(ACGY,"IHS"),U,23)=1 S ACGI=ACGI+1,^ACGS(ACGT,1,ACGY)="" W "."
 K ACGT
 W !,"Number of Active Records: ",ACGI
 Q
CHANGES ;
 S ACGDAT=2_(ACGFY-1)_"0801"
 S ACGDAT=(ACGFY-1)_"0801" ;y2k;mlp
 F  S ACGDAT=$O(^ACGS("Q",ACGDAT)) Q:'ACGDAT  D
 .S ACGX=0
 .F  S ACGX=$O(^ACGS("Q",ACGDAT,ACGX)) Q:'ACGX  D
 ..S ACGDT=$G(^ACGS(ACGX,"DT"))
 ..Q:'+ACGDT
 ..I ACGDT'=15,ACGDT'=17 S ACGT="T"
 ..E  S ACGT="SPP"
 ..S ^ACGS(ACGT,1,ACGX)=""
 ..W "."
 Q