source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWCV1.m@ 1009

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

initial load of WorldVistAEHR

File size: 1.4 KB
RevLine 
[613]1ORWCV1 ; slc/dcm - CoverSheet calls continued ;12:30 PM 4 Oct 2000
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**85**;Dec 17, 1997
3 ;
4COVERLST(LST) ; -- return data for coversheet
5 ;RPC: ORWCV1 COVERSHEET LIST
6 N I,J,X,X0,X2,CNT,EOF,ROOT,RPC,LIST,DETAIL,HEAD
7 S EOF="$$END",ROOT=$NA(LST),(CNT,I)=0
8 D GETLST^XPAR(.LIST,"ALL","ORWCV1 COVERSHEET LIST")
9 F S I=$O(LIST(I)) Q:'I Q:'$D(^ORD(101.24,$P(LIST(I),"^",2),0)) S X0=^(0),X2=$G(^(2)) D
10 . Q:$P(X0,"^",12)="L"
11 . S RPC=$P($G(^XWB(8994,+$P(X0,"^",13),0)),"^"),DETAIL=""
12 . I $P(X0,"^",18) S DETAIL=$P($G(^ORD(101.24,+$P(X0,"^",18),0)),"^",13),DETAIL=$P($G(^XWB(8994,+DETAIL,0)),"^")
13 . S HEAD=$P(X0,"^") I $L($P(X2,"^",3)) S HEAD=$P(X2,"^",3)
14 . S X=$P(X0,"^",2)_"^"_HEAD_"^"_$P(X0,"^",3)_"^"_$P(X0,"^",12)_"^"_$P(X0,"^",7)_"^"_RPC_"^"_$P(X0,"^",9)
15 . S X=X_"^"_$P(X0,"^",10)_"^"_$P(X0,"^",11)_"^"_$P(X0,"^",14)_"^"_$P(X0,"^",15)_"^"_$P(X2,"^")_"^"_$P(X0,"^",4)_"^"_$P(X0,"^",16)_"^"_$P(X0,"^",17)_"^"_DETAIL_"^"_LIST(I)
16 . D SETITEM(.ROOT,X)
17 Q
18SETITEM(ROOT,X) ; -- set item in list
19 S @ROOT@($O(@ROOT@(9999),-1)+1)=X
20 Q
21DETAIL(ID) ;Get RPC for Detail report
22 ;ID=Cover sheet TAG ID
23 Q:'$L($G(ID)) ""
24 N I,X0,DETAIL
25 S I=0,DETAIL=""
26 F S I=$O(^ORD(101.24,"AC",ID,I)) Q:'I S X0=$G(^ORD(101.24,I,0)) I $P(X0,"^",8)="C",$P(X0,"^",18) S DETAIL=$P($G(^ORD(101.24,+$P(X0,"^",18),0)),"^",13),DETAIL=$P($G(^XWB(8994,+DETAIL,0)),"^")
27 Q DETAIL
Note: See TracBrowser for help on using the repository browser.