Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SDCLAV

SDCLAV.m

Go to the documentation of this file.
SDCLAV ;ALB/LDB - ROUTINE TO OUTPUT PATTERNS ;5/8/91  16:39
 ;;5.3;Scheduling;**1011,1015**;Aug 13, 1993;Build 21
 ;IHS/ANMC/LJF 10/05/2000 changed legend to reflect change in SDCLAV1
 ;                         that now displays all cancelled appts.
 ;             01/09/2004 expanded clinic selection if principle clinic
 ;
 K ^UTILITY($J,"SDNMS"),X,Y S SDUP=0
DIV ;D ASK2^SDDIV G:Y<0 END S VAUTNI=2 D CLINIC^VAUTOMA  ;cmi/maw 11/9/2009 orig line
 ;I VAUTC=0 D EXPNDPC^BSDU(2,.VAUTC)    ;expand principle clinics;IHS/ITSC/LJF 1/9/2004  cmi/maw 11/9/2009 orig line
 S DIV="" D CLINIC^BSDU(2) I $D(BSDQ) K BSDQ G END  ;cmi/maw 11/9/2009 PATCH 1011 changed to standard call
 ;G:Y<0 END  ;cmi/maw 11/9/2009 orig line
 S (SDZ1,SDZ2)=0,SDT00="AEX" D DATE^SDUTL G:POP END S SDZ=SDBD
 ;cmi/maw 11/9/2009 orig line
INC S DTOUT=0 W !,"INCLUDE CANCELLATIONS AND/OR NO-SHOWS" S %=2 D YN^DICN S:%=1 SDCI=1 G:DTOUT!(%=-1) END I '$D(SDCI)&'% D HELP G INC
Q S SDIO=IO(0) S DGVAR="VAUTC^VAUTC#^VAUTD^VAUTD#^SDZ^SDZ1^SDZ2^SDNM^SDBD^SDED^SDUP^SDIO"_$S($D(SDCI):"^SDCI",1:""),DGPGM="^SDCLAV0" D ZIS^DGUTQ G:POP END U IO S SDIO=IO D ^SDCLAV0 Q
HELP W !,"Responding 'N' will exclude appts cancelled by cancelling availability and all no-showed appts." Q
END K %,%H,%I,%Y,BEGDATE,C,D,D1,D8,DIC,DGVAR,DGPGM,DGTCH,DTOUT,DUOUT,ENDDATE,J,M1,P,POP,S7,S8,S9,SD,SD0,SD5,SDAP,SDAP1,SDBD,SDC,SDCI,SDC1,SDC3,SDHY,SDI,SDIO,SDIN,SDED,SDNM,SDPT,SDT,SDU,SDUP,SDUT,SDM,SDM1,SDN1,SDN2,SDN3,SDRE,SDV,SDZ
 K SDZ1,SDZ2,T,VAUTC,VAUTD,X,X1,X2,X4,X5,X6,X9,Y,Y1,Y2,Y3,Y4,Z,Z1,Z5,Z6,Z7,Z8,^UTILITY($J) D CLOSE^DGUTQ Q
A1 W !!,"FOR INDIVIDUAL APPOINTMENT LISTINGS:"
 W:$D(SDCI) !?39,"* --APPTS CANCELLED WHEN CLINIC WAS",!?43,"CANCELLED",!?38,"**",?40," --NO-SHOW"
 W !?37,"*** --UNSCHEDULED VISIT" Q
PG S P=P+1 W:$E(IOST,1,2)="P-" ?72,"PAGE ",P
 I '$D(^UTILITY($J,"DGTC",SDV)) S ^UTILITY($J,"DGTC",SDV,P)=""
 S S9=$E(SDZ,4,5),S7=$E(SDZ,2,3) I '$D(^UTILITY($J,"DGTC",SDV_" "_S7_"-"_$S($L(S9)<2:0_S9,1:S9)_" "_SDM)) S ^UTILITY($J,"DGTC",SDV_" "_S7_"-"_$S($L(S9)<2:0_S9,1:S9)_" "_SDM,P)=""
 Q
INAC K SDIN,SDRE I $D(^SC(+SDC,"I")) S SDIN=+^("I"),SDRE=+$P(^("I"),U,2)
 I $S('$D(SDIN):0,'SDIN:0,1:1) W !!,"Clinic --inactive ",$S(SDRE:"from ",1:"as of ") S SDHY=+SDC,Y=SDIN D DTS^SDUTL W Y S Y=SDRE D:Y DTS^SDUTL W $S(SDRE:" to "_Y,1:"")
 Q