SDCODD ;ALB/RMO - Data Dictionary Calls - Check Out;30 DEC 1992 9:00 am
;;5.3;Scheduling;**132**;Aug 13, 1993
;
ACT(SDCTI,SDDT) ;Determine if Outpatient Classification Type is active
; Input -- SDCTI Outpatient Classification Type file IEN
; SDDT Date/Time (Optional- default today@2359)
; Output -- 1=ACTIVE and 0=INACTIVE
N Y
S SDDT=$S($G(SDDT)>0:SDDT,1:DT) S:'$P(SDDT,".",2) SDDT=SDDT_.2359
I $D(^SD(409.41,SDCTI,"E",+$O(^(+$O(^SD(409.41,SDCTI,"E","AID",-SDDT)),0)),0)),$P($G(^(0)),U,2) S Y=1
Q +$G(Y)
;
VAL(SDCTI,Y) ;Determine External Value of Outpatient Classification
; Input -- SDCTI Outpatient Classification Type file IEN
; Y Internal Value
; Output -- External Value
N SDCTYP
S SDCTYP=$P($G(^SD(409.41,SDCTI,0)),U,3)
I SDCTYP="Y",Y'="" S Y=$S(Y:"YES",1:"NO")
I SDCTYP="S",Y'="" S Y=$P($P($G(^SD(409.41,SDCTI,2)),Y_":",2),";")
Q Y
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDCODD 924 printed Oct 16, 2024@18:50:06 Page 2
SDCODD ;ALB/RMO - Data Dictionary Calls - Check Out;30 DEC 1992 9:00 am
+1 ;;5.3;Scheduling;**132**;Aug 13, 1993
+2 ;
ACT(SDCTI,SDDT) ;Determine if Outpatient Classification Type is active
+1 ; Input -- SDCTI Outpatient Classification Type file IEN
+2 ; SDDT Date/Time (Optional- default today@2359)
+3 ; Output -- 1=ACTIVE and 0=INACTIVE
+4 NEW Y
+5 SET SDDT=$SELECT($GET(SDDT)>0:SDDT,1:DT)
if '$PIECE(SDDT,".",2)
SET SDDT=SDDT_.2359
+6 IF $DATA(^SD(409.41,SDCTI,"E",+$ORDER(^(+$ORDER(^SD(409.41,SDCTI,"E","AID",-SDDT)),0)),0))
IF $PIECE($GET(^(0)),U,2)
SET Y=1
+7 QUIT +$GET(Y)
+8 ;
VAL(SDCTI,Y) ;Determine External Value of Outpatient Classification
+1 ; Input -- SDCTI Outpatient Classification Type file IEN
+2 ; Y Internal Value
+3 ; Output -- External Value
+4 NEW SDCTYP
+5 SET SDCTYP=$PIECE($GET(^SD(409.41,SDCTI,0)),U,3)
+6 IF SDCTYP="Y"
IF Y'=""
SET Y=$SELECT(Y:"YES",1:"NO")
+7 IF SDCTYP="S"
IF Y'=""
SET Y=$PIECE($PIECE($GET(^SD(409.41,SDCTI,2)),Y_":",2),";")
+8 QUIT Y
+9 ;