OCXOED05 ;SLC/RJS,CLA - Rule Editor (Rule Element Relation Display) ;3/20/01 16:19
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
;
S ;
;
EN(OCXR0,OCXR1) ;
;
N OCXACT,OCXRD
F K OCXRD,OCXACT S (OCXRD,OCXACT)="" D GETDATA(OCXR0,OCXR1,.OCXRD),DISP(OCXR0,OCXR1,.OCXRD,.OCXACT) Q:$$EN^OCXOED04(OCXR0,OCXR1,.OCXRD,.OCXACT)
;
Q
;
DISP(OCXR0,OCXR1,OCXRD,OCXACT) ;
;
N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
;
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)
;
W @IOF,OCXTNLN
W !,$$CENTER($$FIELD("Rule Element Relation Edit Screen"),80),!!
W !," ",$$FIELD("Expression:")," ",$$DATA($G(OCXRD("REL",OCXR1,1,"E")),50)
W !," ",$$FIELD(" Order Check:")," ",$$DATA($G(OCXRD("REL",OCXR1,2,"E")),30)
W !," ",$$FIELD(" Notification:")," ",$$DATA($G(OCXRD("REL",OCXR1,3,"E")),40)
W !," ",$$FIELD(" Report Device:")," ",$$DATA($G(OCXRD("REL",OCXR1,4,"E")),30)
W !," ",$$FIELD(" Notification Message:")," ",$$DATA($G(OCXRD("REL",OCXR1,5,"E")),40)
W !," ",$$FIELD(" Order Check Message:")," ",$$DATA($G(OCXRD("REL",OCXR1,6,"E")),40)
W !," ",$$FIELD(" Schedule Action:")," ",$$DATA($G(OCXRD("REL",OCXR1,7,"E")),40)
W !," ",$$FIELD(" Schedule Frequency:")," ",$$DATA($G(OCXRD("REL",OCXR1,8,"E")),40)
W !," ",$$FIELD(" Execute Code:")," ",$$DATA($G(OCXRD("REL",OCXR1,9,"E")),40)
W !!," ",$$OPT^OCXOEDT("Edit","EDREL","06",.OCXACT,"OCXR0,OCXR1")
W !!!
;
Q
;
CENTER(X,M) ;
N SP S SP="",$P(SP," ",80)=" " Q $E(SP,1,((M\2)-($L(X)\2)))_X
;
SEP(OCXHDR) ;
;
N SPACES S SPACES="",$P(SPACES," ",80-$L(OCXHDR))=" " Q OCXTNLN_OCXTHLN_OCXTULN_$G(OCXHDR)_SPACES_OCXTNLN
;
FIELD(OCXHDR) ;
;
Q OCXTHLN_$G(OCXHDR)_OCXTNLN
;
DATA(OCXVAL,OCXLEN) ;
;
N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
Q $E((OCXVAL_SPACES),1,OCXLEN)
;
GETDATA(OCXD0,OCXD1,OCXD) ;
;
N OCXDIQ,OCXX,DA
S OCXDIQ="",DA(1)=OCXD0 D DIQ("^OCXS(860.2,"_OCXD0_",""R"",",OCXD1,"IEN",.OCXDIQ)
M OCXD("REL")=OCXDIQ(860.22) K OCXDIQ S OCXDIQ=""
Q
;
DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
;
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
;
DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
N DR,DIQ S DR=".01:99999",DIQ="OCXARY(",DIQ(0)=$G(OCXDIQ0) D EN^DIQ1
Q
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOCXOED05 2625 printed Dec 13, 2024@02:25:20 Page 2
OCXOED05 ;SLC/RJS,CLA - Rule Editor (Rule Element Relation Display) ;3/20/01 16:19
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
+4 ;
S ;
+1 ;
EN(OCXR0,OCXR1) ;
+1 ;
+2 NEW OCXACT,OCXRD
+3 FOR
KILL OCXRD,OCXACT
SET (OCXRD,OCXACT)=""
DO GETDATA(OCXR0,OCXR1,.OCXRD)
DO DISP(OCXR0,OCXR1,.OCXRD,.OCXACT)
if $$EN^OCXOED04(OCXR0,OCXR1,.OCXRD,.OCXACT)
QUIT
+4 ;
+5 QUIT
+6 ;
DISP(OCXR0,OCXR1,OCXRD,OCXACT) ;
+1 ;
+2 NEW OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
+3 ;
+4 SET OCXTNLN=$CHAR(27,91,48,109)
SET OCXTRLN=$CHAR(27,91,55,109)
SET OCXTULN=$CHAR(27,91,52,109)
SET OCXTHLN=$CHAR(27,91,49,109)
+5 ;
+6 WRITE @IOF,OCXTNLN
+7 WRITE !,$$CENTER($$FIELD("Rule Element Relation Edit Screen"),80),!!
+8 WRITE !," ",$$FIELD("Expression:")," ",$$DATA($GET(OCXRD("REL",OCXR1,1,"E")),50)
+9 WRITE !," ",$$FIELD(" Order Check:")," ",$$DATA($GET(OCXRD("REL",OCXR1,2,"E")),30)
+10 WRITE !," ",$$FIELD(" Notification:")," ",$$DATA($GET(OCXRD("REL",OCXR1,3,"E")),40)
+11 WRITE !," ",$$FIELD(" Report Device:")," ",$$DATA($GET(OCXRD("REL",OCXR1,4,"E")),30)
+12 WRITE !," ",$$FIELD(" Notification Message:")," ",$$DATA($GET(OCXRD("REL",OCXR1,5,"E")),40)
+13 WRITE !," ",$$FIELD(" Order Check Message:")," ",$$DATA($GET(OCXRD("REL",OCXR1,6,"E")),40)
+14 WRITE !," ",$$FIELD(" Schedule Action:")," ",$$DATA($GET(OCXRD("REL",OCXR1,7,"E")),40)
+15 WRITE !," ",$$FIELD(" Schedule Frequency:")," ",$$DATA($GET(OCXRD("REL",OCXR1,8,"E")),40)
+16 WRITE !," ",$$FIELD(" Execute Code:")," ",$$DATA($GET(OCXRD("REL",OCXR1,9,"E")),40)
+17 WRITE !!," ",$$OPT^OCXOEDT("Edit","EDREL","06",.OCXACT,"OCXR0,OCXR1")
+18 WRITE !!!
+19 ;
+20 QUIT
+21 ;
CENTER(X,M) ;
+1 NEW SP
SET SP=""
SET $PIECE(SP," ",80)=" "
QUIT $EXTRACT(SP,1,((M\2)-($LENGTH(X)\2)))_X
+2 ;
SEP(OCXHDR) ;
+1 ;
+2 NEW SPACES
SET SPACES=""
SET $PIECE(SPACES," ",80-$LENGTH(OCXHDR))=" "
QUIT OCXTNLN_OCXTHLN_OCXTULN_$GET(OCXHDR)_SPACES_OCXTNLN
+3 ;
FIELD(OCXHDR) ;
+1 ;
+2 QUIT OCXTHLN_$GET(OCXHDR)_OCXTNLN
+3 ;
DATA(OCXVAL,OCXLEN) ;
+1 ;
+2 NEW SPACES
SET SPACES=""
SET $PIECE(SPACES," ",OCXLEN+5)=" "
SET OCXVAL=$GET(OCXVAL)
+3 IF ($LENGTH(OCXVAL)>OCXLEN)
QUIT $EXTRACT(OCXVAL,1,OCXLEN-3)_"..."
+4 QUIT $EXTRACT((OCXVAL_SPACES),1,OCXLEN)
+5 ;
GETDATA(OCXD0,OCXD1,OCXD) ;
+1 ;
+2 NEW OCXDIQ,OCXX,DA
+3 SET OCXDIQ=""
SET DA(1)=OCXD0
DO DIQ("^OCXS(860.2,"_OCXD0_",""R"",",OCXD1,"IEN",.OCXDIQ)
+4 MERGE OCXD("REL")=OCXDIQ(860.22)
KILL OCXDIQ
SET OCXDIQ=""
+5 QUIT
+6 ;
DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR) ;
+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 ;
DIQ(DIC,DA,OCXDIQ0,OCXARY) ;
+1 NEW DR,DIQ
SET DR=".01:99999"
SET DIQ="OCXARY("
SET DIQ(0)=$GET(OCXDIQ0)
DO EN^DIQ1
+2 QUIT
+3 ;
+4 QUIT