ADEKRP1 ; IHS/HQT/MJL - PRINT COMPILED REPORTS ; [ 03/24/1999 9:04 AM ]
;;6.0;ADE;;APRIL 1999
PRINT ;EP TASKMAN ENTRY FOR PRINT PHASE
I '$D(^TMP("ADEP",ADEU)) G PRNEND
I $D(ZTQUEUED) L +^TMP("ADEP",ADEU):1 I '$T S ADENOLOK=1 G PRNEND
N FLDS
F J=1:1:$L(ADEROPT,U) S FLDS=$P(ADEROPT,U,J),DHD=$P(FLDS,";",2),FLDS=$P(FLDS,";") D
. N DIC,BY,ADED0,ADED1,ADED2,ADED3,Y,ADEX0,ADEX1,ADEX2,J,ADEZTSK
. S IOP=ADEIOP
. S %ZIS("IOPAR")=ADEIOPAR
. D ^%ZIS
. S IOP=ADEIOP
. S %ZIS("IOPAR")=ADEIOPAR
. S DIC="^ADEDUM(",BY="@NUMBER",(FR,TO)=""
. S:FLDS["SINGLE" BY="#"_BY
. S ADED0=0
. I FLDS["ADEK-COMBINE-QUARTER" D
. . S ADEX0="S ADED0=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0))"
. . S ADEX1="S ADED1=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0,ADED1),-1)"
. . S ADEX2="S ADED2=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0,ADED1,ADED2))"
. I FLDS["ADEK-CALIF" D
. . S ADED0=999999
. . S ADEX0="S ADED0=$O(^TMP(""ADEP"",ADEU,"_$S(FLDS["Q":"""CFQ""",1:"""CF""")_",ADED0),-1)"
. ;FHL 9/9/98 I $D(ZTSK) S ADEZTSK=ZTSK K ZTSK
. I $D(ZTQUEUED) S ADEZTSK=ZTSK K ZTSK
. D EN1^DIP
. I $D(ADEZTSK) S ZTSK=ADEZTSK
PRNEND I $D(ZTQUEUED) S ZTREQ="@"
I '$D(ADENOLOK) K ^TMP("ADEP",ADEU)
K ADENOLOK
Q
ADEKRP1 ; IHS/HQT/MJL - PRINT COMPILED REPORTS ; [ 03/24/1999 9:04 AM ]
+1 ;;6.0;ADE;;APRIL 1999
PRINT ;EP TASKMAN ENTRY FOR PRINT PHASE
+1 IF '$DATA(^TMP("ADEP",ADEU))
GOTO PRNEND
+2 IF $DATA(ZTQUEUED)
LOCK +^TMP("ADEP",ADEU):1
IF '$TEST
SET ADENOLOK=1
GOTO PRNEND
+3 NEW FLDS
+4 FOR J=1:1:$LENGTH(ADEROPT,U)
SET FLDS=$PIECE(ADEROPT,U,J)
SET DHD=$PIECE(FLDS,";",2)
SET FLDS=$PIECE(FLDS,";")
Begin DoDot:1
+5 NEW DIC,BY,ADED0,ADED1,ADED2,ADED3,Y,ADEX0,ADEX1,ADEX2,J,ADEZTSK
+6 SET IOP=ADEIOP
+7 SET %ZIS("IOPAR")=ADEIOPAR
+8 DO ^%ZIS
+9 SET IOP=ADEIOP
+10 SET %ZIS("IOPAR")=ADEIOPAR
+11 SET DIC="^ADEDUM("
SET BY="@NUMBER"
SET (FR,TO)=""
+12 IF FLDS["SINGLE"
SET BY="#"_BY
+13 SET ADED0=0
+14 IF FLDS["ADEK-COMBINE-QUARTER"
Begin DoDot:2
+15 SET ADEX0="S ADED0=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0))"
+16 SET ADEX1="S ADED1=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0,ADED1),-1)"
+17 SET ADEX2="S ADED2=$O(^TMP(""ADEP"",ADEU,""CQ"",ADED0,ADED1,ADED2))"
End DoDot:2
+18 IF FLDS["ADEK-CALIF"
Begin DoDot:2
+19 SET ADED0=999999
+20 SET ADEX0="S ADED0=$O(^TMP(""ADEP"",ADEU,"_$SELECT(FLDS["Q":"""CFQ""",1:"""CF""")_",ADED0),-1)"
End DoDot:2
+21 ;FHL 9/9/98 I $D(ZTSK) S ADEZTSK=ZTSK K ZTSK
+22 IF $DATA(ZTQUEUED)
SET ADEZTSK=ZTSK
KILL ZTSK
+23 DO EN1^DIP
+24 IF $DATA(ADEZTSK)
SET ZTSK=ADEZTSK
End DoDot:1
PRNEND IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+1 IF '$DATA(ADENOLOK)
KILL ^TMP("ADEP",ADEU)
+2 KILL ADENOLOK
+3 QUIT