OCXOED08 ;SLC/RJS,CLA - Rule Editor (Element Options) ;10/29/98 12:37
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
;
S ;
;
Q
EN(OCXD0,OCXRD,OCXACT) ;
;
;
N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
;
S OCXOPT=$$GETOPT^OCXOEDT(.OCXACT) Q:(OCXOPT=U) 1 X:$L(OCXOPT) OCXOPT
;
Q:'$D(^OCXS(860.3,OCXD0)) 1
;
Q 0
;
;
EDELE(OCXD0) ;
N X S X=$$DIE("^OCXS(860.3,",OCXD0,".01;.02")
Q:'$D(^OCXS(860.3,OCXD0))
Q
;
EDEXP(OCXD0,OCXD1) ;
D EN^OCXOED09(OCXD0,OCXD1)
Q
;
EOPT(OCXMODE,OCXD0) ;
;
I OCXMODE="ADD" D Q
.S:'$D(^OCXS(860.3,OCXD0,"COND",0)) ^OCXS(860.3,OCXD0,"COND",0)="^860.31^^"
.N OCXD1 S OCXD1=$O(^OCXS(860.3,OCXD0,"COND","@"),-1)+1
.S ^OCXS(860.3,OCXD0,"COND",OCXD1,0)=OCXD1,^OCXS(860.3,OCXD0,"COND","B",OCXD1,OCXD1)=""
.D EDEXP(OCXD0,OCXD1)
I OCXMODE="DEL" D Q
.S:'$D(^OCXS(860.3,OCXD0,"COND",0)) ^OCXS(860.3,OCXD0,"COND",0)="^860.31^^"
.N OCXD1,DA S DA(1)=OCXD0,OCXD1=+$$DIC("^OCXS(860.3,"_OCXD0_",""COND"",","AEMQN","Select Expression Index Number: ") Q:(OCXD1<0)
.Q:'$$READ("Y","Are you sure you want to Delete ?","YES")
.Q:'$$DIE("^OCXS(860.3,"_(+OCXD0)_",""COND"",",OCXD1,"S DA(1)="_(+OCXD0)_";.01///@")
.W !!,"Deleted..." H 1
Q
;
COMP ;
D ^OCXOCMP
Q
;
;
READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
Q:'$L($G(OCXZ0)) U
S DIR(0)=OCXZ0
S:$L($G(OCXZA)) DIR("A")=OCXZA
S:$L($G(OCXZB)) DIR("B")=OCXZB
F OCXLINE=1:1:($G(OCXZL)-1) W !
D ^DIR
I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
Q Y
;
DIE(DIE,DA,DR) ;
;
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
;
RM(X) X ^%ZOSF("RM") Q
;
DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
;
N DIC,X,Y
S DIC=$G(OCXDIC) Q:'$L(DIC) -1
S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
S:$L($G(OCXDICS)) DIC("S")=OCXDICS
S:$L($G(OCXDICA)) DIC("A")=OCXDICA
S:$L($G(OCXDR)) DIC("DR")=OCXDR
D ^DIC Q:(Y<1) 0 Q Y
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXOED08 2024 printed Oct 16, 2024@18:25:59 Page 2
OCXOED08 ;SLC/RJS,CLA - Rule Editor (Element Options) ;10/29/98 12:37
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 ;
S ;
+1 ;
+2 QUIT
EN(OCXD0,OCXRD,OCXACT) ;
+1 ;
+2 ;
+3 NEW OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
+4 ;
+5 SET OCXOPT=$$GETOPT^OCXOEDT(.OCXACT)
if (OCXOPT=U)
QUIT 1
if $LENGTH(OCXOPT)
XECUTE OCXOPT
+6 ;
+7 if '$DATA(^OCXS(860.3,OCXD0))
QUIT 1
+8 ;
+9 QUIT 0
+10 ;
+11 ;
EDELE(OCXD0) ;
+1 NEW X
SET X=$$DIE("^OCXS(860.3,",OCXD0,".01;.02")
+2 if '$DATA(^OCXS(860.3,OCXD0))
QUIT
+3 QUIT
+4 ;
EDEXP(OCXD0,OCXD1) ;
+1 DO EN^OCXOED09(OCXD0,OCXD1)
+2 QUIT
+3 ;
EOPT(OCXMODE,OCXD0) ;
+1 ;
+2 IF OCXMODE="ADD"
Begin DoDot:1
+3 if '$DATA(^OCXS(860.3,OCXD0,"COND",0))
SET ^OCXS(860.3,OCXD0,"COND",0)="^860.31^^"
+4 NEW OCXD1
SET OCXD1=$ORDER(^OCXS(860.3,OCXD0,"COND","@"),-1)+1
+5 SET ^OCXS(860.3,OCXD0,"COND",OCXD1,0)=OCXD1
SET ^OCXS(860.3,OCXD0,"COND","B",OCXD1,OCXD1)=""
+6 DO EDEXP(OCXD0,OCXD1)
End DoDot:1
QUIT
+7 IF OCXMODE="DEL"
Begin DoDot:1
+8 if '$DATA(^OCXS(860.3,OCXD0,"COND",0))
SET ^OCXS(860.3,OCXD0,"COND",0)="^860.31^^"
+9 NEW OCXD1,DA
SET DA(1)=OCXD0
SET OCXD1=+$$DIC("^OCXS(860.3,"_OCXD0_",""COND"",","AEMQN","Select Expression Index Number: ")
if (OCXD1<0)
QUIT
+10 if '$$READ("Y","Are you sure you want to Delete ?","YES")
QUIT
+11 if '$$DIE("^OCXS(860.3,"_(+OCXD0)_",""COND"",",OCXD1,"S DA(1)="_(+OCXD0)_";.01///@")
QUIT
+12 WRITE !!,"Deleted..."
HANG 1
End DoDot:1
QUIT
+13 QUIT
+14 ;
COMP ;
+1 DO ^OCXOCMP
+2 QUIT
+3 ;
+4 ;
READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
+1 NEW OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
+2 if '$LENGTH($GET(OCXZ0))
QUIT U
+3 SET DIR(0)=OCXZ0
+4 if $LENGTH($GET(OCXZA))
SET DIR("A")=OCXZA
+5 if $LENGTH($GET(OCXZB))
SET DIR("B")=OCXZB
+6 FOR OCXLINE=1:1:($GET(OCXZL)-1)
WRITE !
+7 DO ^DIR
+8 IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIRUT)!$DATA(DIROUT)
QUIT U
+9 QUIT Y
+10 ;
DIE(DIE,DA,DR) ;
+1 ;
+2 DO RM(IOM)
NEW DUOUT,DTOUT,DIC
SET DIC=DIE
DO ^DIE
DO RM(0)
if $GET(DTOUT)
QUIT 0
if $GET(DUOUT)
QUIT 0
QUIT 1
+3 ;
RM(X) XECUTE ^%ZOSF("RM")
QUIT
+1 ;
DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
+1 ;
+2 NEW DIC,X,Y
+3 SET DIC=$GET(OCXDIC)
if '$LENGTH(DIC)
QUIT -1
+4 SET DIC(0)=$GET(OCXDIC0)
if $LENGTH($GET(OCXX))
SET X=OCXX
+5 if $LENGTH($GET(OCXDICS))
SET DIC("S")=OCXDICS
+6 if $LENGTH($GET(OCXDICA))
SET DIC("A")=OCXDICA
+7 if $LENGTH($GET(OCXDR))
SET DIC("DR")=OCXDR
+8 DO ^DIC
if (Y<1)
QUIT 0
QUIT Y
+9 ;