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

MAGGTU7.m

Go to the documentation of this file.
  1. MAGGTU7 ;WOIFO/GEK/SG - Silent calls for Queing functions from GUI ; 3/9/09 12:52pm
  1. ;;3.0;IMAGING;**8,20,93**;Dec 02, 2009;Build 163
  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. ;; | |
  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. ONJBOX(MAGIEN,CODE) ;
  1. ;Check to see if the image ( Abs, Full, or Big ) is on the worm
  1. ; before queuing it to be copied to HardDrive.
  1. ; We're testing to see if a pointer to the magnetic exists.
  1. ; If not then we assume the Image is on JukeBox
  1. N ZNODE
  1. S ZNODE=$G(^MAG(2005,+MAGIEN,0))
  1. IF '$L(ZNODE) Q 0
  1. IF $$IMOFFLN^MAGFILEB($P(ZNODE,"^",2)) Q 0
  1. Q:((+$P(ZNODE,U,11))!(+$P(ZNODE,U,12))) 0
  1. IF CODE="A" Q '$P(ZNODE,U,4)
  1. IF CODE="F" Q '$P(ZNODE,U,3)
  1. IF CODE="B" Q $S('$P(^MAG(2005,+MAGIEN,"FBIG"),U,2):0,1:'$P(^MAG(2005,+MAGIEN,"FBIG"),U,1))
  1. ;
  1. Q
  1. QUEIMAGE(MAGRY,CODE,MAGIEN) ;RPC [MAGG QUE IMAGE]
  1. ; Call to Queue an image for copy from Jukebox
  1. ; NOTE : This is also called from other M routines.
  1. ;
  1. ; CODE is a string code for which images to Queue
  1. ; ["A" Abatract
  1. ; ["F" Full Resolution
  1. ; ["B" Big File
  1. ;
  1. N Y,QUE
  1. S QUE=""
  1. S MAGRY="0^Error setting Que from JukeBox"
  1. ;S MAGRY="1^Image was Queued to copy from JukeBox"
  1. ; GEK 6/27/03 added code (ABS4IMAG) that returns 1|0 1 if this image should have an Abstract
  1. ; This will stop the Queing of Canned Bitmaps for Images of type DOC, PDF, WAV, AVI etc.
  1. I (CODE["A"),$$ONJBOX(MAGIEN,"A"),$$ABS4IMAG^MAGGSFT(MAGIEN) S Y=$$JBTOHD^MAGBAPI(+MAGIEN_"^ABSTRACT",$$DA2PLC^MAGBAPIP(MAGIEN,"A")) S QUE="A" ; DBI - SEB 9/20/2002
  1. I (CODE["F"),$$ONJBOX(MAGIEN,"F") S Y=$$JBTOHD^MAGBAPI(+MAGIEN_"^FULL",$$DA2PLC^MAGBAPIP(MAGIEN,"F")) S QUE=QUE_"F" ; DBI - SEB 9/20/2002
  1. I (CODE["B"),$$ONJBOX(MAGIEN,"B") S Y=$$JBTOHD^MAGBAPI(+MAGIEN_"^BIG",$$DA2PLC^MAGBAPIP(MAGIEN,"B")) S QUE=QUE_"B" ; DBI - SEB 9/20/2002
  1. I QUE="" S MAGRY="1^Copy from JukeBox not needed, Image was NOT Queued."
  1. E S MAGRY="1^Image was Queued to copy from JukeBox ("_QUE_")"
  1. Q
  1. QPREFET(MAGRY,CODE,MAGIEN) ;
  1. ; CODE is a string code for which images to Queue
  1. ; ["A" Abatract
  1. ; ["F" Full Resolution
  1. ; ["B" Big File
  1. ;
  1. N Y,QUE
  1. S QUE=""
  1. S MAGRY="0^Error setting Prefetch Que from JukeBox"
  1. ;S MAGRY="1^Image was Queued to copy from JukeBox"
  1. I (CODE["A"),$$ONJBOX(MAGIEN,"A"),$$ABS4IMAG^MAGGSFT(MAGIEN) S Y=$$PREFET^MAGBAPI(+MAGIEN_"^ABSTRACT",$$DA2PLC^MAGBAPIP(MAGIEN,"A")) S QUE="A" ; DBI - SEB 9/20/2002
  1. I (CODE["F"),$$ONJBOX(MAGIEN,"F") S Y=$$PREFET^MAGBAPI(+MAGIEN_"^FULL",$$DA2PLC^MAGBAPIP(MAGIEN,"F")) S QUE=QUE_"F" ; DBI - SEB 9/20/2002
  1. I (CODE["B"),$$ONJBOX(MAGIEN,"B") S Y=$$PREFET^MAGBAPI(+MAGIEN_"^BIG",$$DA2PLC^MAGBAPIP(MAGIEN,"B")) S QUE=QUE_"B" ; DBI - SEB 9/20/2002
  1. I QUE="" S MAGRY="1^Copy from JukeBox not needed, Image was NOT Queued."
  1. E S MAGRY="1^Image was Queued to copy from JukeBox"
  1. Q
  1. QUELIST(MAGRY,CODE,LIST) ;RPC [MAGG QUE LIST]
  1. ; Call to queue all images in the input list for a copy from jukebox
  1. ;
  1. ; CODE is a string code for which images to Queue
  1. ; ["A" Abatract
  1. ; ["F" Full Resolution
  1. ; ["B" Big File
  1. ; LIST is an array of Image IEN's, we queue images contained in CODE
  1. ;
  1. N Y,CT,XX
  1. S CT=0
  1. S X="" F S X=$O(LIST(X)) Q:X="" D QUEIMAGE(.XX,CODE,X) S CT=CT+1
  1. S MAGRY=CT_"^"_CT_" Image"_$S(CT=1:"",1:"'s")_" Queued to copy from JukeBox"
  1. Q
  1. QUEGROUP(MAGRY,CODE,MAGIEN,QCODE) ;RPC [MAGG QUE IMAGE GROUP]
  1. ; Call to queue all images of an Image group for a copy from JukeBox.
  1. ; This can also be a PREFETCH, in which case the Images being
  1. ; Queued have a lower priority than other copies from JukeBox
  1. ;
  1. ; CODE is a string code for which images to Queue
  1. ; ["A" Abatract
  1. ; ["F" Full Resolution
  1. ; ["B" Big File
  1. ; MAGIEN is assumed to be a group image.
  1. ; QCODE is a QUEUE code. If = 1 then this is a prefetch
  1. ; here we are queing the images contained in CODE
  1. ; for all images in the group.
  1. N X,Y,Z,CT,XX
  1. S QCODE=$G(QCODE)
  1. I '$D(^MAG(2005,+MAGIEN,0)) S MAGRY="0^Invalid Image IEN. Queuing Canceled." Q
  1. S CT=0,X=0
  1. F S X=$O(^MAG(2005,+MAGIEN,1,X)) Q:'X S Z=+^(X,0) D
  1. . I QCODE D QPREFET(.XX,CODE,Z) S CT=CT+1
  1. . I 'QCODE D QUEIMAGE(.XX,CODE,Z) S CT=CT+1
  1. S MAGRY=CT_"^"_CT_" Group Image"_$S(CT=1:"",1:"'s")_" Queued to copy from JukeBox"
  1. Q
  1. QUEPAT(MAGRY,CODE,MAGDFN) ;RPC [MAGG QUE PATIENT]
  1. ; Call to Prefetch all images for a patient.
  1. ; CODE is a string code for which images to Queue
  1. ; ["A" Abatract
  1. ; ["F" Full Resolution
  1. ; ["B" Big File
  1. ; this will queue a JBTOHD copy for all images for the patient.
  1. ; images queued depend on what is contained in CODE
  1. ;
  1. N Y,I,XX
  1. I '$D(^MAG(2005,"AC",+MAGDFN)) S MAGRY="0^No Images on file for "_$P($G(^DPT(+MAGDFN,0)),U,1) Q
  1. S I="" F S I=$O(^MAG(2005,"AC",+MAGDFN,I),-1) Q:'I D
  1. . I $P(^MAG(2005,I,0),U,10) Q
  1. . Q:$$ISDEL^MAGGI11(I)
  1. . I $P(^MAG(2005,I,0),U,6)="11" D QUEGROUP(.XX,CODE,I,1) Q
  1. . D QPREFET(.XX,CODE,I)
  1. S MAGRY="1^"_$P(^DPT(+MAGDFN,0),U)_"'s Images will be copied from the JukeBox."
  1. Q