source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXODSP.m@ 767

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1OCXODSP ;SLC/RJS,CLA - Rule Display (Expert System Display Main Screen) ;10/29/98 12:37
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 ;
6S ;
7 ;
8 ;
9EN ;
10 ;
11 N OCXACT,OCXOPT,IOP,OCXOFF
12 ;
13 I '$D(IOM) S IOP="HOME" D ^%ZIS K IOP
14 S OCXOFF=5
15 ;
16 F K OCXACT S OCXACT="" D DISP(.OCXACT) S OCXOPT=$$GETOPT(.OCXACT) Q:(OCXOPT=U) X:$L(OCXOPT) OCXOPT
17 ;
18 Q
19 ;
20DISP(OCXACT) ;
21 ;
22 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
23 S OCXTNLN=$C(27,91,48,109),OCXTRLN=$C(27,91,55,109),OCXTULN=$C(27,91,52,109),OCXTHLN=$C(27,91,49,109)
24 ;
25 W @IOF,OCXTNLN
26 W !,$$CENTER($$FIELD("Expert System Display"),80),!
27 I $L($T(VERSION^OCXOCMP)) W !,$$CENTER($$FIELD($$VERSION^OCXOCMP),80),!
28 W !
29 W !," ",$$OPT("Rule","RULE",.OCXACT)," ",$$FIELD("Display a Rule")
30 W !
31 W !," ",$$OPT("Element","ELEM",.OCXACT)," ",$$FIELD("Display an Element")
32 W !
33 W !," ",$$OPT("Field","DFLD",.OCXACT)," ",$$FIELD("Display a Data Field")
34 W !!
35 ;
36 Q
37 ;
38CENTER(X,M) ;
39 N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
40 ;
41SEP(OCXHDR) ;
42 ;
43 N SPACES S SPACES="",$P(SPACES," ",200)=" " Q OCXTNLN_OCXTHLN_OCXTULN_$G(OCXHDR)_SPACES_OCXTNLN
44 ;
45FIELD(OCXHDR) ;
46 ;
47 Q OCXTHLN_$G(OCXHDR)_OCXTNLN
48 ;
49DATA(OCXVAL,OCXLEN) ;
50 ;
51 N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
52 I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
53 Q $E((OCXVAL_SPACES),1,OCXLEN)
54 ;
55 ;
56DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
57 ;
58 N DIC,X,Y
59 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
60 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
61 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
62 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
63 S:$L($G(OCXDR)) DIC("DR")=OCXDR
64 D ^DIC Q:(Y<1) 0 Q Y
65 ;
66GETOPT(OCXACT) ;
67 ;
68 N OCXOPT,OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN
69 ;
70 S OCXTNLN=$C(27,91,48,109),OCXTRLN=$C(27,91,55,109),OCXTULN=$C(27,91,52,109),OCXTHLN=$C(27,91,49,109)
71 ;
72 W !!,OCXTHLN,"Option List -> "
73 ;
74 S OCXOPT="" F S OCXOPT=$O(OCXACT("B",OCXOPT)) Q:'$L(OCXOPT) D
75 .W:($X>70) !," " W OCXOPT W:$L($O(OCXACT("B",OCXOPT))) ", "
76 ;
77 W !!,OCXTNLN,"Choose an Option: " R OCXOPT:DTIME E Q U
78 Q:'$L(OCXOPT) U
79 Q:(OCXOPT[U) U
80 ;
81 S OCXOPT=$TR(OCXOPT,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
82 ;
83 Q:$D(OCXACT(OCXOPT)) OCXACT(OCXOPT)
84 ;
85 I '($E($O(OCXACT(OCXOPT)),1,$L(OCXOPT))=OCXOPT) W !!,"Selection not in list... " H 2 Q ""
86 I ($E($O(OCXACT($O(OCXACT(OCXOPT)))),1,$L(OCXOPT))=OCXOPT) W !!,"Selection is ambiguous and matches more than one option... " H 2 Q ""
87 ;
88 Q OCXACT($O(OCXACT(OCXOPT)))
89 ;
90OPT(OCXSUB,OCXLN,OCXACT) ;
91 ;
92 N OCXSUBC
93 S OCXSUBC=$TR(OCXSUB,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
94 Q:$D(OCXACT(OCXSUB)) ""
95 S OCXACT("B",OCXSUB)=""
96 S OCXACT(OCXSUBC)="D "_OCXLN
97 Q OCXTHLN_OCXTRLN_" "_OCXSUB_" "_OCXTNLN
98 ;
99RULE ;
100 S OCXD0=+$$DIC("^OCXS(860.2,","AEMQ") Q:'OCXD0
101 K IOP D ^%ZIS Q:POP
102 U IO W ! D EN^OCXODSP1(OCXD0,0,IOM-10) D PAUSE,^%ZISC
103 Q
104ELEM ;
105 S OCXD0=+$$DIC("^OCXS(860.3,","AEMQ") Q:'OCXD0
106 K IOP D ^%ZIS Q:POP
107 U IO W ! D EN^OCXODSP2(OCXD0,0,IOM-10) D PAUSE,^%ZISC
108 Q
109DFLD ;
110 S OCXD0=+$$DIC("^OCXS(860.4,","AEMQ") Q:'OCXD0
111 K IOP D ^%ZIS Q:POP
112 U IO W ! D MULT^OCXODSP3(OCXD0,0,IOM-10) D PAUSE,^%ZISC
113 Q
114 ;
115 ;
116PAUSE I ($E($G(IOST),1)="C") N OCXX W !!," Press <enter> to continue... " R OCXX:DTIME
117 W @IOF Q
118 ;
Note: See TracBrowser for help on using the repository browser.