source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWRP3.m@ 794

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1ORWRP3 ; slc/dcm - OE/RR Report Extract RPC's ; 08 May 2001 13:32PM
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**109,120,132,215**;Dec 17, 1997
3 ;
4 ; DBIA 4011 Access ^XWB(8994)
5 ;
6EX(ROOT,TST) ;Expand columns
7 ;TST=ptr to file 101.24
8 ;Y(i)=id^Name^Qualifier^IOM^Entry^Routine^Remote^Type^Category^RPC^ifn^sort_order^max_days^direct
9 Q:'$G(TST)
10 N J,X,X0,X2,X4,RPC,HEAD,ORX0,ORX2,ORX4,ORX,ORTIMOCC,MAX
11 I '$L($G(C)) S C=0
12 S ORTIMOCC=$$GET^XPAR("USR.`"_DUZ_"^SYS^PKG","ORWRP TIME/OCC LIMITS INDV",+TST,"I")
13 I '$L(ORTIMOCC) S ORTIMOCC=$$GET^XPAR("USR.`"_DUZ_"^SYS^PKG","ORWRP TIME/OCC LIMITS ALL",1,"I")
14 S X0=$G(^ORD(101.24,+TST,0)),X2=$G(^(2)),X4=$G(^(4)),MAX=$P(X4,"^",2),X=$P($P(ORTIMOCC,";"),"-",2)
15 I X,MAX,X>MAX S ORTIMOCC="T-"_MAX_";"_$P(ORTIMOCC,";",2,99)
16 I '$L(ORTIMOCC) S ORTIMOCC=";;"
17 I '$O(^ORD(101.24,+TST,10,0)) D Q
18 . Q:$P(X0,"^",12)="L"
19 . S RPC=$P($G(^XWB(8994,+$P(X0,"^",13),0)),"^") ;DBIA 4011
20 . S HEAD=$P(X0,"^") I $L($P(X2,"^",3)) S HEAD=$P(X2,"^",3)
21 . S X=$P(X0,U,2)_U_HEAD_U_ORTIMOCC_";"_$P(X0,U,4)_U_$P(X0,U,19)_";"_$P(X0,U,20)_";"_+$P(X0,U,21)_U_$P(X0,U,6)_U_$P(X0,U,5)_U_$P(X0,U,3)_U_$P(X0,U,12)_U_$P(X0,U,7)_U_RPC_U_+TST_U_$P(X4,U)_U_$P(X4,U,2)_U_$P(X4,U,4)_U_$P(X4,U,5)
22 . D SETITEM(.ROOT,X)
23 I $O(^ORD(101.24,+TST,10,0)) S ORX0=^ORD(101.24,+TST,0),ORX2=$G(^(2)),ORX4=$G(^(4)) D
24 . S X=ORX0,HEAD=$P(X,"^")
25 . I $L($P(ORX2,"^",3)) S HEAD=$P(ORX2,"^",3)
26 . S ORX=$P(X,U,2)_U_HEAD_U_ORTIMOCC_";"_$P(X,U,4)_U_$P(X,U,19)_";"_$P(X,U,20)_";"_+$P(X,U,21)_U_$P(X,U,6)_U_$P(X,U,5)_U_$P(X,U,3)_U_$P(X,U,12)_U_$P(X,U,7)_"^^"_+TST_U_$P(ORX4,U)_U_$P(ORX4,U,2)_U_$P(ORX4,U,4)_U_$P(ORX4,U,5)
27 . D SETITEM(.ROOT,"[PARENT START]^"_ORX)
28 . S J=0 F S J=$O(^ORD(101.24,+TST,10,J)) Q:J<1 S X=^(J,0) D EX(.ROOT,+X)
29 . D SETITEM(.ROOT,"[PARENT END]^"_ORX)
30 Q
31LIST(LST) ;Get list for Treeview
32 N ROOT
33 S ROOT=$NA(LST)
34 K @ROOT
35 D TRY1(.ROOT)
36 Q
37TRY1(ROOT) ;Test expanding reports using established parameters
38 N I,ORLIST
39 D SETITEM(.ROOT,"[REPORT LIST]")
40 D GETLST^XPAR(.ORLIST,"ALL","ORWRP REPORT LIST")
41 S I=0
42 F S I=$O(ORLIST(I)) Q:'I Q:'$D(^ORD(101.24,$P(ORLIST(I),"^",2),0)) D EX(.ROOT,$P(ORLIST(I),"^",2))
43 D SETITEM(.ROOT,"$$END")
44 Q
45SETITEM(ROOT,X) ; -- set item in list
46 S @ROOT@($O(@ROOT@(9999),-1)+1)=X
47 Q
Note: See TracBrowser for help on using the repository browser.