VistA-WorldVistAEHR/r/HEALTHEVET_DESKTOP-XHD/XHDPAR.m

17 lines
635 B
Mathematica

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