[613] | 1 | MAGQLOG ;WOIFO/RED/SRR/RMP - Log image electronic Sig access ; [ 06/20/2001 08:57 ]
|
---|
| 2 | ;;3.0;IMAGING;;Mar 01, 2002
|
---|
| 3 | ;; +---------------------------------------------------------------+
|
---|
| 4 | ;; | Property of the US Government. |
|
---|
| 5 | ;; | No permission to copy or redistribute this software is given. |
|
---|
| 6 | ;; | Use of unreleased versions of this software requires the user |
|
---|
| 7 | ;; | to execute a written test agreement with the VistA Imaging |
|
---|
| 8 | ;; | Development Office of the Department of Veterans Affairs, |
|
---|
| 9 | ;; | telephone (301) 734-0100. |
|
---|
| 10 | ;; | |
|
---|
| 11 | ;; | The Food and Drug Administration classifies this software as |
|
---|
| 12 | ;; | a medical device. As such, it may not be changed in any way. |
|
---|
| 13 | ;; | Modifications to this software may result in an adulterated |
|
---|
| 14 | ;; | medical device under 21CFR820, the use of which is considered |
|
---|
| 15 | ;; | to be a violation of US Federal Statutes. |
|
---|
| 16 | ;; +---------------------------------------------------------------+
|
---|
| 17 | ;;
|
---|
| 18 | ; CALL WITH:
|
---|
| 19 | ; MAGIMT = TYPE OF ACCESS
|
---|
| 20 | ; DUZ = USER NO.
|
---|
| 21 | ; MAGO = IMAGE SUBSCRIPT NO.
|
---|
| 22 | ; MAGDFN = PATIENT NO.
|
---|
| 23 | ; MAGCT =
|
---|
| 24 | ; MAGES = ELECTRONIC SIGNATURE
|
---|
| 25 | ENTRY(RESULT,MAGIMT,MAGDUZ,MAGO,MAGDFN,MAGCT,MAGES) ;
|
---|
| 26 | N MAGC,MAG1
|
---|
| 27 | I '$D(DUZ) S RESULT="0^INVALID user number" Q
|
---|
| 28 | S MAGDUZ=DUZ
|
---|
| 29 | I '$D(^MAG(2006.95,0)) S RESULT="0^No Log File" Q
|
---|
| 30 | D ESIG(.RESULT,MAGES)
|
---|
| 31 | D:+RESULT ENTRY^MAGLOG($E("ES"_$G(MAGIMT)_"COPY",1,10),MAGDUZ,MAGO,"Copy-WIN",MAGDFN,MAGCT)
|
---|
| 32 | Q
|
---|
| 33 | ESIG(RESULT,SIG) ;-- Verify electronic signature
|
---|
| 34 | S X=$$DECRYP^XUSRB1(SIG)
|
---|
| 35 | D HASH^XUSHSHP
|
---|
| 36 | I '$D(DUZ) S RESULT="0^INVALID user number" Q
|
---|
| 37 | S X1=$$GET1^DIQ(200,DUZ,20.4,"I")
|
---|
| 38 | I X1="" S RESULT="0^Missing signature parameters" Q
|
---|
| 39 | I X1'=X S RESULT="0^Invalid signature" Q
|
---|
| 40 | S RESULT="1^Signature verified"
|
---|
| 41 | Q
|
---|
| 42 | ;
|
---|