source: WorldVistAEHR/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCST.m@ 1661

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

initial load of WorldVistAEHR

File size: 2.2 KB
Line 
1GMRCST ;SLC/DCM,dee - Statistics on how long to complete consult/requests for a service ;11/15/02 07:39
2 ;;3.0;CONSULT/REQUEST TRACKING;**1,7,29**;DEC 27, 1997
3EN ; -- main entry point for GMRC REQUEST COMPLETE STAT
4 K GMRCSVC,GMRCSVCP
5 I $D(GMRCEACT),$L(GMRCEACT) D I '$D(^GMR(123.5,$G(GMRCSVC),0)) D EXIT Q
6 .S GMRCSVCP=GMRCEACT
7 .S GMRCSVC=$O(^GMR(123.5,"B",GMRCSVCP,0))
8 .Q:'$D(^GMR(123.5,$G(GMRCSVC),0))
9 .;Build service array
10 .S GMRCDG=GMRCSVC
11 .D SERV1^GMRCASV
12 .;Set date range to ALL
13 .S GMRCDT1="ALL"
14 .S GMRCDT2=0
15 .D LISTDATE^GMRCSTU1(GMRCDT1,GMRCDT2,.GMRCEDT1,.GMRCEDT2)
16 ;If no service ask for one
17 I '$L($G(GMRCSVC)) D EN^GMRCSTU I $D(GMRCQUT) D EXIT Q
18 ;Quit if no array of services
19 I '$O(^TMP("GMRCSLIST",$J,0)) S GMRCQUT=1 D EXIT Q
20 ;
21 D ODT^GMRCSTU Q:$D(GMRCQUT)
22 D EN^VALM("GMRC REQUEST COMPLETE STAT")
23 Q
24 ;
25HDR ; -- header code
26 S VALMHDR(1)="Number Of Days To Complete A Consult For Services Statistics."
27 S VALMHDR(2)="FROM: "_$G(GMRCEDT1)_" TO: "_$G(GMRCEDT2)
28 Q
29 ;
30INIT ; -- init variables and list array
31 S VALMCNT=$G(GMRCCT),VALMBCK="R"
32 Q
33 ;
34HELP ; -- help code
35 S X="?" D DISP^XQORM1 W !!
36 Q
37 ;
38EXIT ; -- exit code
39 K ^TMP("GMRCR",$J,"PRL"),^TMP("GMRCSVC",$J)
40 K GMRCCT,GMRCSVC,GMRCEDT1,GMRCEDT2
41 Q
42 ;
43EXPND ; -- expand code
44 Q
45 ;
46PRNTONLY ;Option to just send the report to a device.
47 ;Get the service and date range.
48 N GMRCQUT,RETURN,GMRCDG,VALMBCK
49 N GMRCDT1,GMRCDT2,GMRCEDT1,GMRCEDT2
50 D EN^GMRCSTU
51 I $D(GMRCQUT) D EXIT Q
52 ;Quit if no array of services
53 I '$O(^TMP("GMRCSLIST",$J,0)) S GMRCQUT=1 D EXIT Q
54 ;Get the device
55 D PRNTASK^GMRCSTU
56 I $D(GMRCQUT) D EXIT Q
57 ;Create the report if not queued
58 I '$D(IO("Q")) D ENOR^GMRCSTU(.RETURN,GMRCDG,GMRCDT1,GMRCDT2)
59 ;Print the report
60 D PRNTIT^GMRCSTU("PRL","PRNTQ^GMRCST","CONSULT/REQUEST PACKAGE PRINT COMPLETION TIME STATISTICS FROM OPTION")
61 D EXIT
62 Q
63 ;
64PRNTQ ;Print Queued report from ^TMP global then kill off ^TMP & ^XTMP
65 ;Create the report
66 N RETURN,INDEX
67 D ENOR^GMRCSTU(.RETURN,GMRCDG,GMRCDT1,GMRCDT2)
68 U IO
69 S INDEX=""
70 F S INDEX=$O(^TMP("GMRCR",$J,TMPNAME,INDEX)) Q:INDEX="" W ^TMP("GMRCR",$J,TMPNAME,INDEX,0),!
71 K ^TMP("GMRCR",$J,TMPNAME),^XTMP("GMRCR",J,DOLLARH,"PRINT"),J,DOLLARH
72 D ^%ZISC
73 D EXIT
74 Q
75 ;
Note: See TracBrowser for help on using the repository browser.