source: FOIAVistA/tag/r/LIBRARY-LBR-LBRS/LBRYRET2.m@ 1789

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1LBRYRET2 ;ISC2/DJM-RETURN FROM ROUTING NOTES ;[ 05/23/97 12:13 PM ]
2 ;;2.5;Library;**2**;Mar 11, 1996
3START S E=0,DIWL=1,DIWR=79,DIWF="N" K ^UTILITY($J,"W")
4 S XX=$P(^LBRY(680,DA,16,0),U,3)
5 F I=1:1:XX S X=^LBRY(680,DA,16,I,0) D ^DIWP
6 S X=^UTILITY($J,"W",DIWL)-1,X1=0,X2=0
7LOOP W @IOF,?5,"VA Library Return from Routing ** NOTES **",?60,YDT
8 W !!,LA0 W:$D(LA00) !,LA00 W !! S X1=X1+X2,X2=X2+16 I X2>X S X2=X
9 I X1'<X G EXIT
10 F I=X1+1:1:X2 S O=^UTILITY($J,"W",DIWL,I,0) W O,!
11QUERY W !!,$S(I<X:"Continue// ",1:"Exit// ")
12 S DTOUT="" R Z:DTIME E S DTOUT=1 W $C(7) G EXIT
13 I I'=X,Z="" G LOOP
14 I I=X,Z="" G EXIT
15 I Z="^" G EXIT
16 W !!,$S(I'=X:"Enter '^' to exit or <CR> to continue",1:"Enter <CR> to exit") G QUERY
17EXIT K XX,^UTILITY($J,"W") Q
18 Q
19ASK W !!,"Enter copy number/s to return separated by commas or a hyphen."
20 W !,"Copy nunber/s: EXIT// " S Q=1
21ASK0 S DTOUT=0,X="" R X:DTIME E W $C(7) S DTOUT=1 G EXIT
22 I X="^" G ^LBRYRET
23 I X="" G ^LBRYRET
24 I X=" ",$D(^TMP("LBRY",DUZ,3)) S X=^(3)
25 I X?.N D UTIL G PARSE
26ASK3 S G=$P(X,",",Q) G:G="" ASK1 G:G["-" ASK4 G:G'?.N ASK2 S Q=Q+1 G ASK3
27ASK1 D UTIL G PARSE
28ASK2 W !!,"Please enter a copy number or a range of numbers separated by a hyphen '1-2'"
29 W !,"or a combination of the two separated by a comma '1,2-4' or <CR> to EXIT."
30 G ASK
31ASK4 G:G'?1N.N1"-"1N.N ASK2 S Q=Q+1 G ASK3
32UTIL K ^TMP("LBRY",DUZ,3) S ^(3)=X Q
33PARSE F I=1:1 S G=$P(X,",",I) G:G="" FINI D:G=+G RETURN D:G["-" PARSE1
34PARSE1 S G1=$P(G,"-",1),G2=$P(G,"-",2) I G2'<G1 F G=G1:1:G2 D RETURN
35 Q
36RETURN S NUM=$O(^LBRY(682,A(LBX),4,"B",G,0)) Q:NUM="" L ^LBRY(682,A(LBX),4):1 Q:$T=0 S LBRYR=^LBRY(682,A(LBX),4,NUM,0) I $P(LBRYR,U,2)<3 S $P(^LBRY(682,A(LBX),4,NUM,0),U,2)=3,$P(^(0),U,5)=YDT1,$P(^(0),U,4)=DUZ
37 L Q
38FINI S XZ="EXIT//" D PAUSE^LBRYCK0 K XZ
39 G ^LBRYRET
Note: See TracBrowser for help on using the repository browser.