HDISVF06 ;ALB/RMO - 7115.5 File Utilities/API Cont.; 1/11/05@7:04:00
;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
;
;---- Begin HDIS Status file (#7115.5) API(s) ----
;
GETIEN(HDISCODE,HDISTYPE,HDISSIEN) ;Get IEN for the Status by Status Type and Status Code
; Input -- HDISCODE Status Code
; HDISTYPE Status Type (Optional- Default 1=Client)
; Output -- 1=Successful and 0=Failure
; If Successful:
; HDISSIEN HDIS Status file IEN
;Initialize output
S HDISSIEN=""
;Check for missing variable, exit if not defined
I $G(HDISCODE)="" G GETIENQ
;Set Status Type to default of 1=Client, if needed
S HDISTYPE=$S('$D(HDISTYPE):1,1:HDISTYPE)
;Check for entry by Status Type and Status Code
S HDISSIEN=$O(^HDIS(7115.5,"AC",HDISTYPE,HDISCODE,0))
GETIENQ Q +$S($G(HDISSIEN)>0:1,1:0)
;
GETCODE(HDISSIEN,HDISCODE) ;Get Status Code for the Status by IEN
; Input -- HDISSIEN HDIS Status file IEN
; Output -- 1=Successful and 0=Failure
; If Successful:
; HDISCODE Status Code
;Initialize output
S HDISCODE=""
;Check for missing variable, exit if not defined
I $G(HDISSIEN)'>0 G GETCODEQ
;Check for Status Code by IEN
I $D(^HDIS(7115.5,HDISSIEN,0)) S HDISCODE=$P(^(0),"^",2)
GETCODEQ Q +$S($G(HDISCODE)'="":1,1:0)
;
;---- End HDIS Status file (#7115.5) API(s) ----
HDISVF06 ;ALB/RMO - 7115.5 File Utilities/API Cont.; 1/11/05@7:04:00
+1 ;;1.0;HEALTH DATA & INFORMATICS;;Feb 22, 2005
+2 ;
+3 ;---- Begin HDIS Status file (#7115.5) API(s) ----
+4 ;
GETIEN(HDISCODE,HDISTYPE,HDISSIEN) ;Get IEN for the Status by Status Type and Status Code
+1 ; Input -- HDISCODE Status Code
+2 ; HDISTYPE Status Type (Optional- Default 1=Client)
+3 ; Output -- 1=Successful and 0=Failure
+4 ; If Successful:
+5 ; HDISSIEN HDIS Status file IEN
+6 ;Initialize output
+7 SET HDISSIEN=""
+8 ;Check for missing variable, exit if not defined
+9 IF $GET(HDISCODE)=""
GOTO GETIENQ
+10 ;Set Status Type to default of 1=Client, if needed
+11 SET HDISTYPE=$SELECT('$DATA(HDISTYPE):1,1:HDISTYPE)
+12 ;Check for entry by Status Type and Status Code
+13 SET HDISSIEN=$ORDER(^HDIS(7115.5,"AC",HDISTYPE,HDISCODE,0))
GETIENQ QUIT +$SELECT($GET(HDISSIEN)>0:1,1:0)
+1 ;
GETCODE(HDISSIEN,HDISCODE) ;Get Status Code for the Status by IEN
+1 ; Input -- HDISSIEN HDIS Status file IEN
+2 ; Output -- 1=Successful and 0=Failure
+3 ; If Successful:
+4 ; HDISCODE Status Code
+5 ;Initialize output
+6 SET HDISCODE=""
+7 ;Check for missing variable, exit if not defined
+8 IF $GET(HDISSIEN)'>0
GOTO GETCODEQ
+9 ;Check for Status Code by IEN
+10 IF $DATA(^HDIS(7115.5,HDISSIEN,0))
SET HDISCODE=$PIECE(^(0),"^",2)
GETCODEQ QUIT +$SELECT($GET(HDISCODE)'="":1,1:0)
+1 ;
+2 ;---- End HDIS Status file (#7115.5) API(s) ----