ABSVLBL ;VAMC ALTOONA/CTB - GENERIC LABEL PRINTING ROUTINE ;1/12/01 8:05 PM
V ;;4.0;VOLUNTARY SERVICE;**4,7,10,12,13,18,23**;JULY 6, 1994
;GIVEN LIST OF RECORDS IN ^TMP($J,"VLABEL",N)=DA
;PRINT MULTI COLUMN LABEL
;NLABEL=NUMBER OF LABELS/ROW
;NLINES=NUMBER OF LINES/LABEL
;NPAGE=NUMBER OF LABELS/PAGE
;LOFFSET=LEFT OFFSET
;DIC=GLOBAL REFERENCE OF FILE
;DR=FIELD NUMBERS TO BE INCLUDED IN LABEL
;BLANKS=NUMBER OF BLANK LABELS
GENERIC D BEGIN(0) QUIT
MINUTES D BEGIN(20) QUIT
CERT D BEGIN(21) QUIT
NATREP D BEGIN(22) QUIT
AJR D BEGIN(23) QUIT
ALL D BEGIN(24) QUIT
AFFIL D BEGIN(25) QUIT
DIRECT D BEGIN(30) QUIT
QUIT
BEGIN(TYPE) K ^TMP($J,"VLABEL")
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
S ABSVTERM=IO
D ^ABSVSITE Q:'%
I TYPE=0 S TYPE=$$VOL^ABSVLBL3 Q:'TYPE
I TYPE=30 S TYPE=$$DIR^ABSVLBL3 Q:'TYPE
S DIC=503338.1,DIC(0)="AQEMNZ",DIC("A")="Select Label Type: " D ^DIC
I Y<0 S X=" Cannot proceed without type of label. Option terminated." D MSG^ABSVQ QUIT
K DIC
S PARAMS=Y(0),LASER=$P(PARAMS,"^",9)
D @(TYPE_"^ABSVLBL3") Q:'$D(BY)
S $P(PARAMS,"^",10)=0
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."
D ^DIR K DIR
I Y["^" QUIT
S $P(PARAMS,"^",11)=+Y
I Y>1 D I $G(OUT) K OUT QUIT
. S DIR(0)="SO^1:COLLATED;2:UNCOLLATED"
. S DIR("A")="Collated/Uncollated",DIR("B")="COLLATED",DIR("?")="^D SETOFCDS^ABSVU2" D ^DIR
. K DIR
. I $$DIR^ABSVU2 S OUT=1 QUIT
. S $P(PARAMS,"^",12)=+Y
. QUIT
S X=($P(PARAMS,"^",2)*$P(PARAMS,"^",3))-1
S:X<0 X=0
I $P(PARAMS,"^",2)>1 D
. 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."
. D ^DIR K DIR
. Q:Y["^" S $P(PARAMS,"^",10)=Y
. QUIT
S %ZIS("A")="Please Select Label Device: ",%ZIS="QD" D ^%ZIS I POP D HOME^%ZIS QUIT
I 'LASER D ALIGN I '% S IOP=ION D ^%ZISC
I $D(IO("Q")) D I '$D(DQTIME) S X="