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

MAGGTU71.m

Go to the documentation of this file.
  1. MAGGTU71 ;WOIFO/GEK - Silent calls for Queing functions from GUI, cont ; [ 06/20/2001 08:57 ]
  1. ;;3.0;IMAGING;**46,59**;Nov 27, 2007;Build 20
  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. ABSJB(MAGRY,DATA) ;RPC [MAG ABSJB] SET ABSTRACT AND/OR JUKEBOX QUEUES
  1. ;
  1. ; DATA
  1. ; DESCRIPTION: '^' delimited String:
  1. ; Piece 1 = the IEN of the image that needs an abstract created.
  1. ; Piece 2 = the IEN of the image that needs copied to the jukebox
  1. ;
  1. ; MAGRY = "1^Successful"
  1. ; = "0^error message"
  1. ;
  1. N MAGIENAB,MAGIENJB,MAGERR,X,QMSG
  1. S MAGERR=0
  1. N $ETRAP,$ESTACK S $ETRAP="D ERR^"_$T(+0)
  1. S MAGRY="0^ERROR: Setting Queue for Abstract or JukeBox copy"
  1. S MAGIENAB=+$P(DATA,"^",1),MAGIENJB=+$P(DATA,"^",2)
  1. I MAGIENAB Q:((+$P($G(^MAG(2005,MAGIENAB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENAB,0)),U,12))) "0^Image integrity"
  1. I MAGIENJB Q:((+$P($G(^MAG(2005,MAGIENJB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENJB,0)),U,12))) "0^Image integrity"
  1. S QMSG=$S(MAGIENAB:"Setting Abstract Queue",1:"")
  1. I MAGIENJB S QMSG=$S(QMSG="":"Setting JukeBox Queue",1:" and JukeBox Queue")
  1. L +(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031)):10 E D QERR Q
  1. I MAGIENAB S X=$$ABSTRACT^MAGBAPI(MAGIENAB,$$DA2PLC^MAGBAPIP(MAGIENAB,"F"))
  1. I MAGIENJB S X=$$JUKEBOX^MAGBAPI(MAGIENJB,$$DA2PLC^MAGBAPIP(MAGIENJB,"F"))
  1. L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
  1. S MAGRY="1^SUCCESSFUL"
  1. Q
  1. ERR ;
  1. L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
  1. N ERR S ERR=$$EC^%ZOSV
  1. S MAGRY="0^Timed out trying to set JukeBox/Abstract Queue. Not Fatal. 'Save' will continue..."
  1. D LOGERR^MAGGTERR(ERR)
  1. D @^%ZOSF("ERRTN")
  1. Q
  1. QERR ;
  1. N MAGTXT,EMSG
  1. S MAGTXT="Failed "_QMSG
  1. ;ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD)
  1. D ENTRY^MAGLOG("QFAIL",$G(DUZ),MAGIENJB,"","","",MAGTXT)
  1. D ACTION^MAGGTAU(MAGTXT,1)
  1. S EMSG="Timed out trying to Lock Queue File"
  1. D ACTION^MAGGTAU(EMSG,1)
  1. S MAGRY="1^"_MAGTXT_" Message was sent to IRM. Not Fatal. 'Save' will continue..."
  1. N XMSUB,XMY,XMTEXT,XMK,XMDUZ
  1. S XMTEXT="^TMP($J,""MAGQ"","
  1. S XMSUB=MAGTXT
  1. K ^TMP($J,"MAGQ")
  1. S ^TMP($J,"MAGQ",1)=MAGTXT
  1. S ^TMP($J,"MAGQ",2)=EMSG
  1. S ^TMP($J,"MAGQ",3)=" for Image IEN: "_MAGIENJB
  1. S ^TMP($J,"MAGQ",4)="You need to run the Verifier for this Image IEN"
  1. S XMY("G.IMAGING DEVELOPMENT@FORUM.DOMAIN.EXT")=""
  1. D ^XMD
  1. S XMDUZ=DUZ D KLQ^XMA1B
  1. K ^TMP($J,"MAGQ")
  1. Q