source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGQBAB.m@ 834

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1MAGQBAB ;WOIFO/PMK/RMP - Create an ABSTRACT from an image file [ 06/20/2001 08:57 ]
2 ;;3.0;IMAGING;**1,8,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 ;;
18ENTRY(RESULT,QPTR) ;
19 ; RESULT=STATUS^IMAGE PTR^FROM FILEPATH^ABSTRACT FILEPATH^QPTR^VWP^QSN
20 ; VWP=VISTA WRITE LOCATION,QSN=QUEUE SEQUENCE NUMBER
21 N IMGPTR,L,X,MAGXX,FILENAME,FILE,ABSNAME,JBPATH
22 N MAGNODE,MAGFILE,MAGFILE2,QSN,QNODE,MAGDRIVE,CWL,PLACE
23 S PLACE=$$PLACE^MAGBAPI(+$G(DUZ(2)))
24 S U="^",QNODE=$G(^MAGQUEUE(2006.03,QPTR,0))
25 S IMGPTR=$P(QNODE,U,7),QSN=+$P(QNODE,U,9)
26 S MAGNODE=$G(^MAG(2005,IMGPTR,0))
27 I $P(MAGNODE,U,2)="" D Q
28 . S RESULT="-1^"_QPTR_U_"The Image file entry has no file name for IEN: "_IMGPTR_"^^^^"_QSN
29 . Q
30 I $P(MAGNODE,U,4)?1N.N D Q
31 . S RESULT="-1^"_QPTR_U_$P($P(MAGNODE,U,2),".")_" has an .ABS file already referenced on the Vista cache ^^^^"_QSN
32 . Q
33 I $P(MAGNODE,U,3)="" D Q
34 . I $P(MAGNODE,U,5)?1N.N D Q
35 . . N QN,TMP
36 . . S QN=$$JBTOHD^MAGBAPI(IMGPTR_U_"FULL",PLACE)
37 . . S TMP=IMGPTR_" Full File is not on the VC, a JBTOHD queue will retrieve and the ABSTRACT will be requeued"
38 . . S RESULT="-15^"_QPTR_U_TMP_"^^"_QPTR_"^^"_QSN
39 . . Q
40 . S RESULT="-2^"_QPTR_U_IMGPTR_" File not available on the Vista network^^"_QPTR_"^^"_QSN
41 ; get the path and file name for this image
42 S MAGXX=IMGPTR D VSTNOCP^MAGFILEB I $P(MAGFILE1,U)="-1" D Q
43 . S RESULT="-3^"_QPTR_U_IMGPTR_" File not on-line^^"_QPTR_"^^"_QSN
44 S FILENAME=MAGFILE
45 S L=$L(FILENAME) I '$A(FILENAME,L) S FILENAME=$E(FILENAME,1,L-1)
46 S L=$L(FILENAME,"\") ; parse the file
47 S FILE=$P(FILENAME,"\",L)
48 K MAGFILE1
49 ;
50 S JBPATH=$P(MAGNODE,U,5)
51 S JBPATH=$S('JBPATH:"",1:$P(^MAG(2005.2,JBPATH,0),U,2)_$$DIRHASH^MAGFILEB(FILE,JBPATH))
52 S CWL=$$CWL^MAGBAPI(PLACE),MAGDRIVE=$P(^MAG(2005.2,CWL,0),U,2)
53 S ABSNAME=MAGDRIVE_$$DIRHASH^MAGFILEB(FILE,CWL)
54 S ABSNAME=ABSNAME_$P(FILE,".")_".ABS"
55 S RESULT="1"_U_IMGPTR_U_FILENAME_U_ABSNAME_U_QPTR_U_CWL_U_QSN_U_JBPATH
56 Q
Note: See TracBrowser for help on using the repository browser.