PRCNTIED ;SSI/SEB-Edit a turn-in request ;[ 05/31/96 10:42 AM ]
;;1.0;Equipment/Turn-In Request;**11**;Sep 13, 1996
EN S DIC="^PRCN(413.1,",DIC("S")="I $P(^(0),U,2)=DUZ&($P(^(0),U,7)=1)!($P(^(0),U,7)=4)"
S DIC(0)="AEQZ" D ^DIC G EXIT:Y<0 S ST=$P(^PRCN(413.1,+Y,0),U,7)
S (IN,PRCNTDA)=+Y,PRCNUSR=$S(ST=4:2,1:0) D SETUP^PRCNTIPR
EDIT ; Edit the transaction if desired
W !!,"Do you want to edit this request" S %=2 D YN^DICN
I %=0 G EDIT
I %'=1 G EXIT
S DIE=413.1,DR="[PRCNTIRQ]",(DA,IN)=PRCNTDA,EDIT=1 D ^DIE
I $P($G(^PRCN(413.1,IN,0)),U,10)]"" S $P(^(0),U,10)="" K ^PRCN(413.1,IN,2)
EXIT K DIC,DIE,DA,DR,EDIT,IN,PRCNUSR,PRCNTDA,Y,%,ST
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCNTIED 659 printed Nov 22, 2024@17:04:53 Page 2
PRCNTIED ;SSI/SEB-Edit a turn-in request ;[ 05/31/96 10:42 AM ]
+1 ;;1.0;Equipment/Turn-In Request;**11**;Sep 13, 1996
EN SET DIC="^PRCN(413.1,"
SET DIC("S")="I $P(^(0),U,2)=DUZ&($P(^(0),U,7)=1)!($P(^(0),U,7)=4)"
+1 SET DIC(0)="AEQZ"
DO ^DIC
if Y<0
GOTO EXIT
SET ST=$PIECE(^PRCN(413.1,+Y,0),U,7)
+2 SET (IN,PRCNTDA)=+Y
SET PRCNUSR=$SELECT(ST=4:2,1:0)
DO SETUP^PRCNTIPR
EDIT ; Edit the transaction if desired
+1 WRITE !!,"Do you want to edit this request"
SET %=2
DO YN^DICN
+2 IF %=0
GOTO EDIT
+3 IF %'=1
GOTO EXIT
+4 SET DIE=413.1
SET DR="[PRCNTIRQ]"
SET (DA,IN)=PRCNTDA
SET EDIT=1
DO ^DIE
+5 IF $PIECE($GET(^PRCN(413.1,IN,0)),U,10)]""
SET $PIECE(^(0),U,10)=""
KILL ^PRCN(413.1,IN,2)
EXIT KILL DIC,DIE,DA,DR,EDIT,IN,PRCNUSR,PRCNTDA,Y,%,ST
+1 QUIT