SDNOS2 ;ALB/LDB - DIVISION TOTAL FOR NO-SHOW REPORT ; 07 May 99 10:25 AM
;;5.3;Scheduling;**194,410,1015**;Aug 13, 1993;Build 21
;IHS/ANMC/LJF 11/03/2000 added total # appts to % statement
; removed page # from list template
;
SDTOT Q:SDEND D HDR W !,?30,"TOTALS FOR ",SDDIV2 D HDR2
N SDRT S SDRT="^UTILITY($J,""SDNO"",SDDIV)"
W !!,?27,$G(@SDRT@("***N***","***TOT***"))+$G(@SDRT@("***NT***","***TOT***"))+$G(@SDRT@("******","***TOT***")),?47,@SDRT@("***NA***","***TOT***"),?75,@SDRT@("***TOT***"),!!!
S SDPR1(SDDIV)=$S(@SDRT@("***TOT***"):$J((^("***TOT***")/@SDRT@("***SDNMS***")*100),2,0),1:0)_"%" ; NAKED REFERENCE - ^UTILITY($J,"SDNO",DIV,"***TOT***")
D:(SDIO=IO(0))&($E(IOST,1,2)="C-") OUT^SDUTL Q:SDEND D:$Y+6>IOSL HDR
;W !!,SDPR1(SDDIV)," of appointments in the clinic(s) selected for this report",!,"for this period were NO-SHOWS ",! Q ;IHS/ANMC/LJF 11/03/2000
NEW X S X=$G(^UTILITY($J,"SDNO",SDDIV,"***SDNMS***"))+$G(^UTILITY($J,"SDNO",SDDIV,"***TOT***")) ;IHS/ANMC/LJF 11/03/2000 total appts
W !!,SDPR1(SDDIV)," of "_X_" appointments in the all clinics selected for this report",!,"for this period were NO-SHOWS ",! Q ;IHS/ANMC/LJF 11/03/2000
;
HDR ;Q:SDIO=IO&(SDEND) D NOW^%DTC S Y=% X ^DD("DD") W @IOF,Y,?70,"PAGE " S P1=P1+1 W P1 ;IHS/ANMC/LJF 11/03/2000
Q:SDIO=IO&(SDEND) I '$G(VALM) D NOW^%DTC S Y=% X ^DD("DD") W @IOF,Y,?70,"PAGE " S P1=P1+1 W P1 ;IHS/ANMC/LJF 11/03/2000
W !,?30,"NO SHOW REPORT",$S(SDTOT!SDTOT1:" TOTALS",1:""),! D LINE W !!,?2,"FOR PERIOD COVERING: " S Y=SDBD D D^DIQ S SDBG=Y W ?30,SDBG
I $D(SDED) S Y=SDED D D^DIQ W " TO ",Y
DIV I $D(^DG(40.8,SDDIV,0)) S SDDIV2=$P(^(0),U,1)
I $D(^DG(43,1,"GL")),$P(^("GL"),U,2),$D(^DG(40.8,SDDIV,0)) W !,?9,"FOR DIVISION: ",?30,SDDIV2
I $L(SDC),'$D(^UTILITY($J,"DGTC",SDC))&('SDTOT)&('SDTOT1) S ^UTILITY($J,"DGTC",SDC,P1)=""
I $L(SDC),'$D(^UTILITY($J,"DGTC",SDC_" TOTALS"))&(SDTOT) S ^UTILITY($J,"DGTC",SDC_" TOTALS",P1)=""
I '$D(^UTILITY($J,"DGTC",SDDIV2))&('SDV1) S ^UTILITY($J,"DGTC",SDDIV2,P1)=""
I '$D(^UTILITY($J,"DGTC",SDDIV2_" TOTALS"))&(SDTOT1) S ^UTILITY($J,"DGTC",SDDIV2_" TOTALS",P1)=""
W:'SDTOT1!(SDTOT1&(SDC>0)) !,?11,"FOR CLINIC:",?30,SDC D LINE W ! Q
;
LINE S X="",$P(X,"=",IOM)="" W !,X Q
;
HDR2 Q:SDEND W !!,?22,"TOTAL NO-SHOWS W/NO",?45,"TOTAL NO-SHOWS W/",?65,"TOTAL NO-SHOWS"
W:'SDTOT1 !,"DATE" W:SDTOT1 ! W ?22,"REBOOKED APPTS.",?45,"REBOOKED APPTS." D LINE Q
SDNOS2 ;ALB/LDB - DIVISION TOTAL FOR NO-SHOW REPORT ; 07 May 99 10:25 AM
+1 ;;5.3;Scheduling;**194,410,1015**;Aug 13, 1993;Build 21
+2 ;IHS/ANMC/LJF 11/03/2000 added total # appts to % statement
+3 ; removed page # from list template
+4 ;
SDTOT IF SDEND
QUIT
DO HDR
WRITE !,?30,"TOTALS FOR ",SDDIV2
DO HDR2
+1 NEW SDRT
SET SDRT="^UTILITY($J,""SDNO"",SDDIV)"
+2 WRITE !!,?27,$GET(@SDRT@("***N***","***TOT***"))+$GET(@SDRT@("***NT***","***TOT***"))+$GET(@SDRT@("******","***TOT***")),?47,@SDRT@("***NA***","***TOT***"),?75,@SDRT@("***TOT***"),!!!
+3 ; NAKED REFERENCE - ^UTILITY($J,"SDNO",DIV,"***TOT***")
SET SDPR1(SDDIV)=$SELECT(@SDRT@("***TOT***"):$JUSTIFY((^("***TOT***")/@SDRT@("***SDNMS***")*100),2,0),1:0)_"%"
+4 IF (SDIO=IO(0))&($EXTRACT(IOST,1,2)="C-")
DO OUT^SDUTL
IF SDEND
QUIT
IF $Y+6>IOSL
DO HDR
+5 ;W !!,SDPR1(SDDIV)," of appointments in the clinic(s) selected for this report",!,"for this period were NO-SHOWS ",! Q ;IHS/ANMC/LJF 11/03/2000
+6 ;IHS/ANMC/LJF 11/03/2000 total appts
NEW X
SET X=$GET(^UTILITY($JOB,"SDNO",SDDIV,"***SDNMS***"))+$GET(^UTILITY($JOB,"SDNO",SDDIV,"***TOT***"))
+7 ;IHS/ANMC/LJF 11/03/2000
WRITE !!,SDPR1(SDDIV)," of "_X_" appointments in the all clinics selected for this report",!,"for this period were NO-SHOWS ",!
QUIT
+8 ;
HDR ;Q:SDIO=IO&(SDEND) D NOW^%DTC S Y=% X ^DD("DD") W @IOF,Y,?70,"PAGE " S P1=P1+1 W P1 ;IHS/ANMC/LJF 11/03/2000
+1 ;IHS/ANMC/LJF 11/03/2000
IF SDIO=IO&(SDEND)
QUIT
IF '$GET(VALM)
DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
WRITE @IOF,Y,?70,"PAGE "
SET P1=P1+1
WRITE P1
+2 WRITE !,?30,"NO SHOW REPORT",$SELECT(SDTOT!SDTOT1:" TOTALS",1:""),!
DO LINE
WRITE !!,?2,"FOR PERIOD COVERING: "
SET Y=SDBD
DO D^DIQ
SET SDBG=Y
WRITE ?30,SDBG
+3 IF $DATA(SDED)
SET Y=SDED
DO D^DIQ
WRITE " TO ",Y
DIV IF $DATA(^DG(40.8,SDDIV,0))
SET SDDIV2=$PIECE(^(0),U,1)
+1 IF $DATA(^DG(43,1,"GL"))
IF $PIECE(^("GL"),U,2)
IF $DATA(^DG(40.8,SDDIV,0))
WRITE !,?9,"FOR DIVISION: ",?30,SDDIV2
+2 IF $LENGTH(SDC)
IF '$DATA(^UTILITY($JOB,"DGTC",SDC))&('SDTOT)&('SDTOT1)
SET ^UTILITY($JOB,"DGTC",SDC,P1)=""
+3 IF $LENGTH(SDC)
IF '$DATA(^UTILITY($JOB,"DGTC",SDC_" TOTALS"))&(SDTOT)
SET ^UTILITY($JOB,"DGTC",SDC_" TOTALS",P1)=""
+4 IF '$DATA(^UTILITY($JOB,"DGTC",SDDIV2))&('SDV1)
SET ^UTILITY($JOB,"DGTC",SDDIV2,P1)=""
+5 IF '$DATA(^UTILITY($JOB,"DGTC",SDDIV2_" TOTALS"))&(SDTOT1)
SET ^UTILITY($JOB,"DGTC",SDDIV2_" TOTALS",P1)=""
+6 IF 'SDTOT1!(SDTOT1&(SDC>0))
WRITE !,?11,"FOR CLINIC:",?30,SDC
DO LINE
WRITE !
QUIT
+7 ;
LINE SET X=""
SET $PIECE(X,"=",IOM)=""
WRITE !,X
QUIT
+1 ;
HDR2 IF SDEND
QUIT
WRITE !!,?22,"TOTAL NO-SHOWS W/NO",?45,"TOTAL NO-SHOWS W/",?65,"TOTAL NO-SHOWS"
+1 IF 'SDTOT1
WRITE !,"DATE"
IF SDTOT1
WRITE !
WRITE ?22,"REBOOKED APPTS.",?45,"REBOOKED APPTS."
DO LINE
QUIT