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/XQOO3.m@ 1595

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

initial load of FOIAVistA 6/30/08 version

File size: 3.5 KB
Line 
1XQOO3 ;Luke/Sea - Out-Of-Order Utilities ;01/14/97 13:57
2 ;;8.0;KERNEL;**57**;Jul 10, 1995
3 ;
4LALL ;List all options and protocols that are Out Of Order
5 N XQ,XQMES,XQTXT,XQIEN
6 S (XQIEN,XQS)=0
7 F Q:XQIEN'=+XQIEN D
8 .S XQIEN=$O(^DIC(19,XQIEN))
9 .Q:XQIEN'=+XQIEN
10 .I $D(^DIC(19,XQIEN,0)),$P(^(0),U,3)]"" D
11 ..S XQMES=$P(^DIC(19,XQIEN,0),U,3),XQNM=$P(^(0),U),XQMT=$P(^(0),U,2)
12 ..S ^TMP($J,"XQOO",XQMES,XQNM)=XQMT
13 ..S:'$D(XQ(XQMES)) XQ(XQMES)=0,XQS=XQS+1 S XQ(XQMES)=XQ(XQMES)+1
14 ..Q
15 .Q
16 ;
17 I XQS=0 W !,"No options marked ""Out-Of-Order"" were found." Q
18 I XQS=1 D
19 .S XQMES="",XQMES=$O(XQ(XQMES))
20 .W !,"There is one set of options marked ""Out-Of-Order"" with the message:",!!?5,XQMES
21 .S XQN(1)=XQMES,XQUR=1
22 .Q
23 I XQS>1 W !,"There are "_XQS_" sets of options Out-Of-Order with the messages:" S %="" F XQI=1:1:XQS D
24 .S %=$O(XQ(%)) W !!?1,XQI_".",?4,%," ("_XQ(%)_" option"_$S(XQ(%)=1:":",1:"s)")
25 .I XQ(%)=1 S X=$O(^TMP($J,"XQOO",%,"")) W " ",X,", ",^(X),")"
26 .S XQN(XQI)=%
27 .Q
28 ;
29ASK3 ;See a particular set in detail
30 S DIR(0)="Y",DIR("A")="Would you like to see more detail?"
31 S DIR("B")="NO",DIR("?")="If you enter YES you can see the options/protocols of a set."
32 W ! D ^DIR G:Y=0!($D(DIRUT)) OUT
33 I XQS>1 W !!,"To see the options of a particular set enter a number between 1 and "_XQS_": " R XQUR:DTIME
34 I XQUR=U!(XQUR="") G OUT
35 I XQUR["?"!(XQUR'=+XQUR)!(XQUR>XQS)!(XQUR<1) W !?5,"Enter a number between 1 and "_XQS,!?5,"or ""^"" to quit without seeing a detailed option set." G ASK3
36 I XQUR=U!(XQUR="") G OUT
37 S XQMES=XQN(XQUR)
38 D HEAD(XQMES)
39 S %=0 F XQI=1:1 S %=$O(^TMP($J,"XQOO",XQMES,%)) Q:%="" W !,XQI_".",?5,%," ",^(%)
40 G OUT
41 Q
42 ;
43HEAD(XQMES) ;Print page header
44 W @IOF
45 W !,"Out-Of-Order with the message """_XQMES_"""",!!
46 Q
47 ;
48OUT ;Clean up and quit
49 K X,XQI,XQMT,XQN,XQNM,XQS,XQUR
50 K ^TMP($J,"XQOO")
51 W !
52 Q
53 ;
54LAPR ;List all the protocols that are OOO
55 N XQ,XQMES,XQTXT,XQIEN
56 S (XQIEN,XQS)=0
57 F Q:XQIEN'=+XQIEN D
58 .S XQIEN=$O(^ORD(101,XQIEN))
59 .Q:XQIEN'=+XQIEN
60 .I $D(^ORD(101,XQIEN,0)),$P(^(0),U,3)]"" D
61 ..S XQMES=$P(^ORD(101,XQIEN,0),U,3),XQNM=$P(^(0),U),XQMT=$P(^(0),U,2)
62 ..S ^TMP($J,"XQOO",XQMES,XQNM)=XQMT
63 ..S:'$D(XQ(XQMES)) XQ(XQMES)=0,XQS=XQS+1 S XQ(XQMES)=XQ(XQMES)+1
64 ..Q
65 .Q
66 ;
67 I XQS=0 W !,"No protocols marked ""Out-Of-Order"" were found." Q
68 I XQS=1 D
69 .S XQMES="",XQMES=$O(XQ(XQMES))
70 .W !,"There is one set of protocols marked ""Out-Of-Order"" with the message:",!!?5,XQMES
71 .S XQN(1)=XQMES
72 .Q
73 I XQS>1 W !,"There are "_XQS_" sets of protocols Out-Of-Order with the messages:" S %="" F XQI=1:1:XQS D
74 .S %=$O(XQ(%)) W !!?1,XQI_".",?4,%," ("_XQ(%)_" protocol"_$S(XQ(%)=1:":",1:"s)")
75 .I XQ(%)=1 S X=$O(^TMP($J,"XQOO",%,"")) W " ",X,", ",^(X),")"
76 .S XQN(XQI)=%
77 .Q
78 ;
79ASK4 ;See a particular set in detail
80 I XQS>1 D I XQUR=U G OUT
81 .W !!,"To see the protocols of a particular set enter a number between 1 and "_XQS_": " R XQUR:DTIME
82 .I XQUR=U!(XQUR="") S XQUR=U Q
83 .I XQUR["?"!(XQUR'=+XQUR)!(XQUR>XQS)!(XQUR<1) D
84 ..W !?5,"Enter a number between 1 and "_XQS,!?5,"or ""^"" to quit without seeing a detailed set." R XQUR:DTIME
85 ..I XQUR=U!(XQUR="") S XQUR=U Q
86 ..I XQUR'=+XQUR!(XQUR>XQS)!(XQUR<1) S XQUR=U
87 ..Q
88 .Q
89 ;
90 I XQS=1 D I XQUR=U G OUT
91 .S DIR(0)="Y",DIR("A")="Do you want to see it in detail? ",DIR("B")="Y" D ^DIR K DIR
92 .S XQUR=$S(Y=1:1,1:U)
93 .Q
94 ;
95 S XQPAGE=$S($D(IOSL):IOSL,1:20),XQLINE=2
96 S XQMES=XQN(XQUR)
97 D HEAD(XQMES)
98 S %=0 F XQI=1:1 S %=$O(^TMP($J,"XQOO",XQMES,%)) Q:%="" W !,XQI_".",?5,%," ",^(%),XQLINE," ",XQPAGE S XQLINE=XQLINE+1 I XQLINE=XQPAGE D PAUSE^XQOO2 S XQLINE=0 Q:$D(XQUPAR)
99 G OUT
100 Q
Note: See TracBrowser for help on using the repository browser.