source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED03.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.2 KB
Line 
1OCXOED03 ;SLC/RJS,CLA - Rule Editor (Rule Element Definition 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(OCXR0,OCXR1) ;
10 ;
11 N OCXACT,OCXRD
12 F K OCXRD,OCXACT S (OCXRD,OCXACT)="" D GETDATA(OCXR0,OCXR1,.OCXRD),DISP(OCXR0,OCXR1,.OCXRD,.OCXACT) Q:$$EN^OCXOED04(OCXR0,OCXR1,.OCXRD,.OCXACT)
13 ;
14 Q
15 ;
16DISP(OCXR0,OCXR1,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("Rule Element Edit Screen"),80),!!
24 W " ",$$OPT^OCXOEDT("Edit","EDRELE","04",.OCXACT,"OCXR0,OCXR1")
25 W " ",$$FIELD("Label:")," ",$$DATA($G(OCXRD("ELE",OCXR1,.01,"E")),60)
26 W !," ",$$FIELD("Definition Type:")," ",$$DATA($G(OCXRD("ELE",OCXR1,.02,"E"),"Simple"),30)
27 W !!!
28 I $G(OCXRD("ELE",OCXR1,.02,"I")) W " ",$$FIELD("Expression:")," ",$$DATA($G(OCXRD("ELE",OCXR1,2,"E")),60)
29 I '$G(OCXRD("ELE",OCXR1,.02,"I")) D
30 .N OCXELEN
31 .S OCXELEN=+$G(OCXRD("ELE",OCXR1,1,"I"))
32 .W:OCXELEN " ",$$OPT^OCXOEDT("EL"_OCXELEN,"EDELE","04",.OCXACT,OCXELEN)
33 .W " ",$$FIELD("Element:")," ",$$DATA($G(OCXRD("ELE",OCXR1,1,"E")),60)
34 ;
35 Q
36 ;
37CENTER(X,M) ;
38 N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
39 ;
40 ;
41SEP(OCXHDR) ;
42 ;
43 N SPACES S SPACES="",$P(SPACES," ",80-$L(OCXHDR))=" " 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 ;
55GETDATA(OCXD0,OCXD1,OCXD) ;
56 ;
57 N OCXDIQ,OCXX,DA
58 S OCXDIQ="",DA(1)=OCXD0 D DIQ("^OCXS(860.2,"_OCXD0_",""C"",",OCXD1,"IEN",.OCXDIQ)
59 M OCXD("ELE")=OCXDIQ(860.21) K OCXDIQ S OCXDIQ=""
60 Q
61 ;
62DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
63 ;
64 N DIC,X,Y
65 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
66 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
67 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
68 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
69 S:$L($G(OCXDR)) DIC("DR")=OCXDR
70 D ^DIC Q:(Y<1) 0 Q Y
71 ;
72DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
73 N DR,DIQ S DR=".01:99999",DIQ="OCXARY(",DIQ(0)=$G(OCXDIQ0) D EN^DIQ1
74 Q
75 ;
Note: See TracBrowser for help on using the repository browser.