| 1 | ONCTNMC ;Hines OIFO/GWB [TNM Compute percentage of TNM forms completed];02/10/00
|
---|
| 2 | ;;2.11;ONCOLOGY;**46**;Mar 07, 1995;Build 39
|
---|
| 3 | ;
|
---|
| 4 | TNMCA ;[TNM Compute percentage of TNM forms completed]
|
---|
| 5 | N SDT,EDT,IEN,TNMA,TNMC,TNMACNT,TNMCCNT,TNMP,RPTDATE,DIVISION
|
---|
| 6 | W @IOF
|
---|
| 7 | W !?3,"Compute percentage of TNM forms completed",!
|
---|
| 8 | S %DT="AE",%DT("A")=" Start Date DX: "
|
---|
| 9 | D ^%DT K %DT
|
---|
| 10 | Q:Y<1 S START=Y,SDT=Y-1
|
---|
| 11 | S %DT="AE",%DT("A")=" End Date DX..: ",%DT("B")="TODAY"
|
---|
| 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 TNM D ^%ZISC K %ZIS,IOP G EXIT
|
---|
| 20 | ;
|
---|
| 21 | TNM S (TNMACNT,TNMCCNT)=0
|
---|
| 22 | F S SDT=$O(^ONCO(165.5,"ADX",SDT)) Q:(SDT="")!(SDT>EDT) S IEN=0 F S IEN=$O(^ONCO(165.5,"ADX",SDT,IEN)) Q:IEN="" I $$DIV^ONCFUNC(IEN)=DUZ(2) D
|
---|
| 23 | .S TNMA=$P($G(^ONCO(165.5,IEN,7)),U,7)
|
---|
| 24 | .S TNMC=$P($G(^ONCO(165.5,IEN,7)),U,14)
|
---|
| 25 | .I (TNMA="")!(TNMA="0000000")!(TNMA=8888888)!(TNMA=9999999) Q
|
---|
| 26 | .S TNMACNT=TNMACNT+1
|
---|
| 27 | .I (TNMC="")!(TNMC="0000000")!(TNMC=8888888)!(TNMC=9999999) Q
|
---|
| 28 | .S TNMCCNT=TNMCCNT+1
|
---|
| 29 | I TNMACNT=0 D W ! D PAUSE^ONCOPA2A G EXIT
|
---|
| 30 | .W !,?3,"No TNM Forms have been assigned."
|
---|
| 31 | S TNMP=TNMCCNT/TNMACNT
|
---|
| 32 | S TNMP=$J(TNMP,3,2)*100_"%"
|
---|
| 33 | S Y=DT D DD^%DT S RPTDATE=Y
|
---|
| 34 | S DIVISION=$P(^DIC(4,DUZ(2),0),U,1)
|
---|
| 35 | S Y=START D DD^%DT S START=Y
|
---|
| 36 | S Y=END D DD^%DT S END=Y
|
---|
| 37 | W !
|
---|
| 38 | W !?3,"TNM FORMS ASSIGNED/COMPLETED REPORT",?60,RPTDATE
|
---|
| 39 | W !
|
---|
| 40 | W !?3,"Start Date DX................: ",START
|
---|
| 41 | W !?3,"End Date DX..................: ",END
|
---|
| 42 | W !?3,"Division.....................: ",DIVISION
|
---|
| 43 | W !?3,"TNM Forms Assigned...........: ",TNMACNT
|
---|
| 44 | W !?3,"TNM Forms Completed..........: ",TNMCCNT
|
---|
| 45 | W !?3,"Percentage of Forms completed: ",TNMP
|
---|
| 46 | D ^%ZISC
|
---|
| 47 | W ! D PAUSE^ONCOPA2A
|
---|
| 48 | Q
|
---|
| 49 | ;
|
---|
| 50 | TASK ;Queue a task
|
---|
| 51 | K IO("Q"),ZTUCI,ZTDTH,ZTIO,ZTSAVE
|
---|
| 52 | S ZTRTN="TNM^ONCTNMC",ZTREQ="@",ZTSAVE("ZTREQ")=""
|
---|
| 53 | S ZTDESC="Compute percentage of TNM forms completed"
|
---|
| 54 | S ZTSAVE("SDT")="",ZTSAVE("EDT")="",ZTSAVE("START")="",ZTSAVE("END")=""
|
---|
| 55 | D ^%ZTLOAD D ^%ZISC U IO W !,"Request Queued",!
|
---|
| 56 | K ZTSK
|
---|
| 57 | Q
|
---|
| 58 | ;
|
---|
| 59 | EXIT Q
|
---|