OCXOED15 ;SLC/RJS,CLA - Rule Editor (Expert System Editor Display) ;6/20/01 10:52
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32,105**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
;
S ;
;
Q
EN ;
;
N OCXACT F K OCXACT S OCXACT="" D DISP(.OCXACT) Q:$$EN^OCXOED16(.OCXACT)
;
Q
;
DISP(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("Expert System Editor Main Screen"),80),!
I $L($T(VERSION^OCXOCMP)) W !,$$CENTER($$FIELD($$VERSION^OCXOCMP),80),!
W !
W !," ",$$OPT^OCXOEDT("Rule","EDRULE","16",.OCXACT)," ",$$FIELD("Edit a Rule")
W !
W !," ",$$OPT^OCXOEDT("Element","EDELEM","16",.OCXACT)," ",$$FIELD("Edit an Element")
W !
W !," ",$$OPT^OCXOEDT("Field","EDDF","16",.OCXACT)," ",$$FIELD("Edit a Data Field")
W !
W !," ",$$OPT^OCXOEDT("Comp","COMP","16",.OCXACT)," ",$$FIELD("Run the Compiler")
W !
W !," ",$$OPT^OCXOEDT("ScanDF","SCANDF","16",.OCXACT)," ",$$FIELD("Scan for Data Fields")
W !
W !," ",$$OPT^OCXOEDT("ScanEL","SCANEL","16",.OCXACT)," ",$$FIELD("Scan for Elements")
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)
;
;
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
;
OCXOED15 ;SLC/RJS,CLA - Rule Editor (Expert System Editor Display) ;6/20/01 10:52
+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 ;
+2 QUIT
EN ;
+1 ;
+2 NEW OCXACT
FOR
KILL OCXACT
SET OCXACT=""
DO DISP(.OCXACT)
IF $$EN^OCXOED16(.OCXACT)
QUIT
+3 ;
+4 QUIT
+5 ;
DISP(OCXACT) ;
+1 ;
+2 NEW OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
+3 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)
+4 ;
+5 WRITE @IOF,OCXTNLN
+6 WRITE !,$$CENTER($$FIELD("Expert System Editor Main Screen"),80),!
+7 IF $LENGTH($TEXT(VERSION^OCXOCMP))
WRITE !,$$CENTER($$FIELD($$VERSION^OCXOCMP),80),!
+8 WRITE !
+9 WRITE !," ",$$OPT^OCXOEDT("Rule","EDRULE","16",.OCXACT)," ",$$FIELD("Edit a Rule")
+10 WRITE !
+11 WRITE !," ",$$OPT^OCXOEDT("Element","EDELEM","16",.OCXACT)," ",$$FIELD("Edit an Element")
+12 WRITE !
+13 WRITE !," ",$$OPT^OCXOEDT("Field","EDDF","16",.OCXACT)," ",$$FIELD("Edit a Data Field")
+14 WRITE !
+15 WRITE !," ",$$OPT^OCXOEDT("Comp","COMP","16",.OCXACT)," ",$$FIELD("Run the Compiler")
+16 WRITE !
+17 WRITE !," ",$$OPT^OCXOEDT("ScanDF","SCANDF","16",.OCXACT)," ",$$FIELD("Scan for Data Fields")
+18 WRITE !
+19 WRITE !," ",$$OPT^OCXOEDT("ScanEL","SCANEL","16",.OCXACT)," ",$$FIELD("Scan for Elements")
+20 WRITE !!
+21 ;
+22 QUIT
+23 ;
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 ;
+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 ;