Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: OCXOED07

OCXOED07.m

Go to the documentation of this file.
OCXOED07 ;SLC/RJS,CLA - Rule Editor (Element Display) ;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) ;
 ;
 N OCXACT,OCXRD
 F  K OCXRD,OCXACT S (OCXRD,OCXACT)="" D GETDATA(OCXD0,.OCXRD),DISP(OCXD0,.OCXRD,.OCXACT) Q:$$EN^OCXOED08(OCXD0,.OCXRD,.OCXACT)
 ;
 Q
 ;
DISP(OCXD0,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("Element Edit Screen"),80),!!
 W "  ",$$OPT^OCXOEDT("Edit","EDELE","08",.OCXACT,OCXD0)
 W "  ",$$FIELD("Element:")," ",$$DATA($G(OCXRD("ELE",OCXD0,.01,"E")),50)
 W !!,?10,$$FIELD("Context:")," ",$$DATA($G(OCXRD("ELE",OCXD0,.02,"E")),50)
 ;
 W !!,$$SEP("Element Expressions"),!
 S OCXD1=0 F  S OCXD1=$O(OCXRD("ELE",OCXD0,"C",OCXD1)) Q:'OCXD1  D
 .W !
 .W "  ",$$OPT^OCXOEDT("EXP"_OCXD1,"EDEXP","08",.OCXACT,OCXD0_","_OCXD1)
 .W "  ",$$FIELD("Data Field:")," ",$$DATA($G(OCXRD("ELE",OCXD0,"C",OCXD1,1,"E")),50)
 W !
 W !,"  ",$$OPT^OCXOEDT("Add Expression","EOPT","08",.OCXACT,"""ADD"","_OCXD0,"AE")
 W "  ",$$OPT^OCXOEDT("Delete Expression","EOPT","08",.OCXACT,"""DEL"","_OCXD0,"DE")
 ;
 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,OCXD) ;
 ;
 N OCXDIQ,OCXX
 S OCXDIQ="" D DIQ("^OCXS(860.3,",OCXD0,"IEN",.OCXDIQ)
 M OCXD("ELE")=OCXDIQ(860.3) K OCXDIQ S OCXDIQ=""
 S OCXX=0 F  S OCXX=$O(^OCXS(860.3,OCXD0,"COND",OCXX)) Q:'OCXX  W "." D GETMULT(OCXD0,OCXX,"COND","C",860.31,.OCXD)
 Q
 ;
GETMULT(OCXD0,OCXD1,OCXSUB,OCXSLOT,OCXSUBD,OCXD) ;
 ;
 N OCXDIQ
 S OCXDIQ="" D DIQ("^OCXS(860.3,"_OCXD0_","""_OCXSUB_""",",OCXD1,"IEN",.OCXDIQ)
 M OCXD("ELE",OCXD0,OCXSLOT)=OCXDIQ(OCXSUBD) 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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