source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQ41.m@ 1713

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1XQ41 ;SEA/JLI - Diagram menus (continued) ;08/27/97 14:47
2 ;;8.0;KERNEL;**46**;Jul 10, 1995
3L G LL:'$D(^TMP($J,"XQM",XQL,L)) K X1,X2,X3 S Y=1,XQV=^(L) S:$D(^(L,.1)) X1=^(.1) S:$D(^(.2)) X2=^(.2) S:$D(^(.3)) X3=^(.3) I $D(^(1)) S XQV(L)=^(1)
4 E S:$P(XQV,U,5)'="M" XQT=L
5 S XQP=$P(XQV,U,1),XQP(L)=$E("-----",1,5-$L(XQP))_XQP_" ",X=$P(XQV,U,3)_" ["_$P(XQV,U,2)_"]" D T I $P(XQV,U,4)]"" S X="**UNAVAILABLE**" D T
6 G:XQ4<0 LL I $P(XQV,U,7)]"" S X="**LOCKED: "_$P(XQV,U,7)_"**" D T
7 I $P(XQV,U,17)]"" S X="**R-LOCK: "_$P(XQV,U,17)_"**" D T
8 S XQN=$O(^DIC(19,"B",$P(XQV,U,2),0)),XQX=""
9 I $D(^DIC(19,XQN,3.91)) S %XQI=0 F S %XQI=$O(^DIC(19,XQN,3.91,%XQI)) Q:%XQI'>0 S XQX=XQX_$P(^(%XQI,0),U,1)_$P(^(0),U,2)_" "
10 I XQX="" S XQX=$P(XQV,U,10) I XQX'="" S XQX=XQX_"MO-FR"
11 I XQX]"" S X="**PROHIBITED TIMES: "_XQX_"**" D T
12 K XQX,%XQI
13 I XQ4>0&$D(X3) S X="**HEADER: " D T S X=X3 D T
14 I XQ4>0&$D(X1) S X="**ENTRY ACTION: " D T S X=X1 D T
15 I XQ4>0&$D(X2) S X="**EXIT ACTION: " D T S X=X2 D T
16LL S Y=0,L=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QI=26:.3,XQI=15:.2,1:.1))=^(XQI)
35 I $P(Z,U,4)'="M"!$D(^TMP($J,"XQ1",+Y))!$S(XQV]""&$D(XQDUZ):'$D(^XUSEC(XQV,XQDUZ)),1:0)!($P(Z,U,3)]"") S XQL=XQL+1 G X
36 S ^TMP($J,"XQ1",+Y)="",XQV(L)=XQL,L=L+1,X(L)="",(Y,XQDIC,XQDIC(L))=+Y S:M<L M=L
37 I $S('$D(^XUTL("XQO",XQDIC,0)):1,'$D(^DIC(19,XQDIC,99)):1,1:^DIC(19,XQDIC,99)'=$P(^XUTL("XQO",XQDIC,0),U,2)) S XQSAV=Y D ^XQSET S Y=XQSAV K XQSAV
38 K XQA S XQJ=-1 F S XQJ=$O(^XUTL("XQO",Y,U,XQJ)) Q:XQJ="" S XQA($P(^(XQJ),U,2))=XQJ
39 K XQB(L) S XQBN(L)=1,XQJ=+^XUTL("XQO",Y,0),XQBN1=0
40 F XQI=1:1:XQJ S XQN=^XUTL("XQO",Y,0,XQI) F XQP=0:1 S XQB=$P(XQN,U,8*XQP+2) Q:'$L($P(XQN,U,8*XQP+2,99)) I XQB'="",($D(XQA(XQB))) S XQBN1=XQBN1+1,XQB(L,XQBN1)=XQA(XQB)_";"_$P(XQN,U,8*XQP+1) K XQA(XQB)
41 K XQBN1
42 D X
43 Q:L=1 S L=L-1,XQDIC=XQDIC(L) G X
44 ;
45WAIT ;
46 I 1 S XQFLAG="" R:IOST["C-" !?26,"Press RETURN to continue, '^' to halt...",XQFLAG:DTIME S:'$T XQFLAG=U W @IOF
47Q Q
48 ;
Note: See TracBrowser for help on using the repository browser.