SCDD ;ALB/RMO - Data Dictionary Calls ;02 DEC 1994 9:00 am [ 12/02/94 1:39 PM ]
;;5.3;Scheduling;**41**;AUG 13, 1993
;
ACTSTOP(SCSCI,SCDT) ;Determine if Stop Code is Active
; Input -- SCSCI Stop Code file IEN
; SCDT Date/Time (Optional- default today@2359)
; Output -- 1=ACTIVE and 0=INACTIVE
N Y
S SCDT=$S($G(SCDT)>0:SCDT,1:DT) S:'$P(SCDT,".",2) SCDT=SCDT_.2359
I $D(^DIC(40.7,SCSCI,"E",+$O(^(+$O(^DIC(40.7,SCSCI,"E","AID",-SCDT)),0)),0)),$P($G(^(0)),U,2) S Y=1
Q +$G(Y)
;
VALTIME(X) ;Validate Time Format
; Input -- X Time
; Output -- 1=VALID and 0=INVALID
N Y
S Y=1
I $L(X)>4!($L(X)<4)!('X?4N&(X<1700)&(X>1700)&(X#100<60)) S Y=0
Q +$G(Y)
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSCDD 708 printed Dec 13, 2024@02:39:05 Page 2
SCDD ;ALB/RMO - Data Dictionary Calls ;02 DEC 1994 9:00 am [ 12/02/94 1:39 PM ]
+1 ;;5.3;Scheduling;**41**;AUG 13, 1993
+2 ;
ACTSTOP(SCSCI,SCDT) ;Determine if Stop Code is Active
+1 ; Input -- SCSCI Stop Code file IEN
+2 ; SCDT Date/Time (Optional- default today@2359)
+3 ; Output -- 1=ACTIVE and 0=INACTIVE
+4 NEW Y
+5 SET SCDT=$SELECT($GET(SCDT)>0:SCDT,1:DT)
if '$PIECE(SCDT,".",2)
SET SCDT=SCDT_.2359
+6 IF $DATA(^DIC(40.7,SCSCI,"E",+$ORDER(^(+$ORDER(^DIC(40.7,SCSCI,"E","AID",-SCDT)),0)),0))
IF $PIECE($GET(^(0)),U,2)
SET Y=1
+7 QUIT +$GET(Y)
+8 ;
VALTIME(X) ;Validate Time Format
+1 ; Input -- X Time
+2 ; Output -- 1=VALID and 0=INVALID
+3 NEW Y
+4 SET Y=1
+5 IF $LENGTH(X)>4!($LENGTH(X)<4)!('X?4N&(X<1700)&(X>1700)&(X#100<60))
SET Y=0
+6 QUIT +$GET(Y)
+7 ;