BEHWEB ; IHS/BAO/TMD - Infor Button Util ;23-Mar-2011 18:34;PLS
;;1.1;BEH COMPONENTS;**054001**;Mar 20, 2007;Build 2
;---------------------------------------------
; Returns Web Reference Sites
; RET as a list of records in the format:
; Site [1] ^ File IEN [2] ^ URL [3]
GETSITES(RET,DUMMY) ;EP
N X,Y,CNT,IEN,URL,SITE
S (X,CNT)=0
F S X=$O(^BEHOIFB(90461.71,"AC",X)) Q:'X D
.S IEN=0
.F S IEN=$O(^BEHOIFB(90461.71,"AC",X,IEN)) Q:'IEN D
..S Y=^BEHOIFB(90461.71,IEN,0)
..Q:$P(Y,U,4)
..S SITE=$P(Y,U),URL=$P(Y,U,2)
..D ADD(SITE_U_IEN_U_URL)
Q
; Add to output array
ADD(X) S CNT=$G(CNT)+1,RET(CNT)=X
Q
; Returns Default Search URL
DEFSURL(RET,DUMMY) ;
N UIEN
S UIEN=$$GET^XPAR("ALL","BEH DEFAULT WEB SEARCH SITE")
S RET=$S(UIEN:$P($G(^BEHOIFB(90461.71,UIEN,0)),U,2),1:"")
Q
BEHWEB ; IHS/BAO/TMD - Infor Button Util ;23-Mar-2011 18:34;PLS
+1 ;;1.1;BEH COMPONENTS;**054001**;Mar 20, 2007;Build 2
+2 ;---------------------------------------------
+3 ; Returns Web Reference Sites
+4 ; RET as a list of records in the format:
+5 ; Site [1] ^ File IEN [2] ^ URL [3]
GETSITES(RET,DUMMY) ;EP
+1 NEW X,Y,CNT,IEN,URL,SITE
+2 SET (X,CNT)=0
+3 FOR
SET X=$ORDER(^BEHOIFB(90461.71,"AC",X))
IF 'X
QUIT
Begin DoDot:1
+4 SET IEN=0
+5 FOR
SET IEN=$ORDER(^BEHOIFB(90461.71,"AC",X,IEN))
IF 'IEN
QUIT
Begin DoDot:2
+6 SET Y=^BEHOIFB(90461.71,IEN,0)
+7 IF $PIECE(Y,U,4)
QUIT
+8 SET SITE=$PIECE(Y,U)
SET URL=$PIECE(Y,U,2)
+9 DO ADD(SITE_U_IEN_U_URL)
End DoDot:2
End DoDot:1
+10 QUIT
+11 ; Add to output array
ADD(X) SET CNT=$GET(CNT)+1
SET RET(CNT)=X
+1 QUIT
+2 ; Returns Default Search URL
DEFSURL(RET,DUMMY) ;
+1 NEW UIEN
+2 SET UIEN=$$GET^XPAR("ALL","BEH DEFAULT WEB SEARCH SITE")
+3 SET RET=$SELECT(UIEN:$PIECE($GET(^BEHOIFB(90461.71,UIEN,0)),U,2),1:"")
+4 QUIT