source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOEDT.m@ 1015

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1OCXOEDT ;SLC/RJS,CLA - Rule Editor (Main Routine) ;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 N OCXY,OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN
9 ;
10 ;
11 I '$D(IOF) S IOP="HOME" D ^%ZIS K IOP
12 D RM(0),EN^OCXOED15
13 ;
14 Q
15 ;
16DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
17 ;
18 N DIC,X,Y
19 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
20 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
21 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
22 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
23 S:$L($G(OCXDR)) DIC("DR")=OCXDR
24 D ^DIC Q:(Y<1) 0 Q Y
25 ;
26CONV ;
27 ;
28 S OCXR0=0 F S OCXR0=$O(^OCXS(860.2,OCXR0)) Q:'OCXR0 D
29 .W !,$P(^OCXS(860.2,OCXR0,0),U,1)
30 .S OCXVAL=$G(^OCXS(860.2,OCXR0,"C",0))
31 .I $L(OCXVAL),(OCXVAL["P") W !,?5,OCXVAL S OCXVAL=$P(OCXVAL,"P",1)_$P(OCXVAL,"P",2) W " ",OCXVAL S ^OCXS(860.2,OCXR0,"C",0)=OCXVAL
32 .S OCXVAL=$G(^OCXS(860.2,OCXR0,"R",0))
33 .I $L(OCXVAL),(OCXVAL["P") W !,?5,OCXVAL S OCXVAL=$P(OCXVAL,"P",1)_$P(OCXVAL,"P",2) W " ",OCXVAL S ^OCXS(860.2,OCXR0,"R",0)=OCXVAL
34 .;S OCXD1=0 F S OCXD1=$O(^OCXS(860.2,OCXR0,"C",OCXD1)) Q:'OCXD1 D
35 .;.S OCXVAL=^OCXS(860.2,OCXR0,"C",OCXD1,0)
36 .;.W !,?10,$P(^OCXS(860.3,+$P(OCXVAL,U,2),0),U,1)," ",OCXVAL S $P(OCXVAL,U,3)=0 W " ",OCXVAL
37 .;.S ^OCXS(860.2,OCXR0,"C",OCXD1,0)=OCXVAL
38 ;
39 Q
40 ;
41RM(X) X ^%ZOSF("RM") Q
42 ;
43OPT(OCXSUB,OCXLN,OCXRTN,OCXACT,OCXPAR,OCXSYN) ;
44 ;
45 N OCXSUBC
46 Q:$D(OCXACT(OCXSUB)) ""
47 S OCXSUBC=$TR(OCXSUB,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
48 S OCXACT("B",OCXSUB)=""
49 S OCXACT(OCXSUBC)="D "_OCXLN_"^OCXOED"_OCXRTN_$S($L($G(OCXPAR)):"("_$G(OCXPAR)_")",1:"")
50 I $L($G(OCXSYN)) D Q OCXTHLN_OCXTRLN_" "_OCXSYN_" "_OCXSUB_" "_OCXTNLN
51 .S OCXSUBC=$TR(OCXSYN,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
52 .S OCXACT(OCXSUBC)="D "_OCXLN_"^OCXOED"_OCXRTN_$S($L($G(OCXPAR)):"("_$G(OCXPAR)_")",1:"")
53 .S OCXACT("B",OCXSUBC)=""
54 Q OCXTHLN_OCXTRLN_" "_OCXSUB_" "_OCXTNLN
55 ;
56GETOPT(OCXACT) ;
57 ;
58 N OCXOPT,OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN
59 ;
60 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)
61 ;
62 W !!,OCXTHLN,"Option List -> "
63 ;
64 S OCXOPT="" F S OCXOPT=$O(OCXACT("B",OCXOPT)) Q:'$L(OCXOPT) D
65 .W:($X>70) !," " W OCXOPT W:$L($O(OCXACT("B",OCXOPT))) ", "
66 ;
67 W !!,OCXTNLN,"Choose an Option: " R OCXOPT:DTIME E Q U
68 Q:'$L(OCXOPT) U
69 Q:(OCXOPT[U) U
70 ;
71 S OCXOPT=$TR(OCXOPT,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
72 ;
73 Q:$D(OCXACT(OCXOPT)) OCXACT(OCXOPT)
74 ;
75 I '($E($O(OCXACT(OCXOPT)),1,$L(OCXOPT))=OCXOPT) W !!,"Selection not in list... " H 2 Q ""
76 I ($E($O(OCXACT($O(OCXACT(OCXOPT)))),1,$L(OCXOPT))=OCXOPT) W !!,"Selection is ambiguous and matches more than one option... " H 2 Q ""
77 ;
78 Q OCXACT($O(OCXACT(OCXOPT)))
79 ;
Note: See TracBrowser for help on using the repository browser.