LRAPESON ;VA/DALOI/WTY- AP TURN ESIG ON;10/25/01
;;5.2;LAB SERVICE;**1030**;NOV 01, 1997
;;5.2;LAB SERVICE;**259**;Sep 27, 1994
;
;This routine is used to activate the electronic signature flag
;for Anatomic Pathology
;
N LRAPES,LRAPESON,LRMSG,LRQUIT,LRFDA
S LRQUIT=0
MAIN ;
D CHKSEC Q:LRQUIT
D GETDATA(.LRAPESON)
D INPUT Q:LRQUIT
D UPDATE
Q
CHKSEC ;
I '$D(^XUSEC("LRAPSUPER",DUZ)) D Q
.S LRMSG="You do not hold the appropriate security key "
.S LRMSG=LRMSG_"to use this option."
.D EN^DDIOL(LRMSG,"","!!")
.W !
.S LRQUIT=1
Q
GETDATA(LRAPESON) ;
S LRAPESON=+$$GET1^DIQ(69.9,"1,",619,"I")
Q
INPUT ;
S LRMSG="AP electronic signature is "
S:'LRAPESON LRMSG=LRMSG_"in"
S LRMSG=LRMSG_"active."
D EN^DDIOL(LRMSG,"","!!")
W !
S DIR(0)="YA",DIR("B")="NO"
S DIR("A")="Do you wish to "
S:LRAPESON DIR("A")=DIR("A")_"de"
S DIR("A")=DIR("A")_"activate electronic signature for AP? "
D ^DIR
I 'Y S LRQUIT=1
Q
UPDATE ;
L +^LAB(69.9,1,15):5 I '$T D Q
.S LRMSG="This record is locked by another user. "
.S LRMSG=LRMSG_"Please wait and try again."
.D EN^DDIOL(LRMSG,"","!!")
S LRFDA(69.9,"1,",619)=$S('LRAPESON:1,1:0)
D FILE^DIE("","LRFDA")
W "...Done"
L -^LAB(69.9,1,15)
Q
LRAPESON ;VA/DALOI/WTY- AP TURN ESIG ON;10/25/01
+1 ;;5.2;LAB SERVICE;**1030**;NOV 01, 1997
+2 ;;5.2;LAB SERVICE;**259**;Sep 27, 1994
+3 ;
+4 ;This routine is used to activate the electronic signature flag
+5 ;for Anatomic Pathology
+6 ;
+7 NEW LRAPES,LRAPESON,LRMSG,LRQUIT,LRFDA
+8 SET LRQUIT=0
MAIN ;
+1 DO CHKSEC
IF LRQUIT
QUIT
+2 DO GETDATA(.LRAPESON)
+3 DO INPUT
IF LRQUIT
QUIT
+4 DO UPDATE
+5 QUIT
CHKSEC ;
+1 IF '$DATA(^XUSEC("LRAPSUPER",DUZ))
Begin DoDot:1
+2 SET LRMSG="You do not hold the appropriate security key "
+3 SET LRMSG=LRMSG_"to use this option."
+4 DO EN^DDIOL(LRMSG,"","!!")
+5 WRITE !
+6 SET LRQUIT=1
End DoDot:1
QUIT
+7 QUIT
GETDATA(LRAPESON) ;
+1 SET LRAPESON=+$$GET1^DIQ(69.9,"1,",619,"I")
+2 QUIT
INPUT ;
+1 SET LRMSG="AP electronic signature is "
+2 IF 'LRAPESON
SET LRMSG=LRMSG_"in"
+3 SET LRMSG=LRMSG_"active."
+4 DO EN^DDIOL(LRMSG,"","!!")
+5 WRITE !
+6 SET DIR(0)="YA"
SET DIR("B")="NO"
+7 SET DIR("A")="Do you wish to "
+8 IF LRAPESON
SET DIR("A")=DIR("A")_"de"
+9 SET DIR("A")=DIR("A")_"activate electronic signature for AP? "
+10 DO ^DIR
+11 IF 'Y
SET LRQUIT=1
+12 QUIT
UPDATE ;
+1 LOCK +^LAB(69.9,1,15):5
IF '$TEST
Begin DoDot:1
+2 SET LRMSG="This record is locked by another user. "
+3 SET LRMSG=LRMSG_"Please wait and try again."
+4 DO EN^DDIOL(LRMSG,"","!!")
End DoDot:1
QUIT
+5 SET LRFDA(69.9,"1,",619)=$SELECT('LRAPESON:1,1:0)
+6 DO FILE^DIE("","LRFDA")
+7 WRITE "...Done"
+8 LOCK -^LAB(69.9,1,15)
+9 QUIT