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

MAGUPSE.m

Go to the documentation of this file.
  1. MAGUPSE ;WOIFO/MLH - Imaging utility - return pt employee/sensitive status; 3 Feb 2012 06:00 AM
  1. ;;3.0;IMAGING;**118**;Mar 19, 2002;Build 4525;May 01, 2013
  1. ;; Per VHA Directive 2004-038, this routine should not be modified.
  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. ;; | 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. Q
  1. ;
  1. SENSEMP(MAGDFN) ;FUNCTION - return pt employee/sensitive status
  1. ;input: MAGDFN pt's internal entry no. on PATIENT File (#2)
  1. ;function return: -1 if DFN is not a positive integer
  1. ; 0 if patient not employee or sensitive, or patient not found
  1. ; 1 if patient is employee
  1. ; 2 if patient is sensitive
  1. ; 3 if patient is both employee and sensitive
  1. N SENSEMP
  1. I (MAGDFN'>0)!(MAGDFN'?1.N) Q -2 ; improper format
  1. S SENSEMP=0 ; assume neither employee nor sensitive
  1. S SENSEMP=SENSEMP+($$EMPL^DGSEC4(MAGDFN)=1) ; employee (ICR #3646)
  1. S SENSEMP=SENSEMP+(2*($P($G(^DGSL(38.1,MAGDFN,0)),"^",2)=1)) ; sensitive (IA #767)
  1. Q SENSEMP