source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED07.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1OCXOED07 ;SLC/RJS,CLA - Rule Editor (Element 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) ;
10 ;
11 N OCXACT,OCXRD
12 F K OCXRD,OCXACT S (OCXRD,OCXACT)="" D GETDATA(OCXD0,.OCXRD),DISP(OCXD0,.OCXRD,.OCXACT) Q:$$EN^OCXOED08(OCXD0,.OCXRD,.OCXACT)
13 ;
14 Q
15 ;
16DISP(OCXD0,OCXRD,OCXACT) ;
17 ;
18 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
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 W @IOF,OCXTNLN
23 W !,$$CENTER($$FIELD("Element Edit Screen"),80),!!
24 W " ",$$OPT^OCXOEDT("Edit","EDELE","08",.OCXACT,OCXD0)
25 W " ",$$FIELD("Element:")," ",$$DATA($G(OCXRD("ELE",OCXD0,.01,"E")),50)
26 W !!,?10,$$FIELD("Context:")," ",$$DATA($G(OCXRD("ELE",OCXD0,.02,"E")),50)
27 ;
28 W !!,$$SEP("Element Expressions"),!
29 S OCXD1=0 F S OCXD1=$O(OCXRD("ELE",OCXD0,"C",OCXD1)) Q:'OCXD1 D
30 .W !
31 .W " ",$$OPT^OCXOEDT("EXP"_OCXD1,"EDEXP","08",.OCXACT,OCXD0_","_OCXD1)
32 .W " ",$$FIELD("Data Field:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,1,"E")),50)
33 W !
34 W !," ",$$OPT^OCXOEDT("Add Expression","EOPT","08",.OCXACT,"""ADD"","_OCXD0,"AE")
35 W " ",$$OPT^OCXOEDT("Delete Expression","EOPT","08",.OCXACT,"""DEL"","_OCXD0,"DE")
36 ;
37 Q
38 ;
39CENTER(X,M) ;
40 N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
41 ;
42SEP(OCXHDR) ;
43 ;
44 N SPACES S SPACES="",$P(SPACES," ",80-$L(OCXHDR))=" " Q OCXTNLN_OCXTHLN_OCXTULN_$G(OCXHDR)_SPACES_OCXTNLN
45 ;
46FIELD(OCXHDR) ;
47 ;
48 Q OCXTHLN_$G(OCXHDR)_OCXTNLN
49 ;
50DATA(OCXVAL,OCXLEN) ;
51 ;
52 N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
53 I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
54 Q $E((OCXVAL_SPACES),1,OCXLEN)
55 ;
56GETDATA(OCXD0,OCXD) ;
57 ;
58 N OCXDIQ,OCXX
59 S OCXDIQ="" D DIQ("^OCXS(860.3,",OCXD0,"IEN",.OCXDIQ)
60 M OCXD("ELE")=OCXDIQ(860.3) K OCXDIQ S OCXDIQ=""
61 S OCXX=0 F S OCXX=$O(^OCXS(860.3,OCXD0,"COND",OCXX)) Q:'OCXX W "." D GETMULT(OCXD0,OCXX,"COND","C",860.31,.OCXD)
62 Q
63 ;
64GETMULT(OCXD0,OCXD1,OCXSUB,OCXSLOT,OCXSUBD,OCXD) ;
65 ;
66 N OCXDIQ
67 S OCXDIQ="" D DIQ("^OCXS(860.3,"_OCXD0_","""_OCXSUB_""",",OCXD1,"IEN",.OCXDIQ)
68 M OCXD("ELE",OCXD0,OCXSLOT)=OCXDIQ(OCXSUBD) K OCXDIQ S OCXDIQ=""
69 Q
70 ;
71DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
72 ;
73 N DIC,X,Y
74 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
75 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
76 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
77 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
78 S:$L($G(OCXDR)) DIC("DR")=OCXDR
79 D ^DIC Q:(Y<1) 0 Q Y
80 ;
81DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
82 N DR,DIQ S DR=".01:99999",DIQ="OCXARY(",DIQ(0)=$G(OCXDIQ0) D EN^DIQ1
83 Q
84 ;
Note: See TracBrowser for help on using the repository browser.