source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED16.m@ 1169

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1OCXOED16 ;SLC/RJS,CLA - Rule Editor (Expert System Editor Options) ;6/19/01 16:35
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
3 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
4 ;
5 ;
6S ;
7 ;
8 Q
9EN(OCXACT) ;
10 ;
11 ;
12 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
13 ;
14 S OCXOPT=$$GETOPT^OCXOEDT(.OCXACT) Q:(OCXOPT=U) 1 X:$L(OCXOPT) OCXOPT
15 ;
16 Q 0
17 ;
18EDRULE ;
19 ;
20 N OCXY F W !! S OCXY=+$$DIC("^OCXS(860.2,","AEMQNL","Select Rule: ") Q:'OCXY D EN^OCXOED01(OCXY)
21 ;
22 Q
23 ;
24EDELEM ;
25 ;
26 N OCXY F W !! S OCXY=+$$DIC("^OCXS(860.3,","AEMQNL","Select Element: ") Q:'OCXY D EN^OCXOED07(OCXY)
27 ;
28 Q
29 ;
30EDDF ;
31 ;
32 N OCXY F W !! S OCXY=+$$DIC("^OCXS(860.4,","AEMQNL","Select Data Field: ") Q:'OCXY D EN^OCXOED11(OCXY)
33 ;
34 Q
35 ;
36EDMDD ;
37 ;
38 N OCXY F W !! S OCXY=$$DIC("^OCXS(863.3,","AEMQNL","Select Link: ") Q:'OCXY D EN^OCXOED13($P(OCXY,U,2))
39 ;
40 Q
41 ;
42COMP D ^OCXOCMP Q
43 ;
44SCANDF D SELECT^OCXOSCR1 Q
45 ;
46SCANEL D SELECT^OCXOSCR2 Q
47 ;
48EDPARAM(OCXD0,PARNAM) ;
49 ;
50 N NEWVAL
51 W !!
52 W " ",$$FIELD("Link Parameter -> "_PARNAM_": ")
53 W:$L($$GLPVAL(OCXD0,PARNAM)) $$GLPVAL(OCXD0,PARNAM)_" // "
54 R NEWVAL:30 E Q
55 I (NEWVAL="@") W ! Q:'$$READ("Y","Are you sure you want to delete this value ?","YES")
56 D SLPVAL(OCXD0,PARNAM,NEWVAL)
57 Q
58 ;
59GLPVAL(OCXD0,PNAME) ;
60 N X S X="" F S X=$O(OCXRD("LINK",OCXD0,"PAR",X)) Q:'X I ($G(OCXRD("LINK",OCXD0,"PAR",X,.01,"E"))=PNAME) Q
61 Q:'X "" Q $G(OCXRD("LINK",OCXD0,"PAR",X,1,"E"))
62 ;
63SLPVAL(OCXD0,PNAME,PVAL) ;
64 N DA,OCXY,OCXZ
65 S DA(1)=OCXD0,OCXY=+$$DIC("^OCXS(863.3,"_OCXD0_",""PAR"",","ML","",PNAME,"","",.DA) Q:(OCXY<1)
66 S DA(1)=OCXD0,DA=+OCXY,OCXZ=$$DIE("^OCXS(863.3,"_OCXD0_",""PAR"",",.DA,1,PVAL)
67 Q
68 ;
69FIELD(OCXHDR) ;
70 ;
71 Q OCXTHLN_$G(OCXHDR)_OCXTNLN
72 ;
73DATA(OCXVAL,OCXLEN) ;
74 ;
75 N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
76 I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
77 Q $E((OCXVAL_SPACES),1,OCXLEN)
78 ;
79READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
80 N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
81 Q:'$L($G(OCXZ0)) U
82 S DIR(0)=OCXZ0
83 S:$L($G(OCXZA)) DIR("A")=OCXZA
84 S:$L($G(OCXZB)) DIR("B")=OCXZB
85 F OCXLINE=1:1:($G(OCXZL)-1) W !
86 D ^DIR
87 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
88 Q Y
89 ;
90DIE(DIE,DA,OCXFLD,OCXVAL) ;
91 ;
92 N DUOUT,DTOUT,DIC
93 S DR=OCXFLD_"///^S X=OCXVAL"
94 S DIC=DIE D RM(IOM) D ^DIE D RM(0) Q:$G(DTOUT) 0 Q:$G(DUOUT) 0 Q 1
95 ;
96RM(X) X ^%ZOSF("RM") Q
97 ;
98DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
99 ;
100 N DIC,X,Y
101 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
102 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
103 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
104 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
105 S:$L($G(OCXDR)) DIC("DR")=OCXDR
106 D ^DIC Q:(Y<1) 0 Q Y
107 ;
Note: See TracBrowser for help on using the repository browser.