source: FOIAVistA/tag/r/IMAGING-MAG-ZMAG/MAGGSU1.m@ 1251

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1MAGGSU1 ;WOIFO/GEK - Utilities for Imaging ; 01 Nov 2001 12:32 PM
2 ;;3.0;IMAGING;**7**;Jul 12, 2002
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
19IMGDTTM(X,EXT,INT) ; We call here from anywhere in Imaging, to get
20 ; Internal and External dates/times. That way all imaging windows will
21 ; have same date format.
22 ;X IS THE INPUT. Internal or External or Partial
23 ;EXT is the external form of the date. Passed by reference
24 ;INT is the internal form of the date. Passed by reference
25 ;Return is 1^
26 ; or 0^error message (invalid format)
27 ; EXTERNAL FORMAT RETURNED BY THIS CALL IS
28 ; MM/DD/YYYY i.e. 01/01/2000
29 N MAGY,Y
30 D DT^DILF("TE",X,.MAGY)
31 I $G(MAGY,-1)=-1 Q ""
32 ; Standard external returned by DT^DILF is Jan 01, 2000
33 ; If we wanted that as imaging format, we could stop here
34 ; and Return MAGY(0) as External
35 S INT=MAGY
36 S EXT=$$FMTE^XLFDT(MAGY,"5Z")
37 Q 1
38IMGDT(X,EXT,INT) ;Return just the date, no time
39 N Y
40 S Y=$$IMGDTTM(X,.EXT,.INT)
41 S EXT=$P(EXT,"@")
42 Q Y
43EXTDT(X) ;
44 N Y,EXT
45 S Y=$$IMGDTTM(X,.EXT) I 'Y Q Y
46 Q $P(EXT,"@")
47EXTDTTM(X) ;
48 N Y,EXT
49 S Y=$$IMGDTTM(X,.EXT) I 'Y Q Y
50 Q EXT
51INTDT(X) ;
52 N Y,INT,EXT
53 S Y=$$IMGDT(X,.EXT,.INT) I 'Y Q Y
54 Q INT
Note: See TracBrowser for help on using the repository browser.