source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGQBD.m@ 789

Last change on this file since 789 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1MAGQBD ;WOIFO/PMK/RMP - Arbitrary file deletion [ 06/20/2001 08:57 ]
2 ;;3.0;IMAGING;**20**;Apr 12, 2006
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 ;; | |
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 ; !!! QUEUER MUST HANDLE NULLING MAGNETIC WRITE LOCATION !!
19ENTRY(RESULT,QPTR) ; entry point from ^MAGBMAIN
20 N FILE,X,IEN,FN,ARCH,NODE,PLACE,GB,CJB,CJBP
21 S PLACE=$$PLACE^MAGBAPI(+$G(DUZ(2))),(GB,ARCH)=""
22 S U="^",X=^MAGQUEUE(2006.03,QPTR,0)
23 S FILE=$P(X,"^",10)
24 S FN=$P(FILE,"\",$L(FILE,"\"))
25 S IEN=$O(^MAG(2005.1,"F",$P(FN,"."),""))
26 I 'IEN S RESULT="-1"_U_QPTR_U_"No 2005.1 Entry established for Image file: "_$P(FN,".")_U_U Q
27 S NODE=$G(^MAG(2005.1,IEN,0))
28 I $P(FILE,".",2)'["BIG" S ARCH=$S($P(NODE,U,5):$P(NODE,U,5),1:"")
29 E S ARCH=$S($P($G(^MAG(2005.1,IEN,"FBIG")),U,2):$P($G(^MAG(2005.1,IEN,"FBIG")),U,2),1:"")
30 S CJB=$P($G(^MAGQUEUE(2006.032,$P($G(^MAG(2006.1,PLACE,1)),U,6),0)),U,3)
31 S CJBP=$$UPPER^MAGQE4($P($G(^MAG(2005.2,CJB,0)),U,2)_$$DIRHASH^MAGFILEB(FN,CJB))
32 S GB=$S(ARCH:$$UPPER^MAGQE4($P($G(^MAG(2005.2,ARCH,0)),U,2)_$$DIRHASH^MAGFILEB(FN,ARCH)),1:"")
33 I ($L(GB)<1)&($L(CJBP)<1) S RESULT="-1"_U_QPTR_U_"No Archive Global established for entry: "_IEN_U_QPTR_U_U
34 E S RESULT="1"_U_FILE_U_QPTR_U_+$P(X,U,9)_U_GB_U_IEN_U_ARCH_U_CJB_U_CJBP
35 Q
Note: See TracBrowser for help on using the repository browser.