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

MAGGSU1.m

Go to the documentation of this file.
  1. MAGGSU1 ;WOIFO/GEK - Utilities for Imaging ; 01 Nov 2001 12:32 PM
  1. ;;3.0;IMAGING;**7**;Jul 12, 2002
  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. IMGDTTM(X,EXT,INT) ; We call here from anywhere in Imaging, to get
  1. ; Internal and External dates/times. That way all imaging windows will
  1. ; have same date format.
  1. ;X IS THE INPUT. Internal or External or Partial
  1. ;EXT is the external form of the date. Passed by reference
  1. ;INT is the internal form of the date. Passed by reference
  1. ;Return is 1^
  1. ; or 0^error message (invalid format)
  1. ; EXTERNAL FORMAT RETURNED BY THIS CALL IS
  1. ; MM/DD/YYYY i.e. 01/01/2000
  1. N MAGY,Y
  1. D DT^DILF("TE",X,.MAGY)
  1. I $G(MAGY,-1)=-1 Q ""
  1. ; Standard external returned by DT^DILF is Jan 01, 2000
  1. ; If we wanted that as imaging format, we could stop here
  1. ; and Return MAGY(0) as External
  1. S INT=MAGY
  1. S EXT=$$FMTE^XLFDT(MAGY,"5Z")
  1. Q 1
  1. IMGDT(X,EXT,INT) ;Return just the date, no time
  1. N Y
  1. S Y=$$IMGDTTM(X,.EXT,.INT)
  1. S EXT=$P(EXT,"@")
  1. Q Y
  1. EXTDT(X) ;
  1. N Y,EXT
  1. S Y=$$IMGDTTM(X,.EXT) I 'Y Q Y
  1. Q $P(EXT,"@")
  1. EXTDTTM(X) ;
  1. N Y,EXT
  1. S Y=$$IMGDTTM(X,.EXT) I 'Y Q Y
  1. Q EXT
  1. INTDT(X) ;
  1. N Y,INT,EXT
  1. S Y=$$IMGDT(X,.EXT,.INT) I 'Y Q Y
  1. Q INT