SDNOS2 ;ALB/LDB - DIVISION TOTAL FOR NO-SHOW REPORT ; 07 May 99 10:25 AM
;;5.3;Scheduling;**194,410**;Aug 13, 1993
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
;
HDR Q:SDIO=IO&(SDEND) D NOW^%DTC S Y=% X ^DD("DD") W @IOF,Y,?70,"PAGE " S P1=P1+1 W P1
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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDNOS2 1832 printed Nov 22, 2024@18:08:51 Page 2
SDNOS2 ;ALB/LDB - DIVISION TOTAL FOR NO-SHOW REPORT ; 07 May 99 10:25 AM
+1 ;;5.3;Scheduling;**194,410**;Aug 13, 1993
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 WRITE !!,SDPR1(SDDIV)," of appointments in the clinic(s) selected for this report",!,"for this period were NO-SHOWS ",!
QUIT
+6 ;
HDR if SDIO=IO&(SDEND)
QUIT
DO NOW^%DTC
SET Y=%
XECUTE ^DD("DD")
WRITE @IOF,Y,?70,"PAGE "
SET P1=P1+1
WRITE P1
+1 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
+2 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