63 lines
2.8 KiB
Mathematica
63 lines
2.8 KiB
Mathematica
LRARREP ;DALISC/CKA - PRINT REPORT OF ARCHIVAL ACTIVITY;6/95
|
|
;;5.2;LABORATORY;**59**;August 31,1995
|
|
EN ;Entry point to print an archival activity report.
|
|
D DT^DICRW
|
|
AAR S DIC(0)="AEMZ",DIC="^LAB(95.11,"
|
|
D ^DIC
|
|
G:$D(DTOUT)!($D(DUOUT))!(Y<0) EXIT
|
|
S LRARID=+Y
|
|
Q S %ZIS="Q" D ^%ZIS G:POP EXIT I '$D(IO("Q")) U IO D START G EXIT
|
|
S ZTRTN="START^LRARREP",ZTSAVE("LRAR*")="",ZTDESC="REPORT OF ARCHIVAL ACTIVITY" D ^%ZTLOAD,HOME^%ZIS G EXIT
|
|
START ; BEGINS THE PRINT OF THIS ARCHIVE REPORT
|
|
K ^UTILITY("DIQ1",$J) S (END,PAGE)=0 D HDR G:END EXIT
|
|
S DIC="^LAB(95.11,",DA=LRARID,DR=".01;1;2;3;4;5;7;7.5;8;9;10;11;15;16;18;19;20",DIQ(0)="E" D EN^DIQ1 I '$D(^UTILITY("DIQ1",$J,95.11,DA)) W !,"RECORD DOESN'T EXIST!" G EXIT
|
|
NUM W !,"ARCHIVE NUMBER: ",$G(^UTILITY("DIQ1",$J,95.11,DA,.01,"E"))
|
|
FILE W !,"FILE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,1,"E"))
|
|
DF W !,"DESTINATION FILE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,15,"E"))
|
|
STAT W !,"ARCHIVAL STATUS: ",$G(^UTILITY("DIQ1",$J,95.11,DA,7,"E"))
|
|
SD W !,"SELECT DATE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,4,"E"))
|
|
SEL W !,"SELECTOR: ",$G(^UTILITY("DIQ1",$J,95.11,DA,7.5,"E"))
|
|
ARD W !,"ARCHIVE DATE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,9,"E"))
|
|
ARC W !,"ARCHIVER: ",$G(^UTILITY("DIQ1",$J,95.11,DA,5,"E"))
|
|
TASK W !,"ARCHIVE TASK NUMBER: ",$G(^UTILITY("DIQ1",$J,95.11,DA,18,"E"))
|
|
PD W !,"PURGE DATE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,10,"E"))
|
|
PUR W !,"PURGER: ",$G(^UTILITY("DIQ1",$J,95.11,DA,8,"E"))
|
|
ADL W !,"ARCHIVE DEVICE LABEL: ",$G(^UTILITY("DIQ1",$J,95.11,DA,16,"E"))
|
|
BEG W !,"BEGINNING DATE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,19,"E"))
|
|
EDT W !,"ENDING DATE: ",$G(^UTILITY("DIQ1",$J,95.11,DA,20,"E"))
|
|
RESULT I '$D(^LAB(95.11,LRARID,"RESULT")) W !!,"NO RESULTS"
|
|
ERROR W !!,"THE FOLLOWING RECORDS IN THE FILE WERE NOT MOVED BECAUSE OF ONE OR MORE ERRORS:",!
|
|
N REC,LINE,FILE S PAGE=0,FILE=0,REC=0,END=0 D FIL
|
|
W !!,"*** PLEASE KEEP THIS FOR FUTURE REFERENCE ***"
|
|
G END
|
|
FIL ;
|
|
S LINE="Entry # "
|
|
S FILE=$O(^LAB(95.11,LRARID,"RESULT","ERR",FILE)) Q:'FILE D REC
|
|
Q:END
|
|
G FIL
|
|
REC S REC=$O(^LAB(95.11,LRARID,"RESULT","ERR",FILE,REC)) Q:'REC S ERR=^(REC)
|
|
S LINE=LINE_REC_" was NOT processed because:"
|
|
W !!,LINE N A,B S A=1,LINE="Entry # " D ERR
|
|
Q:END
|
|
G REC
|
|
ERR S B=$P(ERR,";",A) Q:B="" S A=A+1
|
|
N Z S Z=0
|
|
F S Z=$O(^LAB(95.11,LRARID,"RESULT","DIERR",+B,"TEXT",Z)) Q:'Z W !?5,$G(^(Z)) D HDR:($Y+1>IOSL)
|
|
Q:END
|
|
G ERR
|
|
;
|
|
END I $E(IOST)'="C",$Y W @IOF
|
|
D ^%ZISC
|
|
Q
|
|
EXIT K %ZIS,DA,DIC,DIQ,DIR,DIRUT,DIWF,DIWL,DIWR,DR,END,ERR,LRARID,PAGE,X,Y,ZTDESC,ZTRTN,ZTSAVE
|
|
K ^UTILITY("DIQ1",$J)
|
|
D CLN^LRARU1
|
|
QUIT
|
|
HDR ;PRINT HEADING
|
|
I $E(IOST,1,2)="C-" W !,"Press RETURN to continue or '^' to exit: " R X:DTIME S END='$T!(X="^") Q:END
|
|
S PAGE=PAGE+1 W @IOF,!?25,"ARCHIVAL ACTIVITY REPORT",?(IOM-10),"Page ",$J(PAGE,3)
|
|
W !!?61,"Date/Time Printed"
|
|
D NOW^%DTC S Y=% X ^DD("DD") W !?61,$P(Y,":",1,2)
|
|
W !!
|
|
QUIT
|