source: FOIAVistA/trunk/r/GENERIC_CODE_SHEET-GEC/GECSRST1.m@ 1757

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1GECSRST1 ;WISC/RFJ/KLD-stack reports (print) ;22 Dec 93
2 ;;2.0;GCS;**4,15**;MAR 14, 1995
3 Q
4 ;
5 ;
6DQ ; queue comes here
7 N D,DA,DA1,DATA0,DATA1,GECSFLAG,NOW,PAGE,SCREEN,STATUS,TOTAL,TRANCODE,X,Y,YDT
8 K ^TMP($J,"GECSRSTA")
9 S TRANCODE=GECSSTRT F S TRANCODE=$O(^GECS(2100.1,"B",TRANCODE)) Q:TRANCODE=""!($E(TRANCODE,1,2)]GECSEND) D
10 . S DA=+$O(^GECS(2100.1,"B",TRANCODE,0)) Q:'DA
11 . S DATA0=$G(^GECS(2100.1,DA,0)) Q:DATA0=""
12 . I $P(DATA0,"^",3)'>GECSDATE Q
13 . ; check for confirmation number
14 . I $G(GECSFALL)!($D(GECSSTAT("N"))) D
15 . . S DA1=0 F S DA1=$O(^GECS(2100.1,DA,20,DA1)) Q:'DA1 I $P($G(^(DA1,0)),"^",2)="" Q
16 . . I DA1 S ^TMP($J,"GECSRSTA",DA)=""
17 . ;
18 . S STATUS=$P(DATA0,"^",4)
19 . I '$G(GECSFALL),$L(STATUS),'$D(GECSSTAT(STATUS)) Q
20 . I '$G(GECSFALL),STATUS="" Q
21 . S ^TMP($J,"GECSRSTA",DA)=""
22 ;
23 D NOW^%DTC S Y=% D DD^%DT S NOW=Y,PAGE=1
24 S SCREEN=0 I '$D(ZTQUEUED),IO=IO(0),$E(IOST)="C" S SCREEN=1
25 U IO D H
26 S (DA,TOTAL)=0 F S DA=$O(^TMP($J,"GECSRSTA",DA)) Q:'DA!($G(GECSFLAG)) S DATA0=$G(^GECS(2100.1,DA,0)),DATA1=$G(^(1)) D
27 . I $Y>(IOSL-7) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
28 . S Y=$P(DATA0,"^",3) D DD^%DT
29 . S X=$S($P(DATA0,"^",4)="":"",1:$P($P(GECSSSET,$P(DATA0,"^",4)_":",2),";"))
30 . S TOTAL=TOTAL+1
31 . W !,$P(DATA0,"^"),?24,Y,?46,X
32 . I $E(X)="Q" S (Y,YDT)=$P($G(^GECS(2100.1,DA,11)),"^",3) I Y D
33 . . W " ",$E(YDT,4,5),"-",$E(YDT,6,7),"-"
34 . . D DD^%DT W $E($P(Y,",",2),2,5)
35 . I $P(DATA1,"^",3)'="" W !?3,"COUNT: ",$E($P(DATA1,"^",3),1,69)
36 . I $E(X)="E",$P(DATA1,"^",2)'="" W !?3,"ERROR: ",$E($P(DATA1,"^",2),1,69)
37 . I GECSDESC=1,$P(DATA1,"^")'="" W !?3,"DESCR: ",$E($P(DATA1,"^"),1,69)
38 . I $Y>(IOSL-5) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
39 . I $O(^GECS(2100.1,DA,20,0)) D Q:$G(GECSFLAG)
40 . . W !?3,"MAIL MSGS: "
41 . . S DA1=0 F S DA1=$O(^GECS(2100.1,DA,20,DA1)) Q:'DA1!($G(GECSFLAG)) D
42 . . . I $Y>(IOSL-5) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
43 . . . W ?14,DA1,?24,"CONFIRMATION: ",$P(^GECS(2100.1,DA,20,DA1,0),"^",2)
44 . . . I $O(^GECS(2100.1,DA,20,DA1)) W !
45 . I $Y>(IOSL-5) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
46 . I $O(^GECS(2100.1,DA,21,0)) D Q:$G(GECSFLAG)
47 . . W !?3,"*OLD MSGS: "
48 . . S DA1=0 F S DA1=$O(^GECS(2100.1,DA,21,DA1)) Q:'DA1!($G(GECSFLAG)) D
49 . . . I $Y>(IOSL-5) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
50 . . . W ?14,DA1,?24,"CONFIRMATION: ",$P(^GECS(2100.1,DA,21,DA1,0),"^",2)
51 . . . I $O(^GECS(2100.1,DA,21,DA1)) W !
52 . I GECSCODE=1 D
53 . . W !,"*** ACTUAL CODE SHEET:"
54 . . S DA1=0 F S DA1=$O(^GECS(2100.1,DA,10,DA1)) Q:'DA1!($G(GECSFLAG)) S D=$G(^(DA1,0)) D
55 . . . I $Y>(IOSL-5) D:$G(SCREEN) PAUSE^GECSUTIL Q:$G(GECSFLAG) D H
56 . . . W !,D
57 . . I '$G(GECSFLAG) W !,"*** END OF CODE SHEET ***"
58 I '$G(GECSFLAG) W !!?10,"TOTAL CODE SHEETS: ",TOTAL
59 D ^%ZISC
60 K ^TMP($J,"GECSRSTA")
61 Q
62 ;
63 ;
64H S %=NOW_" PAGE "_PAGE,PAGE=PAGE+1 I PAGE'=2!(SCREEN) W @IOF
65 W $C(13),"GCS STACK FILE STATUS REPORT",?(80-$L(%)),%
66 S %="",$P(%,"-",81)=""
67 W !,"TC-TRAN CODE -BATNUM",?24,"DATE@TIME CREATED",?46,"STATUS",?70,"HOLD DATE",!,%
68 Q
Note: See TracBrowser for help on using the repository browser.