source: WorldVistAEHR/trunk/r/LIBRARY-LBR-LBRS/LBRYRET1.m@ 1154

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

initial load of WorldVistAEHR

File size: 1.9 KB
Line 
1LBRYRET1 ;ISC2/DJM-LIBRARY RETURN FROM ROUTING ;[ 05/23/97 12:13 PM ]
2 ;;2.5;Library;**2**;Mar 11, 1996
3CK D CHECK,SHOW G:RTD=AA4 FINI^LBRYRET2 S LBX=X G ASK^LBRYRET2
4CHECK K RC
5 S LA0=$P(^LBRY(680,LBRYLOC,0),U),LA0=$P(^LBRY(680.5,LA0,0),U)
6 S LA1="JOURNAL",LA2="DATE",LA3="V(I)",LA8="COMPLETED",LA5="COPIES"
7 S LA6="RECEIVED",LA11="ORDERED",LA9="DISPOSITION",LA12="SHELVED"
8 S LA0="TITLE: "_LA0
9 S LA00="" S:$D(^LBRY(680,LBRYLOC,1))#2 LA00=" "_$P(^(1),U,5)
10 S RTD=0 D RTED S:RTD=0 RTD=""
11 S AA=^LBRY(682,A(X),1),AA1=$P(AA,U),AA2=$P(AA,U,2),AA3=$P(AA,U,3)
12 S AA4=$P(AA,U,4),AA5=$P(AA,U,5) S:AA3'="" AA2=AA2_"("_AA3_")" I AA4=0 S AA4=""
13 S Y=AA1 X ^DD("DD") S AA1=Y
14 W @IOF,"VA Library Return from Routing",?60,YDT,!!,LA0
15 W !,LA00,!!,?5,LA1,?41,LA5,?50,LA5,?60,LA5,!,?5,LA2,?21,LA3,?41,LA11
16 W ?50,LA6,?60,LA12,!
17 W ?5 F I=1:1:64 W "-"
18 W !,?5,AA1,?18,AA2,?44,AA5,?53,AA4,?63,RTD,! Q
19RTED S N=0 F S N=$O(^LBRY(682,A(X),4,N)) Q:N'>0 S N2=^LBRY(682,A(X),4,N,0) I $P(N2,U,2)=3&($P(N2,U)'="ToC") S RTD=RTD+1
20 Q
21SHOW S N=0 W !,?6,"C",?58,"LIBRARY",!,?6,"A",?45,"DATE",?58,"SITE"
22 W !,?6,"T",?8,"STATUS",?28,"LOCATION",?45,"RECEIVED",?58,"LOCATION"
23 W !,?6 F I=1:1:73 W "-"
24SHOW1 S N=$O(^LBRY(682,A(X),4,"B",N)) Q:N=""
25 S N1=$O(^LBRY(682,A(X),4,"B",N,0)),RR=^LBRY(682,A(X),4,N1,0)
26 S RR1=$P(RR,U),RR2=$P(RR,U,2),RR7=$P(RR,U,7) D SHOW2
27 ;;I $P(RR,U,2)<3,$P(RR,U,1)'="ToC" INSERT INTO SHOW1 AFTER S RR=... TO ONLY DISPLAY COPIES ABLE TO BE RETURNED.
28 G SHOW1
29SHOW2 S Y=RR7 X ^DD("DD") S RR7=Y S:RR1=+RR1 RR1="c"_RR1
30 S RR2=$S(RR2=1:"ROUTED",RR2=2:"ROUTED (TO RETURN)",RR2=3:"SHELVED",RR2=4:"NOT RECEIVED",1:"TOC NOT RECEIVED")
31 S RRX=$P(RR,U,3),RRX0=$G(^LBRY(681,RRX,0)),RRX=$G(^LBRY(681,RRX,1))
32 S RR4=$P(RRX,U,4),RRY=$P(RRX,U,2),RR5=""
33 I $G(RRY)'="" S RR5=$E($P(^LBRY(680.7,RRY,0),U),1,15)
34 S RR8=$P(RRX0,U,4),RR8=$S(RR5]"":$E($P(^LBRY(680.6,RR8,0),U),1,22),1:"")
35 W !,RR1,?6,RR4,?8,RR2,?28,RR5,?45,RR7,?58,RR8
36 Q
Note: See TracBrowser for help on using the repository browser.