OOPSESIG ;HISC/REL-Electronic Signature ;3/30/98 16:11
;;2.0;ASISTS;;Jun 03, 2002
SIG(DUZ,IEN) ;
N ES,ESOK,ESNAM,X,ESCNT
N ESIG
S ESIG="0^"
S ES=$P($G(^VA(200,DUZ,20)),"^",4),ESNAM=$P($G(^(20)),"^",2),ESCNT=0
I ES="" W !!,"No electronic signature on file!" G E2
I ESNAM="" W !!,"No electronic signature block on file!" G E2
E1 W !!,"Enter Signature Code: " X ^%ZOSF("EOFF") R X:60 X ^%ZOSF("EON") S:'$T X="^" I X=""!(X="^") G E2
I X["?" W !,"Enter your Electronic Signature code to verify this action." G E1
S ESCNT=ESCNT+1 D HASH^XUSHSHP I ES'=X W " ??",*7 S X="" G E1:ESCNT<3,E2
W " ... signed." S X=ESNAM,X1=DUZ,X2=IEN D EN^XUSHSHP S ESIG=DUZ_"^"_X
D NOW^%DTC S ESIG=ESIG_"^"_% G EXIT
E2 S ESOK=0 W *7," ... Not Signed." G EXIT
EXIT K X,ES,ESCNT
Q ESIG
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HOOPSESIG 789 printed Nov 22, 2024@16:49:07 Page 2
OOPSESIG ;HISC/REL-Electronic Signature ;3/30/98 16:11
+1 ;;2.0;ASISTS;;Jun 03, 2002
SIG(DUZ,IEN) ;
+1 NEW ES,ESOK,ESNAM,X,ESCNT
+2 NEW ESIG
+3 SET ESIG="0^"
+4 SET ES=$PIECE($GET(^VA(200,DUZ,20)),"^",4)
SET ESNAM=$PIECE($GET(^(20)),"^",2)
SET ESCNT=0
+5 IF ES=""
WRITE !!,"No electronic signature on file!"
GOTO E2
+6 IF ESNAM=""
WRITE !!,"No electronic signature block on file!"
GOTO E2
E1 WRITE !!,"Enter Signature Code: "
XECUTE ^%ZOSF("EOFF")
READ X:60
XECUTE ^%ZOSF("EON")
if '$TEST
SET X="^"
IF X=""!(X="^")
GOTO E2
+1 IF X["?"
WRITE !,"Enter your Electronic Signature code to verify this action."
GOTO E1
+2 SET ESCNT=ESCNT+1
DO HASH^XUSHSHP
IF ES'=X
WRITE " ??",*7
SET X=""
if ESCNT<3
GOTO E1
GOTO E2
+3 WRITE " ... signed."
SET X=ESNAM
SET X1=DUZ
SET X2=IEN
DO EN^XUSHSHP
SET ESIG=DUZ_"^"_X
+4 DO NOW^%DTC
SET ESIG=ESIG_"^"_%
GOTO EXIT
E2 SET ESOK=0
WRITE *7," ... Not Signed."
GOTO EXIT
EXIT KILL X,ES,ESCNT
+1 QUIT ESIG