Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: MAGQLOG

MAGQLOG.m

Go to the documentation of this file.
  1. MAGQLOG ;WOIFO/RED/SRR/RMP - Log image electronic Sig access ; [ 06/20/2001 08:57 ]
  1. ;;3.0;IMAGING;;Mar 01, 2002
  1. ;; +---------------------------------------------------------------+
  1. ;; | Property of the US Government. |
  1. ;; | No permission to copy or redistribute this software is given. |
  1. ;; | Use of unreleased versions of this software requires the user |
  1. ;; | to execute a written test agreement with the VistA Imaging |
  1. ;; | Development Office of the Department of Veterans Affairs, |
  1. ;; | telephone (301) 734-0100. |
  1. ;; | |
  1. ;; | The Food and Drug Administration classifies this software as |
  1. ;; | a medical device. As such, it may not be changed in any way. |
  1. ;; | Modifications to this software may result in an adulterated |
  1. ;; | medical device under 21CFR820, the use of which is considered |
  1. ;; | to be a violation of US Federal Statutes. |
  1. ;; +---------------------------------------------------------------+
  1. ;;
  1. ; CALL WITH:
  1. ; MAGIMT = TYPE OF ACCESS
  1. ; DUZ = USER NO.
  1. ; MAGO = IMAGE SUBSCRIPT NO.
  1. ; MAGDFN = PATIENT NO.
  1. ; MAGCT =
  1. ; MAGES = ELECTRONIC SIGNATURE
  1. ENTRY(RESULT,MAGIMT,MAGDUZ,MAGO,MAGDFN,MAGCT,MAGES) ;
  1. N MAGC,MAG1
  1. I '$D(DUZ) S RESULT="0^INVALID user number" Q
  1. S MAGDUZ=DUZ
  1. I '$D(^MAG(2006.95,0)) S RESULT="0^No Log File" Q
  1. D ESIG(.RESULT,MAGES)
  1. D:+RESULT ENTRY^MAGLOG($E("ES"_$G(MAGIMT)_"COPY",1,10),MAGDUZ,MAGO,"Copy-WIN",MAGDFN,MAGCT)
  1. Q
  1. ESIG(RESULT,SIG) ;-- Verify electronic signature
  1. S X=$$DECRYP^ROUTINE(SIG)
  1. D HASH^ROUTINE
  1. I '$D(DUZ) S RESULT="0^INVALID user number" Q
  1. S X1=$$GET1^DIQ(200,DUZ,20.4,"I")
  1. I X1="" S RESULT="0^Missing signature parameters" Q
  1. I X1'=X S RESULT="0^Invalid signature" Q
  1. S RESULT="1^Signature verified"
  1. Q
  1. ;