1 | OCXOED02 ;SLC/RJS,CLA - Rule Editor (Rule 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 | ;
|
---|
6 | ;
|
---|
7 | ;
|
---|
8 | Q
|
---|
9 | EN(OCXR0,OCXRD,OCXACT) ;
|
---|
10 | ;
|
---|
11 | ;
|
---|
12 | N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
|
---|
13 | ;
|
---|
14 | ;
|
---|
15 | S OCXOPT=$$GETOPT^OCXOEDT(.OCXACT) Q:(OCXOPT=U) 1 X:$L(OCXOPT) OCXOPT
|
---|
16 | ;
|
---|
17 | Q:'$D(^OCXS(860.2,OCXR0)) 1
|
---|
18 | ;
|
---|
19 | Q 0
|
---|
20 | ;
|
---|
21 | ;
|
---|
22 | EDRULE(OCXR0) ;
|
---|
23 | N X S X=$$DIE("^OCXS(860.2,",OCXR0,".01;.02")
|
---|
24 | Q
|
---|
25 | ;
|
---|
26 | EDRELE(OCXR0,OCXR1) ;
|
---|
27 | D EN^OCXOED03(OCXR0,OCXR1)
|
---|
28 | Q
|
---|
29 | ;
|
---|
30 | EDRREL(OCXR0,OCXR1) ;
|
---|
31 | D EN^OCXOED05(OCXR0,OCXR1)
|
---|
32 | Q
|
---|
33 | ;
|
---|
34 | EOPT(OCXMODE,OCXR0) ;
|
---|
35 | ;
|
---|
36 | I OCXMODE="ADD" D Q
|
---|
37 | .S:'$D(^OCXS(860.2,OCXR0,"C",0)) ^OCXS(860.2,OCXR0,"C",0)="^860.21I^^"
|
---|
38 | .N OCXD1,OCXDA S OCXDA(1)=OCXR0,OCXD1=+$$DIC("^OCXS(860.2,"_OCXR0_",""C"",","AEMQLN","Select Element Label: ","","","",.OCXDA) Q:(OCXD1<0)
|
---|
39 | .D EDRELE(OCXR0,OCXD1)
|
---|
40 | I OCXMODE="DEL" D Q
|
---|
41 | .S:'$D(^OCXS(860.2,OCXR0,"C",0)) ^OCXS(860.2,OCXR0,"C",0)="^860.21I^^"
|
---|
42 | .N OCXD1,DA S DA(1)=OCXR0,OCXD1=+$$DIC("^OCXS(860.2,"_OCXR0_",""C"",","AEMQN","Select Element Label: ") Q:(OCXD1<0)
|
---|
43 | .Q:'$$READ("Y","Are you sure you want to Delete ?","YES")
|
---|
44 | .Q:'$$DIE("^OCXS(860.2,"_(+OCXR0)_",""C"",",OCXD1,"S DA(1)="_(+OCXR0)_";.01///@")
|
---|
45 | .W !!,"Deleted..." H 1
|
---|
46 | Q
|
---|
47 | ;
|
---|
48 | ROPT(OCXMODE,OCXR0) ;
|
---|
49 | ;
|
---|
50 | I OCXMODE="ADD" D Q
|
---|
51 | .S:'$D(^OCXS(860.2,OCXR0,"R",0)) ^OCXS(860.2,OCXR0,"R",0)="^860.22I^^"
|
---|
52 | .N OCXD1 S OCXD1=$O(^OCXS(860.2,OCXR0,"R","@"),-1)+1
|
---|
53 | .S ^OCXS(860.2,OCXR0,"R",OCXD1,0)=OCXD1,^OCXS(860.2,OCXR0,"R","B",OCXD1,OCXD1)=""
|
---|
54 | .D EDRREL(OCXR0,OCXD1)
|
---|
55 | I OCXMODE="DEL" D Q
|
---|
56 | .S:'$D(^OCXS(860.2,OCXR0,"R",0)) ^OCXS(860.2,OCXR0,"R",0)="^860.22I^^"
|
---|
57 | .N OCXD1,DA S DA(1)=OCXR0,OCXD1=+$$DIC("^OCXS(860.2,"_OCXR0_",""R"",","AEMQN","Select Relation Expression Index Number: ") Q:(OCXD1<0)
|
---|
58 | .Q:'$$READ("Y","Are you sure you want to Delete ?","YES")
|
---|
59 | .Q:'$$DIE("^OCXS(860.2,"_(+OCXR0)_",""R"",",OCXD1,"S DA(1)="_(+OCXR0)_";.01///@")
|
---|
60 | .W !!,"Deleted..." H 1
|
---|
61 | Q
|
---|
62 | ;
|
---|
63 | ;
|
---|
64 | READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
|
---|
65 | N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
|
---|
66 | Q:'$L($G(OCXZ0)) U
|
---|
67 | S DIR(0)=OCXZ0
|
---|
68 | S:$L($G(OCXZA)) DIR("A")=OCXZA
|
---|
69 | S:$L($G(OCXZB)) DIR("B")=OCXZB
|
---|
70 | F OCXLINE=1:1:($G(OCXZL)-1) W !
|
---|
71 | D ^DIR
|
---|
72 | I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
|
---|
73 | Q Y
|
---|
74 | ;
|
---|
75 | DIE(DIE,DA,DR) ;
|
---|
76 | ;
|
---|
77 | 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
|
---|
78 | ;
|
---|
79 | RM(X) X ^%ZOSF("RM") Q
|
---|
80 | ;
|
---|
81 | DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
|
---|
82 | ;
|
---|
83 | N DIC,X,Y
|
---|
84 | S DIC=$G(OCXDIC) Q:'$L(DIC) -1
|
---|
85 | S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
|
---|
86 | S:$L($G(OCXDICS)) DIC("S")=OCXDICS
|
---|
87 | S:$L($G(OCXDICA)) DIC("A")=OCXDICA
|
---|
88 | S:$L($G(OCXDR)) DIC("DR")=OCXDR
|
---|
89 | D ^DIC Q:(Y<1) 0 Q Y
|
---|
90 | ;
|
---|