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

MAGNVIC.m

Go to the documentation of this file.
  1. MAGNVIC ;WOIFO/NST - Utilities for Image Import API ; 09 Mar 2010 4:14 PM
  1. ;;3.0;IMAGING;**108**;Mar 19, 2002;Build 1738;May 20, 2010
  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. ;
  1. ;***** RPC TO CHECKS IF PHOTO IMAGE EXISTS FOR A PATIENT
  1. ;
  1. ; MAGDFN Patient DFN
  1. ;
  1. ; Return Values
  1. ; =============
  1. ; MAGRY = 0 Photo doesn't exist
  1. ; Date.Timestamp - Photo on file (date timestamp of the most recent photo)
  1. ;
  1. RPHASPHT(MAGRY,MAGDFN) ;RPC [MAGN PATIENT HAS PHOTO]
  1. K MAGRY
  1. N EXIST
  1. N $ETRAP,$ESTACK S $ETRAP="D ERR^MAGGTERR"
  1. S EXIST=$$HASPHOTO(+MAGDFN)
  1. S MAGRY=EXIST
  1. Q
  1. ;
  1. ;##### CHECKS IF PHOTO IMAGE EXISTS FOR A PATIENT MAGDFN
  1. ;
  1. ; MAGDFN Patient DFN
  1. ;
  1. ; Return Values
  1. ; =============
  1. ; 0 - Photo doesn't exist
  1. ; Date.Timestamp - Photo on file (date timestamp of the most recent photo)
  1. ;
  1. HASPHOTO(MAGDFN) ;
  1. N RDT,IEN,RESULT
  1. S RDT=""
  1. S RESULT=0
  1. F Q:RESULT S RDT=$O(^MAG(2005,"APPXDT",MAGDFN,"PHOTO ID",RDT)) Q:RDT="" D
  1. . S IEN=""
  1. . F Q:RESULT S IEN=$O(^MAG(2005,"APPXDT",MAGDFN,"PHOTO ID",RDT,IEN)) Q:IEN="" D
  1. . . Q:$$ISDEL^MAGGI11(IEN) ; Deleted image
  1. . . S RESULT=9999999.9999-RDT ; need to reverse the date
  1. . . Q
  1. . Q
  1. Q RESULT