source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENLBL15.m@ 699

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

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1ENLBL15 ;(WASH ISC)/DH-Print Bar Coded Equipment Labels ;10.10.97
2 ;;7.0;ENGINEERING;**12,35,45**;Aug 17, 1993
3LOCID ;By LOCAL IDENTIFIER
4 S ENERR=0 D STA^ENLBL3 G:ENEQSTA="^" QUIT^ENLBL3
5 N DIC,DIE,DA,DR,X,X1,X2,I,J,K,I1
6 D EN^ENLBL9 I $D(DIRUT) G EXIT1^ENLBL8
7 I '$D(ENEQIO),%<0 G EXIT1^ENLBL8
8 S DIC="^ENG(6914,",ENDX="L",ENLOCSRT=1
9LOCID1 S (X,ENLID)="" R !,"Start with: ",X:DTIME G:X="^"!(X="") EXIT1^ENLBL8 S:X=" " X="?" G:$E(X)="?" LOCID15
10 S X2=$L(X) I $D(^ENG(6914,"L",X)) S ENLID("FR")=X G LOCID2
11 I $E($O(^ENG(6914,"L",X)),1,X2)=X D IX^ENLIB1 G:X="" LOCID1 G:X="^" EXIT1^ENLBL8 S ENLID("FR")=X W " ",ENLID("FR") G LOCID2
12 S ENX=X,ENIX=0 I X?.N D IX^ENLIB1 G:X="^" EXIT1^ENLBL8 I $E(X,1,X2)=ENX S ENLID("FR")=X W " ",ENLID("FR") G LOCID2
13 I 'ENIX W !,"There is no LOCAL IDENTIFIER in the Equipment File that begins with:",!,?5,ENX
14 K ENIX
15LOCID15 W !,"Would you like a list of all LOCAL IDENTIFIERS" S %=1 D YN^DICN S:%<0 X="^" G:%<0 EXIT1^ENLBL8 G:%'=1 LOCID1
16 S X="" D IX^ENLIB1 G:X="" LOCID1 G:X="^" EXIT1^ENLBL8 S ENLID("FR")=X W " ",ENLID("FR")
17LOCID2 S X="" R !,"Go to: ",X:DTIME G:X="^"!(X="") EXIT1^ENLBL8 S:X=" " X="?"
18 I $E(X)="?" W !,"Please enter a character string which follows (or equals):",!,ENLID("FR"),!,"This will be the end point of our print job." G LOCID2
19 I ENLID("FR")?.N,$L(X)>0,X'?.N G LOCID25
20 I ENLID("FR")?.N,X?.N,X'<ENLID("FR") G LOCID25
21 I ENLID("FR")]X W !,"Your entry (",X,") does not follow ",ENLID("FR"),".",*7 G LOCID2
22LOCID25 S ENLID("TO")=X W !,"OK, including everything from ",ENLID("FR")," to ",ENLID("TO"),"."
23LOCID3 W !,"Sort labels by LOCATION" S %=1 D YN^DICN G:%<0 EXIT1^ENLBL8 I %=0 W !,"Say YES to sort labels by DIVISION, BUILDING, and then by ROOM.",!,"If you say NO, labels will be sorted by LOCAL IDENTIFIER." G LOCID3
24 S:%=2 ENLOCSRT=0
25 S %ZIS("A")="Select BAR CODE PRINTER: ",%ZIS("B")="",%ZIS="Q" I $D(ENEQIO),ENEQIO=IO S %ZIS=""
26 K IO("Q") D ^%ZIS K %ZIS G:POP EXIT1^ENLBL8
27 S ENBCIO=IO,ENBCIOSL=IOSL,ENBCIOF=IOF,ENBCION=ION,ENBCIOST=IOST,ENBCIOST(0)=IOST(0),ENBCIOS=IOS S:$D(IO("S")) ENBCIO("S")=IO("S")
28 I $D(IO("Q")) K IO("Q") S ZTIO=ION,ZTRTN="LOCID4^ENLBL15",ZTSAVE("EN*")="",ZTDESC="All Equipment Labels (Bar Code)" D ^%ZTLOAD K ZTSK G EXIT1^ENLBL8
29LOCID4 S ENEQBY="Local Identifier: "_ENLID("FR")_" to "_ENLID("TO")_"."
30 I $D(ENEQIO) D OPEN^ENLBL9 I POP G:$D(ZTQUEUED) REQ^ENLBL8 W !,*7,"Companion Printer UNAVAILABLE." D HOLD G EXIT1^ENLBL8
31 K ^TMP($J) I $D(^ENG(6914,"L",ENLID("FR"))) S I1=ENLID("FR"),ENDA=0 F S ENDA=$O(^ENG(6914,"L",I1,ENDA)) Q:ENDA'>0 S DA=ENDA D STATCK^ENLBL3 I DA]"" D:ENLOCSRT SORT^ENLBL3 I 'ENLOCSRT D LIDSRT
32 I $G(I1)]"" F S I1=$O(^ENG(6914,"L",I1)) Q:I1="" D NEXT Q:I1="" S ENDA=0 F S ENDA=$O(^ENG(6914,"L",I1,ENDA)) Q:ENDA'>0 S DA=ENDA D STATCK^ENLBL3 I DA]"" D:ENLOCSRT SORT^ENLBL3 D:'(ENDA#10) DOTS^ENLBL3 I 'ENLOCSRT D LIDSRT
33 I $D(^TMP($J)) U ENBCIO D FORMAT^ENLBL7 S I1="" F S I1=$O(^TMP($J,I1)) Q:I1="" S DA=0 F S DA=$O(^TMP($J,I1,DA)) Q:DA'>0 U ENBCIO D NXPRT^ENLBL7 D:$D(ENEQIO) CPRNT^ENLBL9 D:'(DA#10) DOTS^ENLBL3 D BCDT^ENLBL7
34 G EXIT^ENLBL8
35 ;
36NEXT ;Time to quit?
37 I I1=+I1,ENLID("TO")'=+ENLID("TO") Q
38 I I1=+I1,ENLID("TO")=+ENLID("TO") S:I1>ENLID("TO") I1="" Q
39 I I1'=+I1,ENLID("TO")=+ENLID("TO") S I1="" Q
40 I I1]ENLID("TO") S I1=""
41 Q
42 ;
43LIDSRT S ^TMP($J,I1,DA)="" Q
44HOLD W !,"Press <RETURN> to continue..." R X:DTIME
45 Q
46 ;ENLBL15
Note: See TracBrowser for help on using the repository browser.