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

ENY2VAC1.m

Go to the documentation of this file.
ENY2VAC1 ;(WIRMFO)/DH-National Roll-up of Y2K ;11.5.98
 ;;7.0;ENGINEERING;**55,59**;August 17,1993
ROLLCUM ;  roll-up cumulative information
 N J,K,CLASS,DONE
 S STATION="" F  S STATION=$O(COUNT(STATION)) Q:STATION=""  D
 . F J="FS","MED","PC","TEL" S KOUNT=KOUNT+1,ENC(KOUNT,0)="C1^"_J_U_COUNT(STATION,J,"ACT")_U_COUNT(STATION,J,"Y2K")_"^|"
 . S KOUNT=KOUNT+1,ENC(KOUNT,0)="C1^UNCLASS^"_COUNT(STATION,0,"ACT")_U_COUNT(STATION,0,"Y2K")_"^|"
 . F J="FS","MED","PC","TEL" I COUNT(STATION,J,"Y2K") D
 .. S KOUNT=KOUNT+1,ENC(KOUNT,0)="C2^"_J_U_COUNT(STATION,J,"FC")_U_COUNT(STATION,J,"NC")_U_COUNT(STATION,J,"CC")_U_COUNT(STATION,J,"NA")_U_COUNT(STATION,J,0)_"^|"
 . I COUNT(STATION,0,"Y2K") S KOUNT=KOUNT+1,ENC(KOUNT,0)="C2^UNCLASS^"_COUNT(STATION,0,"FC")_U_COUNT(STATION,0,"NC")_U_COUNT(STATION,0,"CC")_U_COUNT(STATION,0,"NA")_U_COUNT(STATION,0,0)_"^|"
 . F J="FS","MED","PC","TEL" S KOUNT=KOUNT+1 D
 .. I 'COUNT(STATION,J,"FC") S ENC(KOUNT,0)="C3^"_J_"^^^^^^|" Q
 .. S ENC(KOUNT,0)="C3^"_J_U_COUNT(STATION,J,"FC")_U_(COUNT(STATION,J,"FC")-COUNT(STATION,J,"FC","UPG"))_U_COUNT(STATION,J,"FC","UPG")_U_$P(^TMP($J,STATION,J,"FC","ACST")+.5,".")_U_$P(^TMP($J,STATION,J,"FC","ECST")+.5,".")_"^|"
 . S KOUNT=KOUNT+1 I 'COUNT(STATION,0,"FC") S ENC(KOUNT,0)="C3^UNCLASS^^^^^^|"
 . E  S ENC(KOUNT,0)="C3^UNCLASS^"_COUNT(STATION,0,"FC")_U_(COUNT(STATION,0,"FC")-COUNT(STATION,0,"FC","UPG"))_U_COUNT(STATION,0,"FC","UPG")_U_$P(^TMP($J,STATION,0,"FC","ACST")+.5,".")_U_$P(^TMP($J,STATION,0,"FC","ECST")+.5,".")_"^|"
 . F J="FS","MED","PC","TEL" S KOUNT=KOUNT+1 D
 .. I 'COUNT(STATION,J,"NC") S ENC(KOUNT,0)="C4^"_J_"^^^^^^^^^|" Q
 .. S ENC(KOUNT,0)="C4^"_J_U_COUNT(STATION,J,"NC")_U_COUNT(STATION,J,"NC","RET")_U_COUNT(STATION,J,"NC","REP")_U_COUNT(STATION,J,"NC","USE")_U_COUNT(STATION,J,"NC",0)_U_COUNT(STATION,J,"NC","ATD")
 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_U_$P(^TMP($J,STATION,J,"NC","ETOT")+.5,".")_U_($P(^TMP($J,STATION,J,"NC","ETOT")+.5,".")-$P(^TMP($J,STATION,J,"NC","ETD")+.5,"."))_"^|"
 . S KOUNT=KOUNT+1 I 'COUNT(STATION,0,"NC") S ENC(KOUNT,0)="C4^UNCLASS^^^^^^^^^|"
 . E  D
 .. S ENC(KOUNT,0)="C4^UNCLASS^"_COUNT(STATION,0,"NC")_U_COUNT(STATION,0,"NC","RET")_U_COUNT(STATION,0,"NC","REP")_U_COUNT(STATION,0,"NC","USE")_U_COUNT(STATION,0,"NC",0)_U_COUNT(STATION,0,"NC","ATD")
 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_U_$P(^TMP($J,STATION,0,"NC","ETOT")+.5,".")_U_($P(^TMP($J,STATION,0,"NC","ETOT")+.5,".")-$P(^TMP($J,STATION,0,"NC","ETD")+.5,"."))_"^|"
 . F J="FS","MED","PC","TEL" S KOUNT=KOUNT+1 S ENC(KOUNT,0)="C5^"_J_U_COUNT(STATION,J,"CC")_U_$P(^TMP($J,STATION,J,"CC","ECST")+.5,".")_"^|"
 . S KOUNT=KOUNT+1,ENC(KOUNT,0)="C5^UNCLASS^"_COUNT(STATION,0,"CC")_U_$P(^TMP($J,STATION,0,"CC","ECST")+.5,".")_"^|"
 . F J="FS","MED","PC","TEL" D
 .. S KOUNT=KOUNT+1,ENC(KOUNT,0)="C6^"_J F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,J,"CC","UPG",1998,K)_U_$P(^TMP($J,STATION,J,"CC","ECST",1998,K)+.5,".")
 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . S KOUNT=KOUNT+1,ENC(KOUNT,0)="C6^UNCLASS" F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,0,"CC","UPG",1998,K)_U_$P(^TMP($J,STATION,0,"CC","ECST",1998,K)+.5,".")
 . S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . F J="FS","MED","PC","TEL" D
 .. S KOUNT=KOUNT+1,ENC(KOUNT,0)="C7^"_J F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,J,"CC","UPG",1999,K)_U_$P(^TMP($J,STATION,J,"CC","ECST",1999,K)+.5,".")
 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . S KOUNT=KOUNT+1,ENC(KOUNT,0)="C7^UNCLASS" F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,0,"CC","UPG",1999,K)_U_$P(^TMP($J,STATION,0,"CC","ECST",1999,K)+.5,".")
 . S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . F J="FS","MED","PC","TEL" D
 .. S KOUNT=KOUNT+1,ENC(KOUNT,0)="C8^"_J F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,J,"CC","UPG",2000,K)_U_$P(^TMP($J,STATION,J,"CC","ECST",2000,K)+.5,".")
 .. S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . S KOUNT=KOUNT+1,ENC(KOUNT,0)="C8^UNCLASS" F K=1:1:12 S ENC(KOUNT,0)=ENC(KOUNT,0)_U_COUNT(STATION,0,"CC","UPG",2000,K)_U_$P(^TMP($J,STATION,0,"CC","ECST",2000,K)+.5,".")
 . S ENC(KOUNT,0)=ENC(KOUNT,0)_"^|"
 . F CLASS="FS","MED","PC","TEL" S KOUNT=KOUNT+1,DONE=0 D
 .. F K=2000,1999,1998 Q:DONE  F J=12:-1:0 S DONE=$G(COUNT(STATION,CLASS,"NC","SCHDT",K,J)) Q:DONE
 .. I 'DONE S ENC(KOUNT,0)="C9^"_CLASS_"^^|" Q
 .. S:J=0 J=12 S:$L(J)=1 J="0"_J S DATE=(K-1699)_J_"00",DATE=$$EOM^ENUTL(DATE),ENC(KOUNT,0)="C9^"_CLASS_U_(DATE+17000000)_"^|"
 . S KOUNT=KOUNT+1,DONE=0 F K=2000,1999,1998 Q:DONE  F J=12:-1:0 S DONE=$G(COUNT(STATION,0,"NC","SCHDT",K,J)) Q:DONE
 . I 'DONE S ENC(KOUNT,0)="C9^UNCLASS^^|" Q
 . S:J=0 J=12 S:$L(J)=1 J="0"_J S DATE=(K-1699)_J_"00",DATE=$$EOM^ENUTL(DATE),ENC(KOUNT,0)="C9^UNCLASS^"_(DATE+17000000)_"^|"
 Q
 ;ENY2VAC1