DITIME ;O-OIFO/GFT - INPUT TRANSFROM FOR 'TIME' DATA TYPE ;05OCT2016
;;22.2;VA FileMan;**2,5**;Jan 05, 2016;Build 28
;;Per VA Directive 6402, this routine should not be modified.
;
;ENTER WITH X
N Y,%DT I X?1.A1(1"+",1"-")1.N1(1"D",1"M",1"W") G KX ;NO DAYS, WEEKS, OR MONTHS
I X?.N D Q:'$D(X)
.S Y=$G(DIPA("SECONDS ALLOWED"))
.I 'Y S Y=$E(X,5,999),X=$E(X,1,4) I Y'="00"&(Y]"") K X Q
.S X=$E(X,1,6)
S:X?1N.E X="T@"_X
S %DT=$P("S",U,$G(DIPA("SECONDS ALLOWED"))'=0)_"R"
D ^%DT
S X=$E(Y_"000000",9,14)
G:Y<0 KX
I '$D(DIQUIET) S Y=X X $$METH4TYP^DIETLIBF("OUTPUT TRANSFORM",13) W " (",Y,")"
Q
KX K X Q
;
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDITIME 642 printed Dec 13, 2024@02:54:15 Page 2
DITIME ;O-OIFO/GFT - INPUT TRANSFROM FOR 'TIME' DATA TYPE ;05OCT2016
+1 ;;22.2;VA FileMan;**2,5**;Jan 05, 2016;Build 28
+2 ;;Per VA Directive 6402, this routine should not be modified.
+3 ;
+4 ;ENTER WITH X
+5 ;NO DAYS, WEEKS, OR MONTHS
NEW Y,%DT
IF X?1.A1(1"+",1"-")1.N1(1"D",1"M",1"W")
GOTO KX
+6 IF X?.N
Begin DoDot:1
+7 SET Y=$GET(DIPA("SECONDS ALLOWED"))
+8 IF 'Y
SET Y=$EXTRACT(X,5,999)
SET X=$EXTRACT(X,1,4)
IF Y'="00"&(Y]"")
KILL X
QUIT
+9 SET X=$EXTRACT(X,1,6)
End DoDot:1
if '$DATA(X)
QUIT
+10 if X?1N.E
SET X="T@"_X
+11 SET %DT=$PIECE("S",U,$GET(DIPA("SECONDS ALLOWED"))'=0)_"R"
+12 DO ^%DT
+13 SET X=$EXTRACT(Y_"000000",9,14)
+14 if Y<0
GOTO KX
+15 IF '$DATA(DIQUIET)
SET Y=X
XECUTE $$METH4TYP^DIETLIBF("OUTPUT TRANSFORM",13)
WRITE " (",Y,")"
+16 QUIT
KX KILL X
QUIT
+1 ;
+2 ;