source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCTIME.m@ 1270

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

initial load of WorldVistAEHR

File size: 1.7 KB
RevLine 
[613]1ONCTIME ;Hines OIFO/GWB [Timeliness report];02/10/00
2 ;;2.11;ONCOLOGY;**47**;Mar 07, 1995;Build 19
3 ;
4TIME ;[Timeliness report]
5 N SDT,EDT,IEN,CNT,LESCNT,GTRCNT,RPTDATE,DIVISION
6 W @IOF
7 W !?3,"Timeliness report",!
8 S %DT="AEX",%DT("A")=" Start Date Case Completed: "
9 D ^%DT K %DT
10 Q:Y<1 S START=Y,SDT=Y-1
11 S %DT="AEX",%DT("A")=" End Date Case Completed..: "
12 D ^%DT K %DT
13 Q:Y<1 S (END,EDT)=Y
14 W !
15 N %ZIS,IOP,POP
16 S %ZIS="MQ"
17 D ^%ZIS Q:$G(POP)
18 I $D(IO("Q")) D TASK G EXIT
19 U IO D COMP D ^%ZISC K %ZIS,IOP G EXIT
20 ;
21COMP S (CNT,LESCNT,GTRCNT)=0
22 F S SDT=$O(^ONCO(165.5,"AAD",SDT)) Q:(SDT="")!(SDT>EDT) S IEN=0 F S IEN=$O(^ONCO(165.5,"AAD",SDT,IEN)) Q:IEN="" I $$DIV^ONCFUNC(IEN)=DUZ(2) D
23 .S CNT=CNT+1
24 .S EDTC=$$GET1^DIQ(165.5,IEN,157)
25 .I EDTC<181 S LESCNT=LESCNT+1
26 .I EDTC>180 S GTRCNT=GTRCNT+1
27 I CNT=0 D D:$E(IOST,1,2)="C-" PAUSE^ONCOPA2A G EXIT
28 .W !,?3,"No cases found in this date range.",!
29 S TIMEPCT=LESCNT/CNT
30 S TIMEPCT=$J(TIMEPCT,3,2)*100_"%"
31 S Y=DT D DD^%DT S RPTDATE=Y
32 S DIVISION=$P(^DIC(4,DUZ(2),0),U,1)
33 S Y=START D DD^%DT S START=Y
34 S Y=END D DD^%DT S END=Y
35 W !
36 W !?3,"TIMELINESS REPORT",?60,RPTDATE
37 W !
38 W !?3,"Start Date Case Completed......: ",START
39 W !?3,"End Date Case Completed........: ",END
40 W !?3,"Division.......................: ",DIVISION
41 W !?3,"Cases Completed < or = 180 days: ",LESCNT
42 W !?3,"Cases Completed > 180 days.....: ",GTRCNT
43 W !?3,"Percentage of cases compliant..: ",TIMEPCT
44 I $E(IOST,1,2)="C-" W ! D PAUSE^ONCOPA2A
45 D ^%ZISC
46 Q
47 ;
48TASK ;Queue a task
49 K IO("Q"),ZTUCI,ZTDTH,ZTIO,ZTSAVE
50 S ZTRTN="COMP^ONCTIME",ZTREQ="@",ZTSAVE("ZTREQ")=""
51 S ZTDESC="Timeliness Report"
52 S ZTSAVE("SDT")="",ZTSAVE("EDT")="",ZTSAVE("START")="",ZTSAVE("END")=""
53 D ^%ZTLOAD D ^%ZISC U IO W !,"Request Queued",!
54 K ZTSK
55 Q
56 ;
57EXIT Q
Note: See TracBrowser for help on using the repository browser.