ENCTMAN ;(WASH ISC)/RGY-Schedule Processing of Bar Code Data ;1-11-90
;;7.0;ENGINEERING;;Aug 17, 1993
;Copy of PRCTMAN ;DH-WASH ISC
S DIC="^PRCT(446.4,",DIC(0)="QEAM" D ^DIC G:+Y<0 Q5 S:'$D(^PRCT(446.4,+Y,2,0)) ^(0)="^446.42DI^^" S (DA(1),ENCTID)=+Y,DIC=DIC_ENCTID_",2," D ^DIC G:+Y<0 Q5 S ENCTTI=+Y
W !!,"Current Status is: ",$P(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)
S X="Are you sure you want to reschedule this data to process ?^Y" D ENYN^ENCTQUES I X="^"!'X W !,"OK, nothing scheduled !",! G Q5
S ZTDTH=-1 D TASK^ENCTREAD
Q5 K DIC,DA Q
DEQUE ;
S ENCT=$S('$D(ENCTID):0,$D(^PRCT(446.4,ENCTID,0))#2:^(0),1:0) G:ENCT=0 Q4 G:$S('$D(ENCTTI):1,1:'$D(^PRCT(446.4,ENCTID,2,ENCTTI,0))#2) Q4
I $P(ENCT,"^",4)="" D TIME S $P(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="RTN FLD IS MISSING"_Y G Q4
S X=$P(ENCT,"^",4) D RTN^ENCTUTL I '$D(X) D TIME S $P(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="RTN IS MISSING"_Y G Q4
D TIME S X=$P(ENCT,"^",4),$P(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="STARTED ON"_Y D @($P(X,"-")_"^"_$P(X,"-",2)),TIME S:$E($P(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3),1,11)="STARTED ON-" $P(^(0),"^",3)="FINISHED ON"_Y
Q4 K ENCT,ENCTID,ENCTTI Q
TIME D NOW^%DTC S Y=% X ^DD("DD") S Y="-"_Y Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HENCTMAN 1211 printed Nov 22, 2024@17:02:21 Page 2
ENCTMAN ;(WASH ISC)/RGY-Schedule Processing of Bar Code Data ;1-11-90
+1 ;;7.0;ENGINEERING;;Aug 17, 1993
+2 ;Copy of PRCTMAN ;DH-WASH ISC
+3 SET DIC="^PRCT(446.4,"
SET DIC(0)="QEAM"
DO ^DIC
if +Y<0
GOTO Q5
if '$DATA(^PRCT(446.4,+Y,2,0))
SET ^(0)="^446.42DI^^"
SET (DA(1),ENCTID)=+Y
SET DIC=DIC_ENCTID_",2,"
DO ^DIC
if +Y<0
GOTO Q5
SET ENCTTI=+Y
+4 WRITE !!,"Current Status is: ",$PIECE(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)
+5 SET X="Are you sure you want to reschedule this data to process ?^Y"
DO ENYN^ENCTQUES
IF X="^"!'X
WRITE !,"OK, nothing scheduled !",!
GOTO Q5
+6 SET ZTDTH=-1
DO TASK^ENCTREAD
Q5 KILL DIC,DA
QUIT
DEQUE ;
+1 SET ENCT=$SELECT('$DATA(ENCTID):0,$DATA(^PRCT(446.4,ENCTID,0))#2:^(0),1:0)
if ENCT=0
GOTO Q4
if $SELECT('$DATA(ENCTTI)
GOTO Q4
+2 IF $PIECE(ENCT,"^",4)=""
DO TIME
SET $PIECE(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="RTN FLD IS MISSING"_Y
GOTO Q4
+3 SET X=$PIECE(ENCT,"^",4)
DO RTN^ENCTUTL
IF '$DATA(X)
DO TIME
SET $PIECE(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="RTN IS MISSING"_Y
GOTO Q4
+4 DO TIME
SET X=$PIECE(ENCT,"^",4)
SET $PIECE(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3)="STARTED ON"_Y
DO @($PIECE(X,"-")_"^"_$PIECE(X,"-",2))
DO TIME
if $EXTRACT($PIECE(^PRCT(446.4,ENCTID,2,ENCTTI,0),"^",3),1,11)="STARTED ON-"
SET $PIECE(^(0),"^",3)="FINISHED ON"_Y
Q4 KILL ENCT,ENCTID,ENCTTI
QUIT
TIME DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
SET Y="-"_Y
QUIT