- MAGGTU71 ;WOIFO/GEK - Silent calls for Queing functions from GUI, cont ; [ 06/20/2001 08:57 ]
- ;;3.0;IMAGING;**46,59**;Nov 27, 2007;Build 20
- ;;Per VHA Directive 2004-038, this routine should not be modified.
- ;; +---------------------------------------------------------------+
- ;; | Property of the US Government. |
- ;; | No permission to copy or redistribute this software is given. |
- ;; | Use of unreleased versions of this software requires the user |
- ;; | to execute a written test agreement with the VistA Imaging |
- ;; | Development Office of the Department of Veterans Affairs, |
- ;; | telephone (301) 734-0100. |
- ;; | The Food and Drug Administration classifies this software as |
- ;; | a medical device. As such, it may not be changed in any way. |
- ;; | Modifications to this software may result in an adulterated |
- ;; | medical device under 21CFR820, the use of which is considered |
- ;; | to be a violation of US Federal Statutes. |
- ;; +---------------------------------------------------------------+
- ;;
- Q
- ABSJB(MAGRY,DATA) ;RPC [MAG ABSJB] SET ABSTRACT AND/OR JUKEBOX QUEUES
- ;
- ; DATA
- ; DESCRIPTION: '^' delimited String:
- ; Piece 1 = the IEN of the image that needs an abstract created.
- ; Piece 2 = the IEN of the image that needs copied to the jukebox
- ;
- ; MAGRY = "1^Successful"
- ; = "0^error message"
- ;
- N MAGIENAB,MAGIENJB,MAGERR,X,QMSG
- S MAGERR=0
- N $ETRAP,$ESTACK S $ETRAP="D ERR^"_$T(+0)
- S MAGRY="0^ERROR: Setting Queue for Abstract or JukeBox copy"
- S MAGIENAB=+$P(DATA,"^",1),MAGIENJB=+$P(DATA,"^",2)
- I MAGIENAB Q:((+$P($G(^MAG(2005,MAGIENAB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENAB,0)),U,12))) "0^Image integrity"
- I MAGIENJB Q:((+$P($G(^MAG(2005,MAGIENJB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENJB,0)),U,12))) "0^Image integrity"
- S QMSG=$S(MAGIENAB:"Setting Abstract Queue",1:"")
- I MAGIENJB S QMSG=$S(QMSG="":"Setting JukeBox Queue",1:" and JukeBox Queue")
- L +(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031)):10 E D QERR Q
- I MAGIENAB S X=$$ABSTRACT^MAGBAPI(MAGIENAB,$$DA2PLC^MAGBAPIP(MAGIENAB,"F"))
- I MAGIENJB S X=$$JUKEBOX^MAGBAPI(MAGIENJB,$$DA2PLC^MAGBAPIP(MAGIENJB,"F"))
- L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
- S MAGRY="1^SUCCESSFUL"
- Q
- ERR ;
- L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
- N ERR S ERR=$$EC^%ZOSV
- S MAGRY="0^Timed out trying to set JukeBox/Abstract Queue. Not Fatal. 'Save' will continue..."
- D LOGERR^MAGGTERR(ERR)
- D @^%ZOSF("ERRTN")
- Q
- QERR ;
- N MAGTXT,EMSG
- S MAGTXT="Failed "_QMSG
- ;ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD)
- D ENTRY^MAGLOG("QFAIL",$G(DUZ),MAGIENJB,"","","",MAGTXT)
- D ACTION^MAGGTAU(MAGTXT,1)
- S EMSG="Timed out trying to Lock Queue File"
- D ACTION^MAGGTAU(EMSG,1)
- S MAGRY="1^"_MAGTXT_" Message was sent to IRM. Not Fatal. 'Save' will continue..."
- N XMSUB,XMY,XMTEXT,XMK,XMDUZ
- S XMTEXT="^TMP($J,""MAGQ"","
- S XMSUB=MAGTXT
- K ^TMP($J,"MAGQ")
- S ^TMP($J,"MAGQ",1)=MAGTXT
- S ^TMP($J,"MAGQ",2)=EMSG
- S ^TMP($J,"MAGQ",3)=" for Image IEN: "_MAGIENJB
- S ^TMP($J,"MAGQ",4)="You need to run the Verifier for this Image IEN"
- S XMY("G.IMAGING DEVELOPMENT@FORUM.DOMAIN.EXT")=""
- D ^XMD
- S XMDUZ=DUZ D KLQ^XMA1B
- K ^TMP($J,"MAGQ")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGTU71 3343 printed Mar 13, 2025@21:08:28 Page 2
- 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
- +2 ;;Per VHA Directive 2004-038, this routine should not be modified.
- +3 ;; +---------------------------------------------------------------+
- +4 ;; | Property of the US Government. |
- +5 ;; | No permission to copy or redistribute this software is given. |
- +6 ;; | Use of unreleased versions of this software requires the user |
- +7 ;; | to execute a written test agreement with the VistA Imaging |
- +8 ;; | Development Office of the Department of Veterans Affairs, |
- +9 ;; | telephone (301) 734-0100. |
- +10 ;; | The Food and Drug Administration classifies this software as |
- +11 ;; | a medical device. As such, it may not be changed in any way. |
- +12 ;; | Modifications to this software may result in an adulterated |
- +13 ;; | medical device under 21CFR820, the use of which is considered |
- +14 ;; | to be a violation of US Federal Statutes. |
- +15 ;; +---------------------------------------------------------------+
- +16 ;;
- +17 QUIT
- ABSJB(MAGRY,DATA) ;RPC [MAG ABSJB] SET ABSTRACT AND/OR JUKEBOX QUEUES
- +1 ;
- +2 ; DATA
- +3 ; DESCRIPTION: '^' delimited String:
- +4 ; Piece 1 = the IEN of the image that needs an abstract created.
- +5 ; Piece 2 = the IEN of the image that needs copied to the jukebox
- +6 ;
- +7 ; MAGRY = "1^Successful"
- +8 ; = "0^error message"
- +9 ;
- +10 NEW MAGIENAB,MAGIENJB,MAGERR,X,QMSG
- +11 SET MAGERR=0
- +12 NEW $ETRAP,$ESTACK
- SET $ETRAP="D ERR^"_$TEXT(+0)
- +13 SET MAGRY="0^ERROR: Setting Queue for Abstract or JukeBox copy"
- +14 SET MAGIENAB=+$PIECE(DATA,"^",1)
- SET MAGIENJB=+$PIECE(DATA,"^",2)
- +15 IF MAGIENAB
- if ((+$PIECE($GET(^MAG(2005,MAGIENAB,0)),U,11))!(+$PIECE($GET(^MAG(2005,MAGIENAB,0)),U,12)))
- QUIT "0^Image integrity"
- +16 IF MAGIENJB
- if ((+$PIECE($GET(^MAG(2005,MAGIENJB,0)),U,11))!(+$PIECE($GET(^MAG(2005,MAGIENJB,0)),U,12)))
- QUIT "0^Image integrity"
- +17 SET QMSG=$SELECT(MAGIENAB:"Setting Abstract Queue",1:"")
- +18 IF MAGIENJB
- SET QMSG=$SELECT(QMSG="":"Setting JukeBox Queue",1:" and JukeBox Queue")
- +19 LOCK +(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031)):10
- IF '$TEST
- DO QERR
- QUIT
- +20 IF MAGIENAB
- SET X=$$ABSTRACT^MAGBAPI(MAGIENAB,$$DA2PLC^MAGBAPIP(MAGIENAB,"F"))
- +21 IF MAGIENJB
- SET X=$$JUKEBOX^MAGBAPI(MAGIENJB,$$DA2PLC^MAGBAPIP(MAGIENJB,"F"))
- +22 LOCK -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
- +23 SET MAGRY="1^SUCCESSFUL"
- +24 QUIT
- ERR ;
- +1 LOCK -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
- +2 NEW ERR
- SET ERR=$$EC^%ZOSV
- +3 SET MAGRY="0^Timed out trying to set JukeBox/Abstract Queue. Not Fatal. 'Save' will continue..."
- +4 DO LOGERR^MAGGTERR(ERR)
- +5 DO @^%ZOSF("ERRTN")
- +6 QUIT
- QERR ;
- +1 NEW MAGTXT,EMSG
- +2 SET MAGTXT="Failed "_QMSG
- +3 ;ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD)
- +4 DO ENTRY^MAGLOG("QFAIL",$GET(DUZ),MAGIENJB,"","","",MAGTXT)
- +5 DO ACTION^MAGGTAU(MAGTXT,1)
- +6 SET EMSG="Timed out trying to Lock Queue File"
- +7 DO ACTION^MAGGTAU(EMSG,1)
- +8 SET MAGRY="1^"_MAGTXT_" Message was sent to IRM. Not Fatal. 'Save' will continue..."
- +9 NEW XMSUB,XMY,XMTEXT,XMK,XMDUZ
- +10 SET XMTEXT="^TMP($J,""MAGQ"","
- +11 SET XMSUB=MAGTXT
- +12 KILL ^TMP($JOB,"MAGQ")
- +13 SET ^TMP($JOB,"MAGQ",1)=MAGTXT
- +14 SET ^TMP($JOB,"MAGQ",2)=EMSG
- +15 SET ^TMP($JOB,"MAGQ",3)=" for Image IEN: "_MAGIENJB
- +16 SET ^TMP($JOB,"MAGQ",4)="You need to run the Verifier for this Image IEN"
- +17 SET XMY("G.IMAGING DEVELOPMENT@FORUM.DOMAIN.EXT")=""
- +18 DO ^XMD
- +19 SET XMDUZ=DUZ
- DO KLQ^XMA1B
- +20 KILL ^TMP($JOB,"MAGQ")
- +21 QUIT