ADETMP ; IHS/HQT/MJL - RECOMPILE MISSING DATA [ 03/24/1999 9:04 AM ]
;;6.0;ADE;;APRIL 1999
W !!,"This option will update the quarters starting from the last"
W !,"quarter compiled and ending at the 4th quarter 1998"
S DIR(0)="YA",DIR("B")="YES",DIR("A")="Continue? "
D ^DIR Q:'Y
I $D(DTOUT)!($D(DUOUT))!($D(DIROUT)) Q
S ZTRTN="START^ADETMP",ZTDESC="DENTAL STATS COMPILE QUARTERS",ZTIO=""
D ^%ZTLOAD
Q
START ;
S ADEQTR=0 F S ADEQTR=$O(^ADEKNT("AD",ADEQTR)) Q:ADEQTR="" S ADEQTR($P(ADEQTR,".",1,2))=""
S ADEQTR=0 F S ADELQTR=ADEQTR,ADEQTR=$O(ADEQTR(ADEQTR)) Q:ADEQTR="" S ADEQDF=ADEQTR-ADELQTR I ADEQDF>.1,ADELQTR,ADEQDF'=.7 Q
S ADEYQ=ADELQTR
K ADEQDF,ADELQTR,ADEQTR
F D KNS^ADEKNT(ADEYQ,"ALL") Q:ADEYQ[98.4 S ADEYQ=ADEYQ+.1 S:ADEYQ[".5" ADEYQ=ADEYQ\1+1+.1
Q
ADETMP ; IHS/HQT/MJL - RECOMPILE MISSING DATA [ 03/24/1999 9:04 AM ]
+1 ;;6.0;ADE;;APRIL 1999
+2 WRITE !!,"This option will update the quarters starting from the last"
+3 WRITE !,"quarter compiled and ending at the 4th quarter 1998"
+4 SET DIR(0)="YA"
SET DIR("B")="YES"
SET DIR("A")="Continue? "
+5 DO ^DIR
IF 'Y
QUIT
+6 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIROUT))
QUIT
+7 SET ZTRTN="START^ADETMP"
SET ZTDESC="DENTAL STATS COMPILE QUARTERS"
SET ZTIO=""
+8 DO ^%ZTLOAD
+9 QUIT
START ;
+1 SET ADEQTR=0
FOR
SET ADEQTR=$ORDER(^ADEKNT("AD",ADEQTR))
IF ADEQTR=""
QUIT
SET ADEQTR($PIECE(ADEQTR,".",1,2))=""
+2 SET ADEQTR=0
FOR
SET ADELQTR=ADEQTR
SET ADEQTR=$ORDER(ADEQTR(ADEQTR))
IF ADEQTR=""
QUIT
SET ADEQDF=ADEQTR-ADELQTR
IF ADEQDF>.1
IF ADELQTR
IF ADEQDF'=.7
QUIT
+3 SET ADEYQ=ADELQTR
+4 KILL ADEQDF,ADELQTR,ADEQTR
+5 FOR
DO KNS^ADEKNT(ADEYQ,"ALL")
IF ADEYQ[98.4
QUIT
SET ADEYQ=ADEYQ+.1
IF ADEYQ[".5"
SET ADEYQ=ADEYQ\1+1+.1
+6 QUIT