XHDPAR ; SLC/JER - Parameter Calls ; 25 Jul 2003 9:42 AM
;;1.0;HEALTHEVET DESKTOP;;Jul 15, 2003
GETLST(XHDY,PAR,ERR) ; Gets values for all entities
N ENT,INST,VAL,CNT,X,VDTYPE
S X="ONERROR^XHDPAR",@^%ZOSF("TRAP")
S (CNT,ENT,ERR)=0,VDTYPE=$P($G(^XTV(8989.51,PAR,1)),U)
F S ENT=$O(^XTV(8989.5,"AC",PAR,ENT)) Q:'ENT D
. S INST=""
. F S INST=$O(^XTV(8989.5,"AC",PAR,ENT,INST)) Q:INST="" D
. . S VAL=^XTV(8989.5,"AC",PAR,ENT,INST)
. . S CNT=CNT+1,XHDY(CNT)=ENT_U_$$ENTNAME^XPARLIST(ENT)_U_INST_U_$S(VDTYPE="D":VAL,1:$$EXT^XPARDD(VAL,PAR,"V"))
Q
ONERROR ; Trap errors
S ERR="1^"_$TR($$EC^%ZOSV,"^","~")
D ^%ZTER
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXHDPAR 651 printed Dec 13, 2024@01:57:16 Page 2
XHDPAR ; SLC/JER - Parameter Calls ; 25 Jul 2003 9:42 AM
+1 ;;1.0;HEALTHEVET DESKTOP;;Jul 15, 2003
GETLST(XHDY,PAR,ERR) ; Gets values for all entities
+1 NEW ENT,INST,VAL,CNT,X,VDTYPE
+2 SET X="ONERROR^XHDPAR"
SET @^%ZOSF("TRAP")
+3 SET (CNT,ENT,ERR)=0
SET VDTYPE=$PIECE($GET(^XTV(8989.51,PAR,1)),U)
+4 FOR
SET ENT=$ORDER(^XTV(8989.5,"AC",PAR,ENT))
if 'ENT
QUIT
Begin DoDot:1
+5 SET INST=""
+6 FOR
SET INST=$ORDER(^XTV(8989.5,"AC",PAR,ENT,INST))
if INST=""
QUIT
Begin DoDot:2
+7 SET VAL=^XTV(8989.5,"AC",PAR,ENT,INST)
+8 SET CNT=CNT+1
SET XHDY(CNT)=ENT_U_$$ENTNAME^XPARLIST(ENT)_U_INST_U_$SELECT(VDTYPE="D":VAL,1:$$EXT^XPARDD(VAL,PAR,"V"))
End DoDot:2
End DoDot:1
+9 QUIT
ONERROR ; Trap errors
+1 SET ERR="1^"_$TRANSLATE($$EC^%ZOSV,"^","~")
+2 DO ^%ZTER
+3 QUIT