source: FOIAVistA/trunk/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XPARLIST.m@ 868

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

initial load of FOIAVistA 6/30/08 version

File size: 2.5 KB
Line 
1XPARLIST ; SLC/KCM - List parameter values ; 5/1/03 6:43am
2 ;;7.3;TOOLKIT;**26,72**;Apr 25, 1995
3 ;
4ALLPARS ; Select parameter and list values
5 N PAR
6 D GETPAR^XPAREDIT(.PAR) Q:'PAR
7 D ALLPAR(+PAR)
8 Q
9ALLPAR(PAR) ; List values given parameter
10 N ENT,INST,VAL,LN,DIRUT,DUOUT,DTOUT
11 W !!,"Values for "_$P(^XTV(8989.51,PAR,0),U),!! S LN=1
12 D HEADER
13 S ENT=0 F S ENT=$O(^XTV(8989.5,"AC",PAR,ENT)) Q:'ENT D Q:$D(DIRUT)
14 . S INST=""
15 . F S INST=$O(^XTV(8989.5,"AC",PAR,ENT,INST)) Q:INST="" D Q:$D(DIRUT)
16 . . D WAIT Q:$D(DIRUT)
17 . . S VAL=^XTV(8989.5,"AC",PAR,ENT,INST)
18 . . W $E($$ENTNAME(ENT),1,30),?31
19 . . W $E($$EXT^XPARDD(INST,PAR,"I"),1,20),?52
20 . . W $E($$EXT^XPARDD(VAL,PAR,"V"),1,28),!
21 I '$D(DIRUT) S DIR(0)="E" D ^DIR
22 Q
23ALLENTS ; Select entity and list values
24 N PAR,ENT
25 S PAR=$O(^XTV(8989.51,"B","XPAR ALL ENTITIES",0))
26 D GETENT^XPAREDIT(.ENT,PAR_"^Entities") Q:'ENT
27 D ALLENT(ENT)
28 Q
29ALLPKG ; Select package
30 N DIC,Y
31 S DIC=9.4,DIC(0)="AEMQ" D ^DIC Q:Y<0
32 D ALLENT(+Y_";DIC(9.4,")
33 Q
34ALLENT(ENT) ; List values given entity
35 N IEN,PAR,INST,VAL,LN,DIRUT,DUOUT,DTOUT
36 K ^TMP($J)
37 W !!,"Values for "_$$ENTNAME(ENT),!! S LN=1
38 D HEADER
39 S IEN=0 F S IEN=$O(^XTV(8989.5,"B",ENT,IEN)) Q:'IEN D
40 . S X=^XTV(8989.5,IEN,0),VAL=^XTV(8989.5,IEN,1)
41 . Q:($P(X,U,2)="")!($P(X,U,3)="")
42 . S ^TMP($J,$P(X,U,2),$P(X,U,3))=VAL
43 . S ^TMP($J,$P(X,U,2),$P(X,U,3),IEN)=""
44 S PAR=0 F S PAR=$O(^TMP($J,PAR)) Q:'PAR D Q:$D(DIRUT)
45 . I '$D(^XTV(8989.51,PAR)) W ">> BROKEN PTR TO PARAMETER ("_PAR_")",! Q
46 . S INST="" F S INST=$O(^TMP($J,PAR,INST)) Q:INST="" D Q:$D(DIRUT)
47 . . D WAIT Q:$D(DIRUT)
48 . . S VAL=^TMP($J,PAR,INST)
49 . . W $E($P(^XTV(8989.51,PAR,0),U),1,30),?31
50 . . W $E($$EXT^XPARDD(INST,PAR,"I"),1,20),?52
51 . . W $E($$EXT^XPARDD(VAL,PAR,"V"),1,28),!
52 I '$D(DIRUT) S DIR(0)="E" D ^DIR
53 K ^TMP($J)
54 Q
55TMPLT(TLT) ; List values given template
56 N DIC,Y,ALLENT,ALLINST,DTOUT,DUOUT,DIRUT
57 I '$G(TLT),$L($G(TLT)) S TLT=$O(^XTV(8989.52,"B",TLT,0))
58 I '$D(^XTV(8989.52,+$G(TLT),0)) N TLT S DIC=8989.52,DIC(0)="AEMQ" D ^DIC Q:Y<0 S TLT=+Y
59 D SELENT^XPAREDT3(.ALLENT,TLT) Q:$D(DTOUT)!$D(DUOUT)
60 D SELINST^XPAREDT3(.ALLINST,ALLENT,TLT) Q:$D(DTOUT)!$D(DUOUT)
61 D SHWTLT^XPAREDT3(ALLENT,ALLINST,TLT)
62 S DIR(0)="E" D ^DIR
63 Q
64WAIT ; pause display
65 S LN=LN+1 I LN>(IOSL-4) S DIR(0)="E" D ^DIR W !! D:'$D(DIRUT) HEADER S LN=0
66 Q
67ENTNAME(ENT) ; Return TYP: Entity
68 N X,FN
69 S FN=+$P(@(U_$P(ENT,";",2)_"0)"),U,2),X=$P(^XTV(8989.518,FN,0),U,2)
70 S X=X_": "_$$EXTPTR^XPARDD(+ENT,FN)
71 Q X
72 ;
73HEADER ;
74 W "Parameter",?31,"Instance",?52,"Value",!
75 W $$REPEAT^XLFSTR("-",IOM-4),!
76 Q
Note: See TracBrowser for help on using the repository browser.