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

MAGGTU1.m

Go to the documentation of this file.
  1. MAGGTU1 ;WOIFO/GEK - Silent Utilities ; [ 06/20/2001 08:57 ]
  1. ;;3.0;IMAGING;**3,8,85,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. ;; | |
  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. DRIVE(X,SITE) ; Get the current drive for writing an image
  1. ; Copied from MAGFILE and edited for silent running, made extrinsic.
  1. ; X : The Network Location to Write to. Dicom Gateway sends this.
  1. ; IF 'X then use DUZ(2) to find IMAGE NETWORK WRITE LOCATION.
  1. ; P 85, Enable writing to any valid site. Not Just Duz(2)
  1. ; SITE : The Site to Write to. Import API now sends this.
  1. ;
  1. ;
  1. N Z,MAGREF,MAGREFNM,MAGDRIVE,MAGPLC
  1. S SITE=$S($G(SITE):SITE,1:$G(DUZ(2)))
  1. S MAGPLC=$$PLACE^MAGBAPI(SITE) ;pre-patch 85 was DUZ(2)
  1. S MAGREF=$G(X)
  1. I $G(MAGWRITE)="PACS" S MAGREF=$$GET1^DIQ(2006.1,MAGPLC,1.03,"I") ; DBI 9/20/02 - SEB
  1. I 'MAGREF S MAGREF=$$GET1^DIQ(2006.1,MAGPLC,.03,"I") ; DBI 9/20/02 - SEB
  1. I MAGREF="" D Q Z
  1. . S Z="0^NEED WRITE LOCATION in SITE Parameters file!!! Call IRM"
  1. ;
  1. I '$P(^MAG(2005.2,MAGREF,0),"^",6) D Q Z
  1. . S Z="0^The Server that you are writing to is off-line. Call IRM"
  1. ;
  1. S MAGREFNM=$P(^MAG(2005.2,MAGREF,0),"^",1),MAGDRIVE=$P(^(0),"^",2)
  1. Q MAGREF_U_MAGDRIVE
  1. ;
  1. DA2NAME(IEN,SUF) ; Return file name with extension
  1. ; SUF should always be defined, but default to .TIF if not.
  1. N PRE,FILE,CMPF,MAGPLC
  1. S MAGPLC=$$DA2PLC^MAGBAPIP(IEN,"F")
  1. S SUF=$S($L($G(SUF)):SUF,1:"TIF")
  1. S PRE=$$GET1^DIQ(2006.1,MAGPLC,.02,"E") ; gek DBI
  1. ;S PRE=$G(^MAG(2006.1,"ALTR"))
  1. I '$L(PRE) Q "0^Need Site Specific LETTERS in Site Parameters File"
  1. ;
  1. S FILE=PRE_IEN
  1. ; Design of Patch 3 was changed to only return 14 digit file names.
  1. ; 08/02/2002 Patch 3,8 force 14.3 file name convention
  1. I ($L(FILE)<14) S FILE=PRE_$E(10000000000000+IEN,$L(PRE)+1,14)
  1. Q "1^"_FILE_"."_SUF