36 lines
1.5 KiB
Mathematica
36 lines
1.5 KiB
Mathematica
TIUDPEDT ; SLC/JER - Document Parameter Edit ;2/19/93 16:15
|
|
;;1.0;TEXT INTEGRATION UTILITIES;**198,206,212**;Jun 20, 1997
|
|
MAIN ; Controls branching
|
|
N DIC,DA,DIE,DR,DLAYGO,X,Y,DWPK,TIUFPRIV S TIUFPRIV=1
|
|
W !,"First edit Institution-wide parameters:",!
|
|
;VMP OIFO BAY PINES;ELR;TIU*1.0*198 MODIFIED FROM HERE DOWN
|
|
S (DIC,DLAYGO)=8925.95,DIC(0)="AEMQLZ",DIC("A")="Select DOCUMENT DEFINITION: "
|
|
D ^DIC K DLAYGO Q:+Y'>0 S DA=+Y
|
|
I +$P(Y,U,3)=1 K X,Y,DIC N TIUERR D LOCK Q:$G(TIUERR) G CONT1
|
|
N TIUPRMPT,TIUDSPLY S TIUPRMPT=+$P(Y,U,2),TIUDSPLY=$G(Y(0,0))
|
|
K X,Y,DIC
|
|
;VMP OIFO BAY PINES;ELR;TIU*1.0*198;REMOVED .01 FROM INPUT TEMPLATE AND ADDED WARNING MSG.
|
|
N TIURESP,TIURESP1 S TIURESP=$$READ^TIUU("8925.95,.01:O",,)
|
|
S TIURESP=$P(TIURESP,U)
|
|
I $G(TIURESP)="@" S TIURESP=TIURESP_U_TIURESP K DIRUT G CONT
|
|
I (($D(DIRUT))!(+TIURESP<0)) K DIRUT Q
|
|
CONT ;
|
|
I $P(TIURESP,U)'=TIUPRMPT D Q:'+$G(TIURESP1)
|
|
. S TIURESP1=$$READ^TIUU("Y","You are about to lose the document parameters for "_TIUDSPLY_". Do you wish to continue","NO")
|
|
N TIUDR
|
|
S TIUDR=$S($P($G(TIURESP),U)="@":$P($G(TIURESP),U),1:$P($G(^TIU(8925.1,$P(TIURESP,U),0)),U))
|
|
Q:$L(TIUDR)'>0
|
|
S DIE="^TIU(8925.95,",DR=".01///"_TIUDR
|
|
L +^TIU(8925.95,DA):0 I '$T W !,"Another user is editing this entry" H 1 Q
|
|
N TIUSAVDA S TIUSAVDA=DA
|
|
D ^DIE
|
|
I $P($G(TIURESP),U)="@" S DA=TIUSAVDA G END
|
|
CONT1 ;
|
|
S DIE=8925.95,DR="[TIU DOCUMENT PARAMETER EDIT]"
|
|
D ^DIE
|
|
END L -^TIU(8925.95,DA)
|
|
Q
|
|
LOCK ;
|
|
L +^TIU(8925.95,DA):0 I '$T W !,"Another user is editing this entry" H 1 S TIUERR=1
|
|
Q
|