source: FOIAVistA/trunk/r/EVENT_CAPTURE-EC--ECT--ECX/ECRRPC.m@ 1203

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1ECRRPC ;ALB/JAM;Event Capture Report RPC Broker ;Sep 5, 2000
2 ;;2.0; EVENT CAPTURE ;**25,47,61,72**;8 May 96
3 ;
4RPTEN(RESULTS,ECARY) ;RPC Broker entry point for EC Reports
5 ;All EC GUI reports will call this line tag
6 ; RPC: EC REPORTS
7 ;INPUTS ECARY - Contains the following elements for report printing
8 ; ECDEV - Print to queue, if device
9 ; ECQDT - Queue to print (date/time), optional
10 ;
11 ;OUTPUTS RESULTS - Array of help text in the HELP FRAM File (#9.2)
12 ;
13 N HLPDA,HND,ECSTR,ECFILER,ECERR,ECDIRY,ECUFILE,ECGUI
14 D SETENV^ECUMRPC
15 S ECERR=0,ECGUI=1 D PARSE,CHKDT I ECERR Q
16 K ^TMP("ECMSG",$J),^TMP($J,"ECRPT")
17 D I ECERR D END Q
18 . I ECPTYP="D" D HFSOPEN(ECHNDL) Q
19 . I '$D(ECDEV) S ^TMP("ECMSG",$J,1)="0^Device undefined",ECERR=1
20 S HND=$P($T(@ECHNDL),";;",2) I HND="" D Q
21 . S ^TMP("ECMSG",$J,1)="0^Line Tag undefined" D END
22 S ECQDT=$G(ECQDT,"NOW"),%DT="XT",X=ECQDT D ^%DT ;Print time
23 S ECQDT=$S(Y>0:Y,1:"NOW")
24 D @$P(HND,";",2)
25 I ECPTYP="D" D HFSCLOSE(ECFILER) ;S RESULTS=$NA(^TMP($J))
26END D KILLVAR
27 I $D(^TMP("ECMSG",$J)) S RESULTS=$NA(^TMP("ECMSG",$J)) Q
28 S RESULTS=$NA(^TMP($J))
29 Q
30 ;
31PARSE ;Parse data from array for filing
32 N SUB
33 S SUB="" F S SUB=$O(ECARY(SUB)) Q:SUB="" S @SUB=ECARY(SUB)
34 Q
35CHKDT ;Required Data Check
36 N I,C
37 S C=1
38 F I="ECHNDL","ECPTYP" D
39 .I $G(@I)="" S ^TMP("ECMSG",$J,C)="0^Key data missing "_I,C=C+1,ECERR=1
40 Q
41KILLVAR ;Kill variables
42 N SUB
43 S SUB="" F S SUB=$O(ECARY(SUB)) Q:SUB="" K @SUB
44 K ECARY,POP,ECQDT
45 Q
46HFSOPEN(HANDLE) ;
47 S ECDIRY=$$GET^XPAR("DIV","EC HFS SCRATCH")
48 I ECDIRY="" S ECERR=1 D Q
49 .S ^TMP("ECMSG",$J,1)="0^A scratch directory for reports doesn't exist"
50 S ECFILER="EC"_DUZ_".DAT",ECUFILE=ECFILER S ^TMP("JEN",$J,.1)=ECUFILE
51 D OPEN^%ZISH(HANDLE,ECDIRY,ECFILER,"W") D:POP Q:POP
52 .S ECERR=1,^TMP("ECMSG",$J,1)="0^Unable to open file "_ECDIRY_ECFILER
53 S IOM=132,IOSL=99999,IOST="P-DUMMY",IOF=""""""
54 Q
55 ;
56HFSCLOSE(HANDLE) ;
57 N ECDEL
58 D CLOSE^%ZISH(ECDIRY_HANDLE)
59 K ^TMP($J)
60 S ECDEL(ECFILER)=""
61 S X=$$FTG^%ZISH(ECDIRY,ECFILER,$NAME(^TMP($J,1)),2)
62 S X=$$DEL^%ZISH(ECDIRY,$NA(ECDEL))
63 Q
64ECPAT ;;Patient Summary Report;ECPAT^ECRRPT
65ECRDSSU ;;DSS Unit Workload Summary;ECRDSSU^ECRRPT
66ECPROV ;;Provider Summary Report;ECPROV^ECRRPT
67PROSUM ;;Provider (1-7) Summary Report;PROSUM^ECRRPT
68ECOSSUM ;;Ordering Section Summary Report;ECOSSUM^ECRRPT
69ECPCER ;;PCE Data Summary Report;ECPCER^ECRRPT
70ECRPERS ;;Inactive Person Class Report;ECRPERS^ECRRPT1
71ECRPRSN ;;Procedure Reason Report;ECRPRSN^ECRRPT1
72ECDSS1 ;;National/Local Procedure Reports;ECDSS1^ECRRPT1
73ECDSS3 ;;Category Reports;ECDSS3^ECRRPT1
74ECSUM ;;Print Category and Procedure Summary (Report);ECSUM^ECRRPT1
75ECNTPCE ;;Records Failing Transmission to PCE Report;ECNTPCE^ECRRPT1
76ECSCPT ;;Event Code Screens with CPT Codes;ECSCPT^ECRRPT1
77ECINCPT ;;National/Local Procedure Codes with Inactive CPT;ECINCPT^ECRRPT1
Note: See TracBrowser for help on using the repository browser.