source: WorldVistAEHR/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORWCS.m@ 862

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

initial load of WorldVistAEHR

File size: 1.2 KB
RevLine 
[613]1ORWCS ; ALB/MJK - Consult Tab Calls ;9/18/96 15:02
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;;Dec 17, 1997
3 ;
4LIST(ORY,DFN,SERV,BEGDT,ENDDT,STATUS) ;
5 ; RPC: ORWCS LIST OF CONSULT REPORTS
6 ; See RPC definition for details on input and output parameters
7 ;
8 N ORI,ORX,ID,DATE,STAT,PROC,LN
9 IF '$D(SERV) N SERV S SERV=""
10 IF '$D(BEGDT) N BEG S BEGDT=""
11 IF '$D(ENDDT) N END S ENDDT=""
12 IF '$D(STATUS) N STATUS S STATUS=""
13 S LN=0
14 ;
15 S ORY=$NA(^TMP("ORCS",$J)) K @ORY
16 D OER^GMRCSLM1(DFN,SERV,BEGDT,ENDDT,STATUS)
17 S ORI=0 F S ORI=$O(^TMP("GMRCR",$J,"CS",ORI)) Q:'ORI S ORX=$G(^(ORI,0)) D
18 . S ID=$P(ORX,U)
19 . S DATE=$P(ORX,U,2)
20 . S STAT=$P(ORX,U,3)
21 . S PROC=$P(ORX,U,5)
22 . IF PROC="Consult" S PROC=$$UP^XLFSTR($P(ORX,U,4)_" "_PROC)
23 . S LN=LN+1
24 . S @ORY@(LN,0)=ID_U_DATE_U_PROC_U_STAT
25 Q
26 ;
27RPT(ORY,DFN,ORID) ; -- retrieve report text
28 ; RPC: ORWCS REPORT TEXT
29 ; See RPC definition for details on input and output parameters
30 ;
31 S ORY=$NA(^TMP("GMRCR",$J,"DT")) K @ORY Q:+ORID=0
32 D DT^GMRCSLM2(ORID)
33 Q
34 ;
35TEST ; -- get a list of reports
36 N ORY,ORI
37 D LIST(.ORY,16)
38 S ORI=0 F S ORI=$O(@ORY@(ORI)) Q:'ORI W !,@ORY@(ORI,0)
39 Q
40TEST1 ; -- print a report
41 N ORY,ORI
42 D RPT(.ORY,16,100)
43 S ORI=0 F S ORI=$O(@ORY@(ORI)) Q:'ORI W !,@ORY@(ORI,0)
44 Q
45 ;
Note: See TracBrowser for help on using the repository browser.