source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED09.m@ 1270

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

initial load of WorldVistAEHR

File size: 3.8 KB
Line 
1OCXOED09 ;SLC/RJS,CLA - Rule Editor (Element Expression Display) ;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 Q
9EN(OCXD0,OCXD1,OCXR1) ;
10 ;
11 N OCXACT,OCXRD
12 F K OCXRD,OCXACT S (OCXRD,OCXACT)="" D DISP(OCXD0,OCXD1,.OCXRD,.OCXACT) Q:$$EN^OCXOED10(OCXD0,OCXD1,.OCXRD,.OCXACT)
13 ;
14 Q
15 ;
16DISP(OCXD0,OCXD1,OCXRD,OCXACT) ;
17 ;
18 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN,OCXOPER
19 ;
20 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)
21 ;
22 D GETDATA(OCXD0,OCXD1,.OCXRD)
23 ;
24 W @IOF,OCXTNLN
25 W !,$$CENTER($$FIELD("Element Expression Edit Screen"),80),!!
26 I $D(OCXRD("ELE",OCXD0,"C",OCXD1,1,"I")) D
27 .W " ",$$OPT^OCXOEDT("DF"_OCXRD("ELE",OCXD0,"C",OCXD1,1,"I"),"EDDF","10",.OCXACT,$G(OCXRD("ELE",OCXD0,"C",OCXD1,1,"I")))
28 W " ",$$FIELD("Data Field:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,1,"E")),60)
29 W !
30 S OCXOPER=$G(OCXRD("ELE",OCXD0,"C",OCXD1,2,"I")) I +OCXOPER S OCXOPER=$P($G(^OCXS(863.9,+OCXOPER,0)),U,4) I $L(OCXOPER) W " ",$$FIELD(" Operator:")," ",$$DATA(OCXOPER,30) I 1
31 E W " ",$$FIELD(" Operator:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,2,"E")),30)
32 I (+$G(OCXRD("ELE",OCXD0,"C",OCXD1,"PARNUM","I"))=2) D
33 .W !
34 .I $L($G(OCXRD("ELE",OCXD0,"C",OCXD1,3,"E"))) D Q
35 ..W " ",$$FIELD(" Value:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,3,"E")),60)
36 .W " ",$$OPT^OCXOEDT("DF"_$G(OCXRD("ELE",OCXD0,"C",OCXD1,4,"I")),"EDDF","10",.OCXACT,$G(OCXRD("ELE",OCXD0,"C",OCXD1,4,"I")))
37 .W " ",$$FIELD(" Data Field:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,4,"E")),60)
38 I (+$G(OCXRD("ELE",OCXD0,"C",OCXD1,"PARNUM","I"))=3) D
39 .W !
40 .W !,$$CENTER("AND",80)
41 .W !
42 .I $L($G(OCXRD("ELE",OCXD0,"C",OCXD1,3.1,"E"))) D Q
43 ..W " ",$$FIELD(" Value:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,3.1,"E")),60)
44 .W " ",$$OPT^OCXOEDT("DF"_OCXRD("ELE",OCXD0,"C",OCXD1,5,"I"),"EDDF","10",.OCXACT,$G(OCXRD("ELE",OCXD0,"C",OCXD1,5,"I")))
45 .W " ",$$FIELD(" Data Field:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,5,"E")),60)
46 W !!," ",$$OPT^OCXOEDT("Edit","EDEXP","10",.OCXACT,OCXD0_","_OCXD1)
47 ;
48 Q
49 ;
50CENTER(X,M) ;
51 N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
52 ;
53SEP(OCXHDR) ;
54 ;
55 N SPACES S SPACES="",$P(SPACES," ",80-$L(OCXHDR))=" " Q OCXTNLN_OCXTHLN_OCXTULN_$G(OCXHDR)_SPACES_OCXTNLN
56 ;
57FIELD(OCXHDR) ;
58 ;
59 Q OCXTHLN_$G(OCXHDR)_OCXTNLN
60 ;
61DATA(OCXVAL,OCXLEN) ;
62 ;
63 N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
64 I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
65 Q $E((OCXVAL_SPACES),1,OCXLEN)
66 ;
67GETDATA(OCXD0,OCXD1,OCXD) ;
68 ;
69 N OCXDIQ,OCXX,OCXDA,OCXOPER,OCXPF,OCXPFN
70 S OCXDIQ="",OCXDA=OCXD0 D DIQ("^OCXS(860.3,",.OCXDA,"IEN",.OCXDIQ)
71 M OCXD("ELE")=OCXDIQ(860.3) K OCXDIQ S OCXDIQ=""
72 S OCXDIQ="",OCXDA=OCXD1,OCXDA(1)=OCXD0 D DIQ("^OCXS(860.3,"_OCXD0_",""COND"",",.OCXDA,"IEN",.OCXDIQ)
73 M OCXD("ELE",OCXD0,"C")=OCXDIQ(860.31) K OCXDIQ S OCXDIQ=""
74 S OCXD("ELE",OCXD0,"C",OCXD1,"PARNUM","I")=$$PARNUM(+$G(OCXD("ELE",OCXD0,"C",OCXD1,2,"I")))
75 Q
76PARNUM(OCXOPER) ;
77 ;
78 N OCXPF,OCXPFN
79 S OCXPF=$O(^OCXS(863.9,+OCXOPER,"PAR","B","OCXO GENERATE CODE FUNCTION",0)) Q:'OCXPF 0
80 S OCXPF=$G(^OCXS(863.9,+OCXOPER,"PAR",+OCXPF,"VAL"))
81 Q:'$L(OCXPF) 0
82 I OCXPF S OCXPFN=OCXPF
83 E S OCXPFN=0 F S OCXPFN=$O(^OCXS(863.7,"B",$E(OCXPF,1,30),OCXPFN)) Q:'OCXPFN Q:($P($G(^OCXS(863.7,+OCXPFN,0)),U,1)=OCXPF)
84 Q:'OCXPFN 0 Q +$O(^OCXS(863.7,+OCXPFN,"PAR",999),-1)
85 ;
86DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
87 ;
88 N DIC,X,Y
89 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
90 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
91 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
92 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
93 S:$L($G(OCXDR)) DIC("DR")=OCXDR
94 D ^DIC Q:(Y<1) 0 Q Y
95 ;
96DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
97 N DR,DIQ S DR=".01:99999",DIQ="OCXARY(",DIQ(0)=$G(OCXDIQ0) D EN^DIQ1
98 Q
99 ;
Note: See TracBrowser for help on using the repository browser.