source: FOIAVistA/trunk/r/ORDER_ENTRY_RESULTS_REPORTING-OR-OCX--ORRC--ORRJ/ORPRS10.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1ORPRS10 ; slc/dcm - Summary time, when the livin is easy... ;10/19/98 13:50
2 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**23,37,11,69,121**;Dec 17, 1997
3DAY ;PROCESS 24-HR ORDER SUMMARY
4 S OREND=0,ORTIT="DAILY ORDER SUMMARY",ORPRES=1
5 D:$D(ORSCPAT)'>9 P^ORPRS01
6 G:OREND END
7 D DAY^ORPRS01()
8 G:OREND END
9 D CONT(ORTIT)
10 Q
11RANGE ;PROCESS START THRU STOP DATE/TIME RANGE
12 S OREND=0,ORTIT="ORDER SUMMARY",ORPRES=1
13 D:$D(ORSCPAT)'>9 P^ORPRS01
14 G:OREND END
15 D RANGE^ORPRS01()
16 G:OREND END
17 D CONT("Order summary for date range")
18 Q
19GENERIC ;PROCESS WITH PROMPTS FOR ALL REPORT VARIABLES
20 S OREND=0
21 D:$D(ORSCPAT)'>9 P^ORPRS01
22 G:OREND!'$D(ORSCPAT) END
23 D PRES^ORPRS09
24 G:OREND END
25 D SERV^ORPRS09
26 G:OREND END
27 D RANGE^ORPRS01()
28 G:OREND END
29 S ORTIT=$P(ORPRES,";",2)_" for "_ORGRP("NAM")_" SERVICES"
30 D CONT(ORTIT)
31 Q
32CONT(DESC) ;
33 D QUE^ORUTL1("EN1^ORPRS10",$G(DESC))
34 Q
35EN1 ;Entry point for Batch Processing
36 ;Setup display group list, patient list, and process reports
37 N ORDG,ORGRP,ORSEL,ORSEQ,ORLIST,ORAW
38 U IO
39 S ORDG=1,ORGRP("NAM")="ALL",ORGRP("ROOT")=1,ORSEL="BILD",ORSEQ=0,ORPRES=1
40 S ORAW=$S(+$$GET^XPAR("SYS","OR ORDER SUMMARY CONTEXT",1,"I"):"AW",1:"")
41 I $E(IOST)'="C",$L($G(ORSWDN)) S ORSLTR=$E(ORSWDN,1,(IOM\15)) D ^ORSLTR
42 I ORSHORT D PTOP^ORPRS05(0,ORTIT,ORSHORT,ORSSTRT,ORSSTOP)
43 S (NEXTP,OREND)=0
44 F S NEXTP=$O(ORSCPAT(NEXTP)) Q:NEXTP=""!(OREND=1) D
45 . S ORVP=+ORSCPAT(NEXTP)_";DPT("
46 . D EN^ORQ1(ORVP,ORDG,+ORPRES,0,+ORSSTRT,+ORSSTOP,0,1,ORAW)
47 . N ORPI,ORPA,ORPN,X,ORPIFN
48 . S ORPI=0 F S ORPI=$O(^TMP("ORR",$J,ORLIST,ORPI)) Q:'ORPI D
49 .. S ORPIFN=+^TMP("ORR",$J,ORLIST,ORPI),ORPA=$P(^(ORPI),";",2)
50 .. I $D(^OR(100,ORPIFN,8,ORPA,0)) S X=^(0),ORPN=$P(X,"^",12)
51 .. I $G(ORPN),$D(^ORD(100.02,ORPN,1)),'$P(^(1),"^",3) K ^TMP("ORR",$J,ORLIST,ORPI)
52 . I $$GET^XPAR("ALL","ORPF SUMMARY SORT FORWARD",1,"I") D SORT^ORPRS02
53 . D @$S(ORSHORT:"EN^ORPRS04",1:"EN^ORPRS03")
54 . K ^TMP("ORR",$J,ORLIST)
55 I ORSHORT W !
56END ; Clean up variables
57 K I,II,J,K,NEXTP,NB,ND,NS,ORSLTR,ORES,ODATE,ORAGE,ORDCFC,ORMD,ORDG,ORDIC,ORDOB,OREND,ORFT,ORGRP,ORH,ORH2,ORHI,ORIO,ORL,ORLST,ORODT,ORNP,ORPD,ORPFG,ORPNM,ORPRES,ORUSER,ORPV,ORREQ
58 K ORSEL,ORSEQ,ORSEX,ORSP,ORSPAT,ORSPL,ORSSN,ORSSTOP,ORSSTRT,ORSTRT,ORSTOP,ORSTS,ORASTS,ORTIT,ORTM,ORTS,ORTX,ORVP,ORWARD,ORX,X,X1,Y,%,%DT,%IS,ORSWD,ORSWDN,ORRPG,ORIFN
59 I $D(ZTQUEUED) S ZTREQ="@"
60 Q
Note: See TracBrowser for help on using the repository browser.