ESPVNE ;DALISC/CKA - EDIT COURTESY/USDC VIOLATION NOTICE;12/92
;;1.0;POLICE & SECURITY;;Mar 31, 1994
D DT^DICRW F I=1:1:13 S ESPD(I)="" S ESPVAR=4
MNI I '$D(ESPFN) W ! D EN^ESPMNI G:'$D(ESPFN)!($D(DTOUT)) EXIT S ESPNAM=$P(^ESP(910,ESPFN,0),U)
S DIC="^ESP(914,",DIC(0)="AEQMZ",DIC("S")="I $P(^(0),U,9)="_ESPFN D ^DIC K DIC I Y<0 G EXIT
S (ESPVN,DA)=+Y,DIE="^ESP(914,"
L +^ESP(914,DA):1 I '$T W !,"Another user is editing this record!!" G MNI
S:$P(^ESP(914,ESPVN,0),U,3)="C" DR=".02;.04;.06;.07;.08;.09;1.01;1.02;1.03;1.04;1.05;1.06;1.07;1.08;1.09;2.02"
S:$P(^ESP(914,ESPVN,0),U,3)="V" DR=".02;.04;.05;.06;.07;.08;.09;1.01;1.02;1.03;1.04;1.05;1.06;1.07;1.08;1.09;2.02;10"
I "CV"'[$P(^ESP(914,ESPVN,0),U,3) G MNI
D ^DIE
L -^ESP(914,ESPVN)
G:$D(DTOUT) EXIT
G MNI
EXIT W:$D(DTOUT) $C(7)
K DIC,Y,DR,DIE,DTOUT,ESPD,ESPFN,ESPVAR Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HESPVNE 852 printed Dec 13, 2024@02:30:57 Page 2
ESPVNE ;DALISC/CKA - EDIT COURTESY/USDC VIOLATION NOTICE;12/92
+1 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
+2 DO DT^DICRW
FOR I=1:1:13
SET ESPD(I)=""
SET ESPVAR=4
MNI IF '$DATA(ESPFN)
WRITE !
DO EN^ESPMNI
if '$DATA(ESPFN)!($DATA(DTOUT))
GOTO EXIT
SET ESPNAM=$PIECE(^ESP(910,ESPFN,0),U)
+1 SET DIC="^ESP(914,"
SET DIC(0)="AEQMZ"
SET DIC("S")="I $P(^(0),U,9)="_ESPFN
DO ^DIC
KILL DIC
IF Y<0
GOTO EXIT
+2 SET (ESPVN,DA)=+Y
SET DIE="^ESP(914,"
+3 LOCK +^ESP(914,DA):1
IF '$TEST
WRITE !,"Another user is editing this record!!"
GOTO MNI
+4 if $PIECE(^ESP(914,ESPVN,0),U,3)="C"
SET DR=".02;.04;.06;.07;.08;.09;1.01;1.02;1.03;1.04;1.05;1.06;1.07;1.08;1.09;2.02"
+5 if $PIECE(^ESP(914,ESPVN,0),U,3)="V"
SET DR=".02;.04;.05;.06;.07;.08;.09;1.01;1.02;1.03;1.04;1.05;1.06;1.07;1.08;1.09;2.02;10"
+6 IF "CV"'[$PIECE(^ESP(914,ESPVN,0),U,3)
GOTO MNI
+7 DO ^DIE
+8 LOCK -^ESP(914,ESPVN)
+9 if $DATA(DTOUT)
GOTO EXIT
+10 GOTO MNI
EXIT if $DATA(DTOUT)
WRITE $CHAR(7)
+1 KILL DIC,Y,DR,DIE,DTOUT,ESPD,ESPFN,ESPVAR
QUIT