MAGGTSY2 ;WOIFO/GEK/NST - Calls from Imaging windows for System Manager ; 22 Dec 2010 10:50 AM
;;3.0;IMAGING;**59,117**;Mar 19, 2002;Build 2238;Jul 15, 2011
;; 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
MAG(MAGRY,NODE) ;RPC Call to show node of Image File
; NODE is the IEN of Image File : ^MAG(2005,NODE
N I,CT,X,TNODE,MAGFILE
S MAGRY=$NA(^TMP("MAGNODE",$J))
S NODE=$G(NODE)
K @MAGRY
S @MAGRY@(0)="Display NODE: "_$S($L(NODE):NODE,1:"LAST")
S I=0,CT=0
I $E(NODE)="^" G OTH
I 'NODE S NODE=$P(^MAG(2005,0),U,3)
S MAGFILE=$$FILE^MAGGI11(NODE)
I MAGFILE'>0 Q ; problem getting file number
S I="^MAG(MAGFILE,"_NODE_","""")"
F S X=$Q(@I) S I=X Q:$P(X,",",2)'=NODE D
. S CT=CT+1,@MAGRY@(CT)=X_" "_@X
. Q
I $P($G(^MAG(MAGFILE,NODE,2)),"^",6)="8925" D
. S CT=CT+1,@MAGRY@(CT)=" ******* TIU ******* "
. S TNODE=$P(^MAG(MAGFILE,NODE,2),"^",7)
. S I="^TIU(8925,"_TNODE_","""")"
. F S X=$Q(@I) S I=X Q:$P(X,",",2)'=TNODE D
. . S CT=CT+1,@MAGRY@(CT)=X_" "_@X
. . Q
Q
OTH ;
N OTHDA
S OTHDA=$P(NODE,",",2)
I OTHDA=0 S NODE=NODE_")" Q:'$D(@NODE) S CT=$O(@MAGRY@(""),-1)+1,@MAGRY@(CT)=$G(@(NODE)) Q
S I=NODE_","""")"
F S X=$Q(@I) S I=X Q:$P(X,",",2)'=OTHDA D
. S CT=$O(@MAGRY@(""),-1)+1,@MAGRY@(CT)=X_" "_@X
. Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HMAGGTSY2 2237 printed Oct 16, 2024@18:04:02 Page 2
MAGGTSY2 ;WOIFO/GEK/NST - Calls from Imaging windows for System Manager ; 22 Dec 2010 10:50 AM
+1 ;;3.0;IMAGING;**59,117**;Mar 19, 2002;Build 2238;Jul 15, 2011
+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
MAG(MAGRY,NODE) ;RPC Call to show node of Image File
+1 ; NODE is the IEN of Image File : ^MAG(2005,NODE
+2 NEW I,CT,X,TNODE,MAGFILE
+3 SET MAGRY=$NAME(^TMP("MAGNODE",$JOB))
+4 SET NODE=$GET(NODE)
+5 KILL @MAGRY
+6 SET @MAGRY@(0)="Display NODE: "_$SELECT($LENGTH(NODE):NODE,1:"LAST")
+7 SET I=0
SET CT=0
+8 IF $EXTRACT(NODE)="^"
GOTO OTH
+9 IF 'NODE
SET NODE=$PIECE(^MAG(2005,0),U,3)
+10 SET MAGFILE=$$FILE^MAGGI11(NODE)
+11 ; problem getting file number
IF MAGFILE'>0
QUIT
+12 SET I="^MAG(MAGFILE,"_NODE_","""")"
+13 FOR
SET X=$QUERY(@I)
SET I=X
if $PIECE(X,",",2)'=NODE
QUIT
Begin DoDot:1
+14 SET CT=CT+1
SET @MAGRY@(CT)=X_" "_@X
+15 QUIT
End DoDot:1
+16 IF $PIECE($GET(^MAG(MAGFILE,NODE,2)),"^",6)="8925"
Begin DoDot:1
+17 SET CT=CT+1
SET @MAGRY@(CT)=" ******* TIU ******* "
+18 SET TNODE=$PIECE(^MAG(MAGFILE,NODE,2),"^",7)
+19 SET I="^TIU(8925,"_TNODE_","""")"
+20 FOR
SET X=$QUERY(@I)
SET I=X
if $PIECE(X,",",2)'=TNODE
QUIT
Begin DoDot:2
+21 SET CT=CT+1
SET @MAGRY@(CT)=X_" "_@X
+22 QUIT
End DoDot:2
End DoDot:1
+23 QUIT
OTH ;
+1 NEW OTHDA
+2 SET OTHDA=$PIECE(NODE,",",2)
+3 IF OTHDA=0
SET NODE=NODE_")"
if '$DATA(@NODE)
QUIT
SET CT=$ORDER(@MAGRY@(""),-1)+1
SET @MAGRY@(CT)=$GET(@(NODE))
QUIT
+4 SET I=NODE_","""")"
+5 FOR
SET X=$QUERY(@I)
SET I=X
if $PIECE(X,",",2)'=OTHDA
QUIT
Begin DoDot:1
+6 SET CT=$ORDER(@MAGRY@(""),-1)+1
SET @MAGRY@(CT)=X_" "_@X
+7 QUIT
End DoDot:1
+8 QUIT