source: WorldVistAEHR/trunk/r/IMAGING-MAG-ZMAG/MAGGSFT.m@ 1036

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

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1MAGGSFT ;WOIFO/GEK - Utilities
2 ;;3.0;IMAGING;**7,8**;Sep 15, 2004
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 Q
19LIST(MAGRY) ;RPC [MAG4 GET SUPPORTED EXTENSIONS]
20 ;to return a list of supported image file extensions
21 N I,Y,CT,MAGN0
22 ;NAME [1F] ^ DESCRIPTION [2F] ^VIEWER [3S] ^
23 ; Bitmap for Abstract [4F] ^Abstract Created [5S] ^ Default Object Type [6P]
24 ;
25 ; 2nd "|" piece is system info = Ien of 2005.021 ^ NAME ^ Default Object Type [6P]
26 S MAGRY(0)="0^Compiling list of supported extensions..."
27 S MAGRY(1)="Ext^Description^Imaging Viewer^Abs Bitmap^Abs Created"
28 S CT=1
29 S I=0 F S I=$O(^MAG(2005.021,I)) Q:'I S MAGN0=^(I,0) D
30 . S CT=CT+1
31 . S MAGRY(CT)=$P(MAGN0,U,1,5)_"|"_I_U_$P(MAGN0,U)_U_$P(MAGN0,U,6)
32 S MAGRY(0)="1^Okay"
33 Q
34EXTSUPP(MAGRY,MAGEXT) ;
35 ; ? ? AM I MISSING CODE HERE. DID WE LOSE SOME LIKE BEFORE.
36 Q
37INFO(MAGRY,MAGEXT) ;RPC [MAG4 GET FILE FORMAT INFO]
38 ;IMAGE FILE TYPES FILE ^MAG(2005.021
39 ;NAME [1F] ^ DESCRIPTION [2F] ^VIEWER [3S] ^
40 ; Bitmap for Abstract [4F] ^Abstract Created [5S] ^ Default Object Type [6P]
41 ;
42 ;"Ext^Description^Imaging Viewer^Abs Bitmap^Abs Created"
43 ; "|" IEN ^ NAME ^ Default Object Type [6P]
44 N MAGN0,MAGIEN
45 S MAGRY(0)="1^OK"
46 S MAGEXT=$$UP^XLFSTR(MAGEXT)
47 S MAGIEN=$O(^MAG(2005.021,"B",MAGEXT,""))
48 I 'MAGIEN S MAGRY(0)="0^Unsupported File Extension : "_MAGEXT Q
49 S MAGN0=^MAG(2005.021,MAGIEN,0)
50 S MAGRY(1)=$P(MAGN0,U,1,5)_"|"_MAGIEN_U_$P(MAGN0,U)_U_$P(MAGN0,U,6)
51 Q
52ABS4IMAG(MAGIEN) ; True, False If the Image (MAGIEN) has an abstract
53 ; We base this on the Extension of image, in the IMAGE FILE TYPES file.
54 N X,FTIEN
55 S X=$P($P($G(^MAG(2005,MAGIEN,0)),"^",2),".",2)
56 I '$L(X) Q 0
57 S FTIEN=$O(^MAG(2005.021,"B",X,""))
58 I 'FTIEN Q 0
59 Q $P(^MAG(2005.021,FTIEN,0),"^",5)
Note: See TracBrowser for help on using the repository browser.