[613] | 1 | OCXOED14 ;SLC/RJS,CLA - Rule Editor (Meta Dictionary Link 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 | S ;
|
---|
| 7 | ;
|
---|
| 8 | Q
|
---|
| 9 | EN(OCXD0,OCXRD,OCXACT) ;
|
---|
| 10 | ;
|
---|
| 11 | ;
|
---|
| 12 | N OCXTHLN,OCXTNLN,OCXTRLN,OCXTULN,OCXTNLN
|
---|
| 13 | ;
|
---|
| 14 | 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)
|
---|
| 15 | ;
|
---|
| 16 | S OCXOPT=$$GETOPT^OCXOEDT(.OCXACT) Q:(OCXOPT=U) 1 X:$L(OCXOPT) OCXOPT
|
---|
| 17 | ;
|
---|
| 18 | Q:'$D(^OCXS(863.3,OCXD0)) 1
|
---|
| 19 | ;
|
---|
| 20 | Q 0
|
---|
| 21 | ;
|
---|
| 22 | EDATT(OCXD0) ;
|
---|
| 23 | ;
|
---|
| 24 | N OCXX
|
---|
| 25 | S OCXX=$$MDIE("^OCXS(863.3,",OCXD0,".05")
|
---|
| 26 | Q
|
---|
| 27 | ;
|
---|
| 28 | EDPARAM(OCXD0,PARNAM) ;
|
---|
| 29 | ;
|
---|
| 30 | N NEWVAL,OLDVAL
|
---|
| 31 | S OLDVAL=$$GLPVAL(OCXD0,PARNAM)
|
---|
| 32 | W !!
|
---|
| 33 | W " ",$$FIELD("Link Parameter -> "_PARNAM_": ")
|
---|
| 34 | W !!,"-> " W:$L(OLDVAL) OLDVAL_" // "
|
---|
| 35 | W !,"-> "
|
---|
| 36 | R NEWVAL:DTIME E Q
|
---|
| 37 | I '$L(NEWVAL) S NEWVAL=$$SCREEN^OCXOED12(OLDVAL) D:'(NEWVAL=OLDVAL) SLPVAL(OCXD0,PARNAM,NEWVAL) Q
|
---|
| 38 | I (NEWVAL="@") W ! Q:'$$READ("Y","Are you sure you want to delete this value ?","YES")
|
---|
| 39 | S:(NEWVAL["|") NEWVAL=$$SCREEN^OCXOED12(NEWVAL) D SLPVAL(OCXD0,PARNAM,NEWVAL)
|
---|
| 40 | Q
|
---|
| 41 | ;
|
---|
| 42 | EDPATT(OCXD0,PNAME) ;
|
---|
| 43 | ;
|
---|
| 44 | N OLDVAL,NEWVAL,OCXX,OCXY,OCXZ,DA,OCXPR
|
---|
| 45 | ;
|
---|
| 46 | S OLDVAL="",OCXX="" F S OCXX=$O(OCXRD("ATT",OCXD0,"PAR",OCXX)) Q:'OCXX I ($G(OCXRD("ATT",OCXD0,"PAR",OCXX,.01,"E"))=PNAME) Q
|
---|
| 47 | S:OCXX OLDVAL=$G(OCXRD("ATT",OCXD0,"PAR",OCXX,1,"E"))
|
---|
| 48 | ;
|
---|
| 49 | W !!
|
---|
| 50 | S OCXPR=$$FIELD("Attribute Parameter -> "_PNAME_": ") S:$L(OLDVAL) OCXPR=OCXPR_OLDVAL_" // "
|
---|
| 51 | S NEWVAL=$$DIC("^OCXS(864.1,","AEMQ",OCXPR)
|
---|
| 52 | ;
|
---|
| 53 | S:'$D(^OCXS(863.4,OCXD0,"PAR",0)) ^OCXS(863.4,OCXD0,"PAR",0)="^863.41PI^^"
|
---|
| 54 | S DA(1)=OCXD0,OCXY=+$$DIC("^OCXS(863.4,"_OCXD0_",""PAR"",","ML","",PNAME,"","",.DA) Q:(OCXY<1)
|
---|
| 55 | S DA(1)=OCXD0,DA=+OCXY,OCXZ=$$DIE("^OCXS(863.4,"_OCXD0_",""PAR"",",.DA,1,$P(NEWVAL,U,2))
|
---|
| 56 | Q
|
---|
| 57 | ;
|
---|
| 58 | GLPVAL(OCXD0,PNAME) ;
|
---|
| 59 | N X S X="" F S X=$O(OCXRD("LINK",OCXD0,"PAR",X)) Q:'X I ($G(OCXRD("LINK",OCXD0,"PAR",X,.01,"E"))=PNAME) Q
|
---|
| 60 | Q:'X "" Q $G(OCXRD("LINK",OCXD0,"PAR",X,1,"E"))
|
---|
| 61 | ;
|
---|
| 62 | SLPVAL(OCXD0,PNAME,PVAL) ;
|
---|
| 63 | N DA,OCXY,OCXZ
|
---|
| 64 | S:'$D(^OCXS(863.4,OCXD0,"PAR",0)) ^OCXS(863.3,OCXD0,"PAR",0)="^863.32P^^"
|
---|
| 65 | S DA(1)=OCXD0,OCXY=+$$DIC("^OCXS(863.3,"_OCXD0_",""PAR"",","ML","",PNAME,"","",.DA) Q:(OCXY<1)
|
---|
| 66 | S DA(1)=OCXD0,DA=+OCXY,OCXZ=$$DIE("^OCXS(863.3,"_OCXD0_",""PAR"",",.DA,1,PVAL)
|
---|
| 67 | Q
|
---|
| 68 | ;
|
---|
| 69 | FIELD(OCXHDR) ;
|
---|
| 70 | ;
|
---|
| 71 | Q OCXTHLN_$G(OCXHDR)_OCXTNLN
|
---|
| 72 | ;
|
---|
| 73 | DATA(OCXVAL,OCXLEN) ;
|
---|
| 74 | ;
|
---|
| 75 | N SPACES S SPACES="",$P(SPACES," ",OCXLEN+5)=" ",OCXVAL=$G(OCXVAL)
|
---|
| 76 | I ($L(OCXVAL)>OCXLEN) Q $E(OCXVAL,1,OCXLEN-3)_"..."
|
---|
| 77 | Q $E((OCXVAL_SPACES),1,OCXLEN)
|
---|
| 78 | ;
|
---|
| 79 | READ(OCXZ0,OCXZA,OCXZB,OCXZL) ;
|
---|
| 80 | N OCXLINE,DIR,DTOUT,DUOUT,DIRUT,DIROUT
|
---|
| 81 | Q:'$L($G(OCXZ0)) U
|
---|
| 82 | S DIR(0)=OCXZ0
|
---|
| 83 | S:$L($G(OCXZA)) DIR("A")=OCXZA
|
---|
| 84 | S:$L($G(OCXZB)) DIR("B")=OCXZB
|
---|
| 85 | F OCXLINE=1:1:($G(OCXZL)-1) W !
|
---|
| 86 | D ^DIR
|
---|
| 87 | I $D(DTOUT)!$D(DUOUT)!$D(DIRUT)!$D(DIROUT) Q U
|
---|
| 88 | Q Y
|
---|
| 89 | ;
|
---|
| 90 | DIE(DIE,DA,OCXFLD,OCXVAL) ;
|
---|
| 91 | ;
|
---|
| 92 | N DUOUT,DTOUT,DIC
|
---|
| 93 | S DR=OCXFLD_"///^S X=OCXVAL"
|
---|
| 94 | S DIC=DIE D RM(IOM) D ^DIE D RM(0) Q:$G(DTOUT) 0 Q:$G(DUOUT) 0 Q 1
|
---|
| 95 | ;
|
---|
| 96 | RM(X) X ^%ZOSF("RM") Q
|
---|
| 97 | ;
|
---|
| 98 | MDIE(DIE,DA,DR) ;
|
---|
| 99 | ;
|
---|
| 100 | N DUOUT,DTOUT,DIC
|
---|
| 101 | S DIC=DIE D RM(IOM) D ^DIE D RM(0) Q:$G(DTOUT) 0 Q:$G(DUOUT) 0 Q 1
|
---|
| 102 | ;
|
---|
| 103 | DIC(OCXDIC,OCXDIC0,OCXDICA,OCXX,OCXDICS,OCXDR,DA) ;
|
---|
| 104 | ;
|
---|
| 105 | N DIC,X,Y
|
---|
| 106 | S DIC=$G(OCXDIC) Q:'$L(DIC) -1
|
---|
| 107 | S DIC(0)=$G(OCXDIC0) S:$L($G(OCXX)) X=OCXX
|
---|
| 108 | S:$L($G(OCXDICS)) DIC("S")=OCXDICS
|
---|
| 109 | S:$L($G(OCXDICA)) DIC("A")=OCXDICA
|
---|
| 110 | S:$L($G(OCXDR)) DIC("DR")=OCXDR
|
---|
| 111 | D ^DIC Q:(Y<1) 0 Q Y
|
---|
| 112 | ;
|
---|