[613] | 1 | ECRRPC ;ALB/JAM;Event Capture Report RPC Broker ;Sep 5, 2000
|
---|
| 2 | ;;2.0; EVENT CAPTURE ;**25,47,61,72**;8 May 96
|
---|
| 3 | ;
|
---|
| 4 | RPTEN(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))
|
---|
| 26 | END D KILLVAR
|
---|
| 27 | I $D(^TMP("ECMSG",$J)) S RESULTS=$NA(^TMP("ECMSG",$J)) Q
|
---|
| 28 | S RESULTS=$NA(^TMP($J))
|
---|
| 29 | Q
|
---|
| 30 | ;
|
---|
| 31 | PARSE ;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
|
---|
| 35 | CHKDT ;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
|
---|
| 41 | KILLVAR ;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
|
---|
| 46 | HFSOPEN(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 | ;
|
---|
| 56 | HFSCLOSE(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
|
---|
| 64 | ECPAT ;;Patient Summary Report;ECPAT^ECRRPT
|
---|
| 65 | ECRDSSU ;;DSS Unit Workload Summary;ECRDSSU^ECRRPT
|
---|
| 66 | ECPROV ;;Provider Summary Report;ECPROV^ECRRPT
|
---|
| 67 | PROSUM ;;Provider (1-7) Summary Report;PROSUM^ECRRPT
|
---|
| 68 | ECOSSUM ;;Ordering Section Summary Report;ECOSSUM^ECRRPT
|
---|
| 69 | ECPCER ;;PCE Data Summary Report;ECPCER^ECRRPT
|
---|
| 70 | ECRPERS ;;Inactive Person Class Report;ECRPERS^ECRRPT1
|
---|
| 71 | ECRPRSN ;;Procedure Reason Report;ECRPRSN^ECRRPT1
|
---|
| 72 | ECDSS1 ;;National/Local Procedure Reports;ECDSS1^ECRRPT1
|
---|
| 73 | ECDSS3 ;;Category Reports;ECDSS3^ECRRPT1
|
---|
| 74 | ECSUM ;;Print Category and Procedure Summary (Report);ECSUM^ECRRPT1
|
---|
| 75 | ECNTPCE ;;Records Failing Transmission to PCE Report;ECNTPCE^ECRRPT1
|
---|
| 76 | ECSCPT ;;Event Code Screens with CPT Codes;ECSCPT^ECRRPT1
|
---|
| 77 | ECINCPT ;;National/Local Procedure Codes with Inactive CPT;ECINCPT^ECRRPT1
|
---|