source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUPARAM.m@ 1128

Last change on this file since 1128 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1XUPARAM ;SF/RWF - Lookup parameter substitute, KSP values ;03/26/2003 11:56
2 ;;8.0;KERNEL;**65,115,224**;Jul 10, 1995
3 Q
4GET(%X,STYLE) ;Get substitute value
5 ;Style, N will return call name as default
6 ; V will return null as default
7 ;otherwize will return zero as default
8 N %1,%2,%Y S STYLE=$G(STYLE),%Y=$S(STYLE="N":%X,STYLE="V":"",1:0)
9 S %1=$$LKUP(%X) I %1'>0 Q %Y
10 S %2=$G(^XTV(8989.2,%1,0))
11 I $P(%2,"^",4)]"" Q $P(%2,"^",4)
12 I $P(%2,"^",3)]"" Q $P(%2,"^",3)
13 Q %Y
14SET(%X,VALUE,DEF) ;Set parameter value, default
15 N %1
16 S %1=$$LKUP(%X,"A") Q:%1'>0
17 Q:'$D(VALUE)
18 S $P(^XTV(8989.2,%1,0),"^",4)=VALUE S:$G(DEF)]"" $P(^XTV(8989.2,%1,0),"^",3)=DEF
19 Q
20LKUP(X,ACTION) ;
21 N E
22 S E=$O(^XTV(8989.2,"B",X,0)) I E>0 Q E
23 I $G(ACTION)'["A" Q -1
24 N DA,DIC,DLAYGO,Y
25 S DIC="^XTV(8989.2,",DIC(0)="ML",DLAYGO=8989.2 D FILE^DICN
26 Q +Y
27 ;
28BAT() Q $P($G(^XTV(8989.3,1,"XWB"),180),U) ;Broker Activity timeout
29 ;
30KSP(NAME) ;To return data from KSP file.
31 N NM S NM=$P($G(NAME)," ")
32 Q:'$L(NM) "" ;No parameter value
33 Q:$T(@NM)="" "" G @NM
34SPOOL Q $P($G(^XTV(8989.3,1,"SPL")),"^",$S(NAME["LINE":1,NAME["DOC":2,NAME["LIFE":3,1:1))
35WHERE Q $P($G(^DIC(4.2,(+^XTV(8989.3,1,0)),0)),"^")
36INST Q $P($G(^XTV(8989.3,1,"XUS")),U,17)
37LIFETIME Q $P($G(^XTV(8989.3,1,"XUS")),U,15) ;Verify code lifetime
Note: See TracBrowser for help on using the repository browser.