source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/OCXOED10.m@ 1141

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1OCXOED10 ;SLC/RJS,CLA - Rule Editor (Element Expression Options) ;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,OCXR1,OCXRD,OCXACT) ;
10 ;
11 ;
12 N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
13 ;
14 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)
15 ;
16 S OCXOPT=$$GETOPT^OCXOEDT(.OCXACT) Q:(OCXOPT=U) 1 X:$L(OCXOPT) OCXOPT
17 ;
18 Q 0
19 ;
20 ;
21EDEXP(OCXD0,OCXD1) ;
22 N X,DA S DA=OCXD1,DA(1)=OCXD0
23 S X=$$DIE("^OCXS(860.3,"_OCXD0_",""COND"",",.DA,"1PRIMARY DATA FIELD~")
24 Q:'$D(^OCXS(860.3,OCXD0,"COND",OCXD1))
25 S X=$$DIE("^OCXS(860.3,"_OCXD0_",""COND"",",.DA,"2")
26 S OCXP=$$PARNUM(+$G(^OCXS(860.3,OCXD0,"COND",OCXD1,"OPER")))
27 Q:(OCXP=1)
28 I (OCXP=2) D
29 .N OCXP
30 .S X=$$DIE("^OCXS(860.3,"_OCXD0_",""COND"",",.DA,"3COMPARE VALUE~;S:$L(X) Y=""@1"";4COMPARE DATA FIELD~;@1")
31 I (OCXP=3) D
32 .N OCXP
33 .S X=$$DIE("^OCXS(860.3,"_OCXD0_",""COND"",",.DA,"3COMPARE VALUE 1~;S:$L(X) Y=""@1"";4COMPARE DATA FIELD 1~;@1")
34 .W !!,"AND",!!
35 .S X=$$DIE("^OCXS(860.3,"_OCXD0_",""COND"",",.DA,"3.1COMPARE VALUE 2~;S:$L(X) Y=""@1"";5COMPARE DATA FIELD 2~;@1")
36 Q
37 ;
38EDDF(OCXD0) ;
39 D EN^OCXOED11(OCXD0)
40 Q
41 ;
42PARNUM(OCXOPER) ;
43 ;
44 N OCXPF,OCXPFN
45 S OCXPF=$O(^OCXS(863.9,+OCXOPER,"PAR","B","OCXO GENERATE CODE FUNCTION",0)) Q:'OCXPF 0
46 S OCXPF=$G(^OCXS(863.9,+OCXOPER,"PAR",+OCXPF,"VAL"))
47 Q:'$L(OCXPF) 0
48 I OCXPF S OCXPFN=OCXPF
49 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)
50 Q:'OCXPFN 0 Q +$O(^OCXS(863.7,+OCXPFN,"PAR",999),-1)
51 ;
52 ;
53READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
54 N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
55 Q:'$L($G(OCXZ0)) U
56 S DIR(0)=OCXZ0
57 S:$L($G(OCXZA)) DIR("A")=OCXZA
58 S:$L($G(OCXZB)) DIR("B")=OCXZB
59 F OCXLINE=1:1:($G(OCXZL)-1) W !
60 D ^DIR
61 I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
62 Q Y
63 ;
64DIE(DIE,DA,DR) ;
65 ;
66 D RM(IOM) N DUOUT,DTOUT,DIC S DIC=DIE D ^DIE D RM(0) Q:$G(DTOUT) 0 Q:$G(DUOUT) 0 Q 1
67 ;
68RM(X) X ^%ZOSF("RM") Q
69 ;
70DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
71 ;
72 N DIC,X,Y
73 S DIC=$G(OCXDIC) Q:'$L(DIC) -1
74 S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
75 S:$L($G(OCXDICS)) DIC("S")=OCXDICS
76 S:$L($G(OCXDICA)) DIC("A")=OCXDICA
77 S:$L($G(OCXDR)) DIC("DR")=OCXDR
78 D ^DIC Q:(Y<1) 0 Q Y
79 ;
Note: See TracBrowser for help on using the repository browser.