source: FOIAVistA/trunk/r/AUTOMATED_LAB_INSTRUMENTS-LA/LA7CHKFP.m@ 1328

Last change on this file since 1328 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1LA7CHKFP ;DALISC/JMC - Print Lab Messaging File Integrity Report; 2/26/97 11:00;
2 ;;5.2;LAB MESSAGING;**27**;Sep 27, 1994
3 ;This routine prints file integrity report for Lab Messaging.
4EN ; Select report to print
5 K ^TMP($J,"LA7ICLIST")
6 D HED1
7 S LA7IC="LA7IC",(LA7CNT,LA7DA,LA7QUIT)=0
8 F S LA7IC=$O(^XTMP(LA7IC)) Q:LA7IC=""!($P(LA7IC,"^")'="LA7IC") D Q:LA7QUIT!(LA7DA)
9 . N LA7X
10 . S LA7DT=$$FMTE^XLFDT($P(LA7IC,"^",2))
11 . S LA7CNT=LA7CNT+1,^TMP($J,"LA7ICLIST",LA7CNT)=LA7DT_"^"_LA7IC
12 . S LA7X=^XTMP(LA7IC,0)
13 . S LA7ECNT=$S($P(LA7X,"^",7):$P(LA7X,"^",7),1:"NO")_" errors"
14 . I '$P(LA7X,"^",5) D
15 . . L +^XTMP(LA7IC,0):1
16 . . I $T L -^XTMP(LA7IC,0) S LA7ECNT=LA7ECNT_" - Did NOT finish" Q
17 . . S LA7ECNT=LA7ECNT_" - Still running"
18 . W !,$J(LA7CNT,3)," ",LA7DT," [",LA7ECNT,"]"
19 . I $Y+10>IOSL D
20 . . D ASK
21 . . I LA7QUIT Q
22 . . D HED1
23 I LA7QUIT Q
24 I 'LA7CNT D EN^DDIOL("No reports on file!","","!?5")
25 I 'LA7DA D ASK
26 I 'LA7DA Q
27 S LA7IC=$P($G(^TMP($J,"LA7ICLIST",LA7DA)),"^",2,3)
28DEV ; Ask device to print report.
29 K %ZIS
30 S %ZIS="Q" D ^%ZIS
31 I POP D HOME^%ZIS Q
32 I $D(IO("Q")) D Q
33 . N MSG,ZTDESC,ZTDTH,ZTIO,ZTSK,ZTRTN,ZTSAVE
34 . S ZTRTN="DQ^LA7CHKFP",ZTDESC="Print LA7 Messaging Integrity Check"
35 . S ZTSAVE("LA7IC")=""
36 . D ^%ZTLOAD,^%ZISC
37 . S MSG="Task "_$S($G(ZTSK):"",1:"NOT ")_"Queued"
38 . D EN^DDIOL(MSG,"","!")
39 ;
40DQ ; Entry point from taskman
41 N LA7ECNT,LA7EDT,LA7I,LA7LINE,LA7PAGE,LA7RDT,LA7SDT,LA7X,X,Y
42 U IO
43 S $P(LA7LINE,"-",IOM)=""
44 S (LA7EXIT,LA7PAGE)=0
45 S LA7X=$G(^XTMP(LA7IC,0))
46 S LA7RDT=$$FMTE^XLFDT($P(LA7IC,"^",2))
47 S LA7SDT=$P(LA7X,"^",4)_"^"_$$FMTE^XLFDT($P(LA7X,"^",4))
48 S LA7EDT=$P(LA7X,"^",5)_"^"_$$FMTE^XLFDT($P(LA7X,"^",5))
49 S LA7TCNT=+$P(LA7X,"^",6) ; Count of # of entries checked
50 S LA7ECNT=+$P(LA7X,"^",7) ; Count of number of errors
51 S LA7NOW=$$NOW^XLFDT
52 S $P(LA7NOW,"^",2)=$$FMTE^XLFDT(LA7NOW)
53 D HED Q:$G(LA7EXIT)
54 I '$O(^XTMP(LA7IC,0)) W !," NO entries to print"
55 S LA7I=0
56 F S LA7I=$O(^XTMP(LA7IC,LA7I)) Q:'LA7I D Q:$G(LA7EXIT)
57 . I $Y+5>IOSL D HED Q:$G(LA7EXIT)
58 . W !,^XTMP(LA7IC,LA7I)
59 I '$G(LA7EXIT) D
60 . I $Y+5>IOSL D HED Q:$G(LA7EXIT)
61 . W !!," Total number of entries: ",LA7TCNT
62 . W !," Total number of errors: ",LA7ECNT
63 . W !," Integrity Checker Started: ",$P(LA7SDT,"^",2)
64 . W !,"Integrity Checker Finished: ",$P(LA7EDT,"^",2)
65 I '$G(LA7EXIT),$E(IOST,1,2)="C-" D TERM
66 I $D(ZTQUEUED) S ZTREQ="@"
67 E W:$E(IOST,1,2)="P-" @IOF D ^%ZISC
68 Q
69 ;
70TERM ;
71 I 'LA7PAGE W @IOF Q
72 N DIR,DIRUT,DTOUT,DUOUT,X,Y
73 W !
74 S DIR(0)="E" D ^DIR S:$D(DIRUT) LA7EXIT=1
75 Q
76 ;
77ASK ; Ask for report to print
78 N DIR,DIROUT,DIRUT,DUOUT,X,Y
79 W !
80 S DIR(0)="NO^1:"_LA7CNT_":0",DIR("A")="Select Report"
81 D ^DIR
82 I $D(DUOUT) S LA7QUIT=1 Q
83 I Y S LA7DA=Y
84 Q
85 ;
86HED1 ; Print selection header
87 W @IOF,$$CJ^XLFSTR("--- Lab Messaging Integrity Checker Report ---",IOM),!
88 Q
89 ;
90HED ; Print header
91 I $E(IOST,1,2)="C-" D TERM Q:$G(LA7EXIT)
92 I LA7PAGE W @IOF
93 S LA7PAGE=LA7PAGE+1
94 W !,"Lab Messaging File Integrity Checker Report",?IOM-30,"Printed: ",$P(LA7NOW,"^",2)
95 W !,"For Date: ",LA7RDT,?IOM-27,"Page: ",LA7PAGE
96 W !,LA7LINE,!
97 Q
Note: See TracBrowser for help on using the repository browser.