[623] | 1 | MAGGTU71 ;WOIFO/GEK - Silent calls for Queing functions from GUI, cont ; [ 06/20/2001 08:57 ]
|
---|
| 2 | ;;3.0;IMAGING;**46**;16-February-2007;;Build 1023
|
---|
| 3 | ;; Per VHA Directive 2004-038, this routine should not be modified.
|
---|
| 4 | ;; +---------------------------------------------------------------+
|
---|
| 5 | ;; | Property of the US Government. |
|
---|
| 6 | ;; | No permission to copy or redistribute this software is given. |
|
---|
| 7 | ;; | Use of unreleased versions of this software requires the user |
|
---|
| 8 | ;; | to execute a written test agreement with the VistA Imaging |
|
---|
| 9 | ;; | Development Office of the Department of Veterans Affairs, |
|
---|
| 10 | ;; | telephone (301) 734-0100. |
|
---|
| 11 | ;; | The Food and Drug Administration classifies this software as |
|
---|
| 12 | ;; | a medical device. As such, it may not be changed in any way. |
|
---|
| 13 | ;; | Modifications to this software may result in an adulterated |
|
---|
| 14 | ;; | medical device under 21CFR820, the use of which is considered |
|
---|
| 15 | ;; | to be a violation of US Federal Statutes. |
|
---|
| 16 | ;; +---------------------------------------------------------------+
|
---|
| 17 | ;;
|
---|
| 18 | Q
|
---|
| 19 | ABSJB(MAGRY,MAGIN) ;RPC [MAG ABSJB] SET ABSTRACT AND/OR JUKEBOX QUEUES
|
---|
| 20 | ;
|
---|
| 21 | ; MAGIN
|
---|
| 22 | ; DESCRIPTION: '^' delimited String:
|
---|
| 23 | ; Piece 1 = the IEN of the image that needs an abstract created.
|
---|
| 24 | ; Piece 2 = the IEN of the image that needs copied to the jukebox
|
---|
| 25 | ;
|
---|
| 26 | ; MAGRY = "1^Successful"
|
---|
| 27 | ; = "0^error message"
|
---|
| 28 | ;
|
---|
| 29 | N MAGIENAB,MAGIENJB,MAGERR,X,QMSG
|
---|
| 30 | S MAGERR=0
|
---|
| 31 | N $ETRAP,$ESTACK S $ETRAP="D ERR^"_$T(+0)
|
---|
| 32 | S MAGRY="0^ERROR: Setting Queue for Abstract or JukeBox copy"
|
---|
| 33 | S MAGIENAB=+$P(MAGIN,"^",1),MAGIENJB=+$P(MAGIN,"^",2)
|
---|
| 34 | I MAGIENAB Q:((+$P($G(^MAG(2005,MAGIENAB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENAB,0)),U,12))) "0^Image integrity"
|
---|
| 35 | I MAGIENJB Q:((+$P($G(^MAG(2005,MAGIENJB,0)),U,11))!(+$P($G(^MAG(2005,MAGIENJB,0)),U,12))) "0^Image integrity"
|
---|
| 36 | S QMSG=$S(MAGIENAB:"Setting Abstract Queue",1:"")
|
---|
| 37 | I MAGIENJB S QMSG=$S(QMSG="":"Setting JukeBox Queue",1:" and JukeBox Queue")
|
---|
| 38 | L +(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031)):10 E D QERR Q
|
---|
| 39 | I MAGIENAB S X=$$ABSTRACT^MAGBAPI(MAGIENAB,$$DA2PLC^MAGBAPIP(MAGIENAB,"F"))
|
---|
| 40 | I MAGIENJB S X=$$JUKEBOX^MAGBAPI(MAGIENJB,$$DA2PLC^MAGBAPIP(MAGIENJB,"F"))
|
---|
| 41 | L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
|
---|
| 42 | S MAGRY="1^SUCCESSFUL"
|
---|
| 43 | Q
|
---|
| 44 | ERR ;
|
---|
| 45 | L -(^MAGQUEUE(2006.03,0),^MAGQUEUE(2006.031))
|
---|
| 46 | N ERR S ERR=$$EC^%ZOSV
|
---|
| 47 | S MAGRY="0^Timed out trying to set JukeBox/Abstract Queue. Not Fatal. 'Save' will continue..."
|
---|
| 48 | D LOGERR^MAGGTERR(ERR)
|
---|
| 49 | D @^%ZOSF("ERRTN")
|
---|
| 50 | Q
|
---|
| 51 | QERR ;
|
---|
| 52 | N MAGTXT,EMSG
|
---|
| 53 | S MAGTXT="Failed "_QMSG
|
---|
| 54 | ;ENTRY(MAGIMT,MAGDUZ,MAGO,MAGPACK,MAGDFN,MAGCT,MAGAD)
|
---|
| 55 | D ENTRY^MAGLOG("QFAIL",$G(DUZ),MAGIENJB,"","","",MAGTXT)
|
---|
| 56 | D ACTION^MAGGTAU(MAGTXT,1)
|
---|
| 57 | S EMSG="Timed out trying to Lock Queue File"
|
---|
| 58 | D ACTION^MAGGTAU(EMSG,1)
|
---|
| 59 | S MAGRY="1^"_MAGTXT_" Message was sent to IRM. Not Fatal. 'Save' will continue..."
|
---|
| 60 | N XMSUB,XMY,XMTEXT,XMK,XMDUZ
|
---|
| 61 | S XMTEXT="^TMP($J,""MAGQ"","
|
---|
| 62 | S XMSUB=MAGTXT
|
---|
| 63 | K ^TMP($J,"MAGQ")
|
---|
| 64 | S ^TMP($J,"MAGQ",1)=MAGTXT
|
---|
| 65 | S ^TMP($J,"MAGQ",2)=EMSG
|
---|
| 66 | S ^TMP($J,"MAGQ",3)=" for Image IEN: "_MAGIENJB
|
---|
| 67 | S ^TMP($J,"MAGQ",4)="You need to run the Verifier for this Image IEN"
|
---|
| 68 | S XMY("G.IMAGING DEVELOPMENT@FORUM.VA.GOV")=""
|
---|
| 69 | D ^XMD
|
---|
| 70 | S XMDUZ=DUZ D KLQ^XMA1B
|
---|
| 71 | K ^TMP($J,"MAGQ")
|
---|
| 72 | Q
|
---|