source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVLBL.m@ 1166

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1ABSVLBL ;VAMC ALTOONA/CTB - GENERIC LABEL PRINTING ROUTINE ;1/12/01 8:05 PM
2V ;;4.0;VOLUNTARY SERVICE;**4,7,10,12,13,18,23**;JULY 6, 1994
3 ;GIVEN LIST OF RECORDS IN ^TMP($J,"VLABEL",N)=DA
4 ;PRINT MULTI COLUMN LABEL
5 ;NLABEL=NUMBER OF LABELS/ROW
6 ;NLINES=NUMBER OF LINES/LABEL
7 ;NPAGE=NUMBER OF LABELS/PAGE
8 ;LOFFSET=LEFT OFFSET
9 ;DIC=GLOBAL REFERENCE OF FILE
10 ;DR=FIELD NUMBERS TO BE INCLUDED IN LABEL
11 ;BLANKS=NUMBER OF BLANK LABELS
12GENERIC D BEGIN(0) QUIT
13MINUTES D BEGIN(20) QUIT
14CERT D BEGIN(21) QUIT
15NATREP D BEGIN(22) QUIT
16AJR D BEGIN(23) QUIT
17ALL D BEGIN(24) QUIT
18AFFIL D BEGIN(25) QUIT
19DIRECT D BEGIN(30) QUIT
20 QUIT
21BEGIN(TYPE) K ^TMP($J,"VLABEL")
22 N COL,COLL,COUNT,ABSVX,BLANKS,B,DIJ,DIC,DIPASS,DISYS,DP,IOP,NODE,P,POP,OUT,X,ABSVTERM,PRT,LASER,LABELDIC,LABELDR,LOFFSET,NCOL,NEXT,NLABEL,NLINES,NNPAGE,NPAGE,NSETS,PARAMS,TOFFSET1,TOFFSET2,Y
23 S ABSVTERM=IO
24 D ^ABSVSITE Q:'%
25 I TYPE=0 S TYPE=$$VOL^ABSVLBL3 Q:'TYPE
26 I TYPE=30 S TYPE=$$DIR^ABSVLBL3 Q:'TYPE
27 S DIC=503338.1,DIC(0)="AQEMNZ",DIC("A")="Select Label Type: " D ^DIC
28 I Y<0 S X=" Cannot proceed without type of label. Option terminated." D MSG^ABSVQ QUIT
29 K DIC
30 S PARAMS=Y(0),LASER=$P(PARAMS,"^",9)
31 D @(TYPE_"^ABSVLBL3") Q:'$D(BY)
32 S $P(PARAMS,"^",10)=0
33 S DIR(0)="NA^1:90:0",DIR("A")="Select the number of labels/individual: ",DIR("B")=1,DIR("?")="Enter the number of labels per set."
34 D ^DIR K DIR
35 I Y["^" QUIT
36 S $P(PARAMS,"^",11)=+Y
37 I Y>1 D I $G(OUT) K OUT QUIT
38 . S DIR(0)="SO^1:COLLATED;2:UNCOLLATED"
39 . S DIR("A")="Collated/Uncollated",DIR("B")="COLLATED",DIR("?")="^D SETOFCDS^ABSVU2" D ^DIR
40 . K DIR
41 . I $$DIR^ABSVU2 S OUT=1 QUIT
42 . S $P(PARAMS,"^",12)=+Y
43 . QUIT
44 S X=($P(PARAMS,"^",2)*$P(PARAMS,"^",3))-1
45 S:X<0 X=0
46 I $P(PARAMS,"^",2)>1 D
47 . S DIR(0)="NA^0:"_X_":0",DIR("A")="Skip used labels of first page: ",DIR("B")=0,DIR("?")="Enter the number of labels on the first page that have already been used."
48 . D ^DIR K DIR
49 . Q:Y["^" S $P(PARAMS,"^",10)=Y
50 . QUIT
51 S %ZIS("A")="Please Select Label Device: ",%ZIS="QD" D ^%ZIS I POP D HOME^%ZIS QUIT
52 I 'LASER D ALIGN I '% S IOP=ION D ^%ZISC
53 I $D(IO("Q")) D I '$D(DQTIME) S X=" <Option Terminated>*" D MSG^ABSVQ QUIT
54 . K DQTIME
55 . S %DT="AER",%DT("A")="Select Date/Time to Print: ",%DT("B")="NOW"
56 . D ^%DT
57 . Q:Y<0
58 . X ^DD("DD")
59 . S DQTIME=Y
60 . QUIT
61 S IOP=$S($D(IO("Q")):"Q;",1:"")_ION D ^%ZISC
62DQ I '$D(FLDS) S FLDS=""
63 S DHIT="S COUNT=$G(COUNT)+1,^TMP($J,""VLABEL"",COUNT)=D0",DHD="@@"
64 S DIOBEG="W ! K ^TMP($J,""VLABEL""),^TMP($J,""XVLABEL"")",DIOEND="D LABEL^ABSVLBL2(LABELDIC,LABELDR,PARAMS)"
65 D EN1^DIP
66 D ^%ZISC
67 QUIT
68ALIGN ;align labels in the printer
69 NEW ABSVXA,ABSVXB,LX
70A1 S ABSVXA="DO YOU NEED TO CHECK THE ALIGNMENT OF THE LABELS IN THE PRINTER",ABSVXB="",%=2
71 U ABSVTERM D Q:%'=1
72 . D ^ABSVYN
73 . I %<1 S X=" <Option Terminated>*" D MSG^ABSVQ S %=0 QUIT
74 . I %=2 QUIT
75 U ABSVTERM W !!,"Please load the labels and align."
76 U ABSVTERM D ENCON^ABSVQ
77 I $D(IO("Q")) S IOP=ION_";"_IOST_";"_IOM_";"_IOSL,ZTRTN="DQALIGN^ABSVLBL",ZTDTH=$H D ^%ZTLOAD I 1 K IOP
78 E U IO(0) D DQALIGN
79 U ABSVTERM S ABSVXA="ARE LABELS ALIGNED CORRECTLY",ABSVXB="",%=2 D ^ABSVYN
80 I %<0 S IOP=ION U IO(0) W @IOF QUIT
81 I %=2 G A1
82 QUIT
83DQALIGN S X="",$P(X,"X",36)="" U IO W !,X,!,X,!,X,!,X,!!
84 QUIT
85AWARD S DIC="^ABS(503330,",L=0,FR="?",TO="?",(BY,FLDS)="[ABSV POTENTIAL AWARD LIST]" D EN1^DIP
86 QUIT
Note: See TracBrowser for help on using the repository browser.