source: FOIAVistA/trunk/r/INTEGRATED_PATIENT_FUNDS-PRPF-PFXIP/PRPFSIG.m@ 1726

Last change on this file since 1726 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.2 KB
Line 
1PRPFSIG ;WISC@ALTOONA/CTB/TEN-ROUTINE TO ENTER OR CHANGE ELECTRONIC SIGNATURE CODE ;7/15/97 9:56 AM
2V ;;3.0;PATIENT FUNDS;**6,7**;JUNE 1, 1989
3ENCODE(X,X1,X2) D EN^XUSHSHP Q X
4DECODE(X,X1,X2) D DE^XUSHSHP Q X
5HASH(X) D HASH^XUSHSHP Q X
6SUM(X) ;CREATE CHECKSUM VALUE FOR STRING
7 N I,Y
8 S Y=0 F I=1:1:$L(X) S Y=$A(X,I)*I+Y
9 Q Y
10ESIG(USERNUM,MESSAGE) ;interogate user for electronic signature code
11 ;1= valid code entered
12 ;0= invalid code entered
13 ;-1= user up arrowed out
14 ;-2= signature read time out
15 ;-3= no signature on file
16 NEW X,SIGCODE,ZZI,OUT
17 S SIGCODE=$P($G(^VA(200,USERNUM,20)),"^",4)
18 I SIGCODE="" W !,"You have no signature code on file. Please contact your IRM staff for assistance.",*7,! S MESSAGE=-3 QUIT
19 F ZZI=1:1:3 D Q:OUT]""
20 . K OUT
21 . W !,"Enter ELECTRONIC SIGNATURE CODE: "
22 . X ^%ZOSF("EOFF") R X:60 X ^%ZOSF("EON")
23 . I '$T S OUT=-2 QUIT
24 . I $E(X)="^" S OUT=-1 QUIT
25 . S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
26 . I $$HASH(X)=SIGCODE W ?60,"Thank you." S OUT=1 QUIT
27 . W !,"Sorry, but that's not your correct electronic signature code."
28 . S OUT=""
29 . QUIT
30 S MESSAGE=+$G(OUT) QUIT
31 ;
32NOW() ;Extrinsic function to return current time
33 N %,%I,%H,X
34 D NOW^%DTC
35 QUIT %
Note: See TracBrowser for help on using the repository browser.