BSDCCR5 ; IHS/ANMC/LJF - CLINIC CAPACITY REPORT CONT. ;
;;5.3;PIMS;;APR 26, 2002
;COPY OF SCRPW75 BEFORE PATCH #223
;IHS/ANMC/LJF 10/05/2000 removed time from date appt made in ^TMP
; 10/06/2000 added call to IHS footer code
; 6/15/2001 added code for Cache (Set $P of undef global)
; 3/13/2002 only process for selected clinics
;
NAVA(SDBDT,SDEDT,SDEX) ;Gather next available appointment wait time information
;Input: SDBDT=beginning date
;Input: SDEDT=ending date
;Input: SDEX='0' for user report, '1' for Austin extract
;Output: ^TMP("SDNAVA",$J) array in the format:
; ^TMP("SDNAVA",$J,division)='x'
; ^TMP("SDNAVA",$J,division,credit_pair)='x'
; ^TMP("SDNAVA",$J,division,credit_pair,clinic_ifn)='x'
; ^TMP("SDNAVA",$J,division;credit_pair,clinic_ifn,date_scheduled)='x'
; where 'x' = flag '0' appts.^ave. flag '0' wait time^flag
; '1' appts.^ave. flag '1' wait time^flag '2'
; appts.^ave. flag '2' wait time^flag '3' appts.
; ^ave. flag '3' wait time
;
N SDT,SDCT,DFN,SDADT,SDAP,SDAP0,SDWAIT,SDCL,SDFLAG,SDX,SDI,SC0,SDCP
S SDT=SDBDT-1,(SDOUT,SDCT)=0
K ^TMP("SDXNAVA",$J),^TMP("SDNAVA",$J)
;
;IHS/ANMC/LJF 3/13/2002 use IHS xref so only selected clinics used
; original VA code
;F S SDT=$O(^DPT("ASADM",SDT)) Q:SDOUT!'SDT!(SDT>SDEDT) S DFN=0 D
;.F S DFN=$O(^DPT("ASADM",SDT,DFN)) Q:SDOUT!'DFN S SDADT=0 D
;..F S SDADT=$O(^DPT("ASADM",SDT,DFN,SDADT)) Q:SDOUT!'SDADT D
;...S SDCT=SDCT+1 I SDCT#1000=0 D STOP Q:SDOUT
;...S SDAP0=$G(^DPT(DFN,"S",SDADT,0)) Q:$P(SDAP0,U,19)'=SDT
;...S SDCL=+SDAP0 Q:SDCL<1 S SDFLAG=+$P(SDAP0,U,26)
;...S SDWAIT=$S(SDADT<SDT:0,1:$$FMDIFF^XLFDT(SDADT,SDT,1))
;...S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL)),U,((SDFLAG*2)+1))+1
;...S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))+SDWAIT
;...Q:SDEX=1!(SDFMT'="D")
;...Q
;..Q
;.Q
;
;IHS code using AIHSDAM xref on file 44 instead of ASADM on file 2
NEW BSDCL,X,BSDN
S X=0 F S X=$O(SDSORT(X)) Q:X="" S BSDCL(SDSORT(X))=X
S SDCL=0 F S SDCL=$O(BSDCL(SDCL)) Q:'SDCL D
. S SDT=SDBDT-1
. F S SDT=$O(^SC("AIHSDAM",SDCL,SDT)) Q:'SDT!(SDT>SDEDT) D
.. S SDADT=0 F S SDADT=$O(^SC("AIHSDAM",SDCL,SDT,SDADT)) Q:'SDADT D
... S BSDN=0
... F S BSDN=$O(^SC("AIHSDAM",SDCL,SDT,SDADT,BSDN)) Q:'BSDN D
.... S SDCT=SDCT+1 I SDCT#1000=0 D STOP Q:SDOUT
.... S SDWAIT=$S(SDADT<SDT:0,1:$$FMDIFF^XLFDT(SDADT,SDT,1))
....;
....S SDFLAG=0 ;IHS/ANMC/LJF 10/5/2000
....;
....;IHS/ANMC/LJF 6/15/2001
....I '$D(^TMP("SDXNAVA",$J,SDCL)) S ^TMP("SDXNAVA",$J,SDCL)=""
....I '$D(^TMP("SDXNAVA",$J,SDCL,(SDT\1))) S ^TMP("SDXNAVA",$J,SDCL,(SDT\1))=""
....;IHS/ANMC/LJF 6/15/2001 end of mods
....;
....S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL)),U,((SDFLAG*2)+1))+1
....S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))+SDWAIT
....Q:SDEX=1!(SDFMT'="D")
....;
....;IHS/ANMC/LJF 10/5/2000
....;S $P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL,SDT)),U,((SDFLAG*2)+1))+1
....;S $P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+2))+SDWAIT
....S $P(^TMP("SDXNAVA",$J,SDCL,(SDT\1)),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL,(SDT\1))),U,((SDFLAG*2)+1))+1
....S $P(^TMP("SDXNAVA",$J,SDCL,(SDT\1)),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL,(SDT\1)),U,((SDFLAG*2)+2))+SDWAIT
;IHS/ANMC/LJF 10/5/2000 end of mods
;IHS/ANMC/LJF 3/13/2002 end of mods
;
;
Q:SDOUT S SDCL=0
F S SDCL=$O(^TMP("SDXNAVA",$J,SDCL)) Q:'SDCL D
.S SC0=$G(^SC(SDCL,0)) Q:'$L(SC0) Q:'$$CPAIR^BSDCCR1(SC0,.SDCP)
.S SDIV=$$DIV^BSDCCR1(SC0) Q:'$L(SDIV)
.Q:'$D(^TMP("SD",$J,SDIV,SDCP,SDCL))
.S:'$D(^TMP("SDNAVA",$J,SDIV,SDCP)) ^TMP("SDNAVA",$J,SDIV,SDCP)=""
.I SDMD S:'$D(^TMP("SDNAVA",$J,0,SDCP)) ^TMP("SDNAVA",$J,0,SDCP)=""
.S SDX=^TMP("SDXNAVA",$J,SDCL),^TMP("SDNAVA",$J,SDIV,SDCP,SDCL)=$$AVE(SDX)
.I SDMD S ^TMP("SDNAVA",$J,0,SDCP,SDCL)=$$AVE(SDX)
.;
.;IHS/ANMC/LJF 6/15/2001 add line for Cache
.I SDMD,'$D(^TMP("SDNAVA",$J,0)) S ^TMP("SDNAVA",$J,0)=""
.I '$D(^TMP("SDNAVA",$J,SDIV)) S ^TMP("SDNAVA",$J,SDIV)=""
.I SDMD,'$D(^TMP("SDNAVA",$J,0,SDCP)) S ^TMP("SDNAVA",$J,0,SDCP)=""
.I '$D(^TMP("SDNAVA",$J,SDIV,SDCP)) S ^TMP("SDNAVA",$J,SDIV,SDCP)=""
.;IHS/ANMC/LJF end of new code
.;
.F SDI=1:1:8 S $P(^TMP("SDNAVA",$J,SDIV),U,SDI)=$P($G(^TMP("SDNAVA",$J,SDIV)),U,SDI)+$P(SDX,U,SDI)
.I SDMD F SDI=1:1:8 S $P(^TMP("SDNAVA",$J,0),U,SDI)=$P($G(^TMP("SDNAVA",$J,0)),U,SDI)+$P(SDX,U,SDI)
.F SDI=1:1:8 S $P(^TMP("SDNAVA",$J,SDIV,SDCP),U,SDI)=$P(^TMP("SDNAVA",$J,SDIV,SDCP),U,SDI)+$P(SDX,U,SDI)
.I SDMD F SDI=1:1:8 S $P(^TMP("SDNAVA",$J,0,SDCP),U,SDI)=$P(^TMP("SDNAVA",$J,0,SDCP),U,SDI)+$P(SDX,U,SDI)
.S SDT=0 F S SDT=$O(^TMP("SDXNAVA",$J,SDCL,SDT)) Q:SDOUT!'SDT D
..S SDX=^TMP("SDXNAVA",$J,SDCL,SDT),^TMP("SDNAVA",$J,SDIV,SDCP,SDCL,SDT)=$$AVE(SDX)
..Q
.Q
S SDIV="" F S SDIV=$O(^TMP("SDNAVA",$J,SDIV)) Q:'$L(SDIV) D
.S SDCP=0 F S SDCP=$O(^TMP("SDNAVA",$J,SDIV,SDCP)) Q:'SDCP D
..S SDX=^TMP("SDNAVA",$J,SDIV,SDCP),^TMP("SDNAVA",$J,SDIV,SDCP)=$$AVE(SDX)
..Q
.Q
S SDIV="" F S SDIV=$O(^TMP("SDNAVA",$J,SDIV)) Q:SDIV="" D
.S SDX=^TMP("SDNAVA",$J,SDIV),^TMP("SDNAVA",$J,SDIV)=$$AVE(SDX)
.Q
K ^TMP("SDXNAVA",$J)
Q
;
AVE(SDX) ;Calculate averages
;Input: SDX=string of appointment totals and total waiting time
;Output: string of appointment totals and average waiting time
N SDI,SDY
F SDI=2,4,6,8 D
.S SDY=+$P(SDX,U,(SDI-1)),$P(SDX,U,(SDI-1))=SDY
.S $P(SDX,U,SDI)=$FN($S(SDY=0:0,1:$P(SDX,U,SDI)/SDY),"",1)
.Q
Q SDX
;
STOP ;Check for stop task request
S:$D(ZTQUEUED) (SDOUT,ZTSTOP)=$S($$S^%ZTLOAD:1,1:0) Q
;
;Input: SDTX=array to return text
D FOOT^BSDCCRL(.SDTX) Q ;IHS/ANMC/LJF 10/6/2000
S SDTX(1)=SDLINE
S SDTX(2)="NOTE: TYPE '0' activity represents appointments scheduled during the report time frame that were not indicated by the user or by"
S SDTX(3)="calculation to be ""next available"" appointments. TYPE '1' activity represents appointments defined by the user as being ""next"
S SDTX(4)="available"" appointments. TYPE '2' activity represents appointments calculated to be ""next available"" appointments. TYPE '3'"
S SDTX(5)="activity represents appointments indicated both by the user and by calculation to be ""next available"" appointments. WAIT TIME is"
S SDTX(6)="the average number of days from the date an appointment was scheduled to the date it is to be performed."
S SDTX(7)=SDLINE
Q
BSDCCR5 ; IHS/ANMC/LJF - CLINIC CAPACITY REPORT CONT. ;
+1 ;;5.3;PIMS;;APR 26, 2002
+2 ;COPY OF SCRPW75 BEFORE PATCH #223
+3 ;IHS/ANMC/LJF 10/05/2000 removed time from date appt made in ^TMP
+4 ; 10/06/2000 added call to IHS footer code
+5 ; 6/15/2001 added code for Cache (Set $P of undef global)
+6 ; 3/13/2002 only process for selected clinics
+7 ;
NAVA(SDBDT,SDEDT,SDEX) ;Gather next available appointment wait time information
+1 ;Input: SDBDT=beginning date
+2 ;Input: SDEDT=ending date
+3 ;Input: SDEX='0' for user report, '1' for Austin extract
+4 ;Output: ^TMP("SDNAVA",$J) array in the format:
+5 ; ^TMP("SDNAVA",$J,division)='x'
+6 ; ^TMP("SDNAVA",$J,division,credit_pair)='x'
+7 ; ^TMP("SDNAVA",$J,division,credit_pair,clinic_ifn)='x'
+8 ; ^TMP("SDNAVA",$J,division;credit_pair,clinic_ifn,date_scheduled)='x'
+9 ; where 'x' = flag '0' appts.^ave. flag '0' wait time^flag
+10 ; '1' appts.^ave. flag '1' wait time^flag '2'
+11 ; appts.^ave. flag '2' wait time^flag '3' appts.
+12 ; ^ave. flag '3' wait time
+13 ;
+14 NEW SDT,SDCT,DFN,SDADT,SDAP,SDAP0,SDWAIT,SDCL,SDFLAG,SDX,SDI,SC0,SDCP
+15 SET SDT=SDBDT-1
SET (SDOUT,SDCT)=0
+16 KILL ^TMP("SDXNAVA",$JOB),^TMP("SDNAVA",$JOB)
+17 ;
+18 ;IHS/ANMC/LJF 3/13/2002 use IHS xref so only selected clinics used
+19 ; original VA code
+20 ;F S SDT=$O(^DPT("ASADM",SDT)) Q:SDOUT!'SDT!(SDT>SDEDT) S DFN=0 D
+21 ;.F S DFN=$O(^DPT("ASADM",SDT,DFN)) Q:SDOUT!'DFN S SDADT=0 D
+22 ;..F S SDADT=$O(^DPT("ASADM",SDT,DFN,SDADT)) Q:SDOUT!'SDADT D
+23 ;...S SDCT=SDCT+1 I SDCT#1000=0 D STOP Q:SDOUT
+24 ;...S SDAP0=$G(^DPT(DFN,"S",SDADT,0)) Q:$P(SDAP0,U,19)'=SDT
+25 ;...S SDCL=+SDAP0 Q:SDCL<1 S SDFLAG=+$P(SDAP0,U,26)
+26 ;...S SDWAIT=$S(SDADT<SDT:0,1:$$FMDIFF^XLFDT(SDADT,SDT,1))
+27 ;...S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL)),U,((SDFLAG*2)+1))+1
+28 ;...S $P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL),U,((SDFLAG*2)+2))+SDWAIT
+29 ;...Q:SDEX=1!(SDFMT'="D")
+30 ;...Q
+31 ;..Q
+32 ;.Q
+33 ;
+34 ;IHS code using AIHSDAM xref on file 44 instead of ASADM on file 2
+35 NEW BSDCL,X,BSDN
+36 SET X=0
FOR
SET X=$ORDER(SDSORT(X))
IF X=""
QUIT
SET BSDCL(SDSORT(X))=X
+37 SET SDCL=0
FOR
SET SDCL=$ORDER(BSDCL(SDCL))
IF 'SDCL
QUIT
Begin DoDot:1
+38 SET SDT=SDBDT-1
+39 FOR
SET SDT=$ORDER(^SC("AIHSDAM",SDCL,SDT))
IF 'SDT!(SDT>SDEDT)
QUIT
Begin DoDot:2
+40 SET SDADT=0
FOR
SET SDADT=$ORDER(^SC("AIHSDAM",SDCL,SDT,SDADT))
IF 'SDADT
QUIT
Begin DoDot:3
+41 SET BSDN=0
+42 FOR
SET BSDN=$ORDER(^SC("AIHSDAM",SDCL,SDT,SDADT,BSDN))
IF 'BSDN
QUIT
Begin DoDot:4
+43 SET SDCT=SDCT+1
IF SDCT#1000=0
DO STOP
IF SDOUT
QUIT
+44 SET SDWAIT=$SELECT(SDADT<SDT:0,1:$$FMDIFF^XLFDT(SDADT,SDT,1))
+45 ;
+46 ;IHS/ANMC/LJF 10/5/2000
SET SDFLAG=0
+47 ;
+48 ;IHS/ANMC/LJF 6/15/2001
+49 IF '$DATA(^TMP("SDXNAVA",$JOB,SDCL))
SET ^TMP("SDXNAVA",$JOB,SDCL)=""
+50 IF '$DATA(^TMP("SDXNAVA",$JOB,SDCL,(SDT\1)))
SET ^TMP("SDXNAVA",$JOB,SDCL,(SDT\1))=""
+51 ;IHS/ANMC/LJF 6/15/2001 end of mods
+52 ;
+53 SET $PIECE(^TMP("SDXNAVA",$JOB,SDCL),U,((SDFLAG*2)+1))=$PIECE($GET(^TMP("SDXNAVA",$JOB,SDCL)),U,((SDFLAG*2)+1))+1
+54 SET $PIECE(^TMP("SDXNAVA",$JOB,SDCL),U,((SDFLAG*2)+2))=$PIECE(^TMP("SDXNAVA",$JOB,SDCL),U,((SDFLAG*2)+2))+SDWAIT
+55 IF SDEX=1!(SDFMT'="D")
QUIT
+56 ;
+57 ;IHS/ANMC/LJF 10/5/2000
+58 ;S $P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+1))=$P($G(^TMP("SDXNAVA",$J,SDCL,SDT)),U,((SDFLAG*2)+1))+1
+59 ;S $P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+2))=$P(^TMP("SDXNAVA",$J,SDCL,SDT),U,((SDFLAG*2)+2))+SDWAIT
+60 SET $PIECE(^TMP("SDXNAVA",$JOB,SDCL,(SDT\1)),U,((SDFLAG*2)+1))=$PIECE($GET(^TMP("SDXNAVA",$JOB,SDCL,(SDT\1))),U,((SDFLAG*2)+1))+1
+61 SET $PIECE(^TMP("SDXNAVA",$JOB,SDCL,(SDT\1)),U,((SDFLAG*2)+2))=$PIECE(^TMP("SDXNAVA",$JOB,SDCL,(SDT\1)),U,((SDFLAG*2)+2))+SDWAIT
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+62 ;IHS/ANMC/LJF 10/5/2000 end of mods
+63 ;IHS/ANMC/LJF 3/13/2002 end of mods
+64 ;
+65 ;
+66 IF SDOUT
QUIT
SET SDCL=0
+67 FOR
SET SDCL=$ORDER(^TMP("SDXNAVA",$JOB,SDCL))
IF 'SDCL
QUIT
Begin DoDot:1
+68 SET SC0=$GET(^SC(SDCL,0))
IF '$LENGTH(SC0)
QUIT
IF '$$CPAIR^BSDCCR1(SC0,.SDCP)
QUIT
+69 SET SDIV=$$DIV^BSDCCR1(SC0)
IF '$LENGTH(SDIV)
QUIT
+70 IF '$DATA(^TMP("SD",$JOB,SDIV,SDCP,SDCL))
QUIT
+71 IF '$DATA(^TMP("SDNAVA",$JOB,SDIV,SDCP))
SET ^TMP("SDNAVA",$JOB,SDIV,SDCP)=""
+72 IF SDMD
IF '$DATA(^TMP("SDNAVA",$JOB,0,SDCP))
SET ^TMP("SDNAVA",$JOB,0,SDCP)=""
+73 SET SDX=^TMP("SDXNAVA",$JOB,SDCL)
SET ^TMP("SDNAVA",$JOB,SDIV,SDCP,SDCL)=$$AVE(SDX)
+74 IF SDMD
SET ^TMP("SDNAVA",$JOB,0,SDCP,SDCL)=$$AVE(SDX)
+75 ;
+76 ;IHS/ANMC/LJF 6/15/2001 add line for Cache
+77 IF SDMD
IF '$DATA(^TMP("SDNAVA",$JOB,0))
SET ^TMP("SDNAVA",$JOB,0)=""
+78 IF '$DATA(^TMP("SDNAVA",$JOB,SDIV))
SET ^TMP("SDNAVA",$JOB,SDIV)=""
+79 IF SDMD
IF '$DATA(^TMP("SDNAVA",$JOB,0,SDCP))
SET ^TMP("SDNAVA",$JOB,0,SDCP)=""
+80 IF '$DATA(^TMP("SDNAVA",$JOB,SDIV,SDCP))
SET ^TMP("SDNAVA",$JOB,SDIV,SDCP)=""
+81 ;IHS/ANMC/LJF end of new code
+82 ;
+83 FOR SDI=1:1:8
SET $PIECE(^TMP("SDNAVA",$JOB,SDIV),U,SDI)=$PIECE($GET(^TMP("SDNAVA",$JOB,SDIV)),U,SDI)+$PIECE(SDX,U,SDI)
+84 IF SDMD
FOR SDI=1:1:8
SET $PIECE(^TMP("SDNAVA",$JOB,0),U,SDI)=$PIECE($GET(^TMP("SDNAVA",$JOB,0)),U,SDI)+$PIECE(SDX,U,SDI)
+85 FOR SDI=1:1:8
SET $PIECE(^TMP("SDNAVA",$JOB,SDIV,SDCP),U,SDI)=$PIECE(^TMP("SDNAVA",$JOB,SDIV,SDCP),U,SDI)+$PIECE(SDX,U,SDI)
+86 IF SDMD
FOR SDI=1:1:8
SET $PIECE(^TMP("SDNAVA",$JOB,0,SDCP),U,SDI)=$PIECE(^TMP("SDNAVA",$JOB,0,SDCP),U,SDI)+$PIECE(SDX,U,SDI)
+87 SET SDT=0
FOR
SET SDT=$ORDER(^TMP("SDXNAVA",$JOB,SDCL,SDT))
IF SDOUT!'SDT
QUIT
Begin DoDot:2
+88 SET SDX=^TMP("SDXNAVA",$JOB,SDCL,SDT)
SET ^TMP("SDNAVA",$JOB,SDIV,SDCP,SDCL,SDT)=$$AVE(SDX)
+89 QUIT
End DoDot:2
+90 QUIT
End DoDot:1
+91 SET SDIV=""
FOR
SET SDIV=$ORDER(^TMP("SDNAVA",$JOB,SDIV))
IF '$LENGTH(SDIV)
QUIT
Begin DoDot:1
+92 SET SDCP=0
FOR
SET SDCP=$ORDER(^TMP("SDNAVA",$JOB,SDIV,SDCP))
IF 'SDCP
QUIT
Begin DoDot:2
+93 SET SDX=^TMP("SDNAVA",$JOB,SDIV,SDCP)
SET ^TMP("SDNAVA",$JOB,SDIV,SDCP)=$$AVE(SDX)
+94 QUIT
End DoDot:2
+95 QUIT
End DoDot:1
+96 SET SDIV=""
FOR
SET SDIV=$ORDER(^TMP("SDNAVA",$JOB,SDIV))
IF SDIV=""
QUIT
Begin DoDot:1
+97 SET SDX=^TMP("SDNAVA",$JOB,SDIV)
SET ^TMP("SDNAVA",$JOB,SDIV)=$$AVE(SDX)
+98 QUIT
End DoDot:1
+99 KILL ^TMP("SDXNAVA",$JOB)
+100 QUIT
+101 ;
AVE(SDX) ;Calculate averages
+1 ;Input: SDX=string of appointment totals and total waiting time
+2 ;Output: string of appointment totals and average waiting time
+3 NEW SDI,SDY
+4 FOR SDI=2,4,6,8
Begin DoDot:1
+5 SET SDY=+$PIECE(SDX,U,(SDI-1))
SET $PIECE(SDX,U,(SDI-1))=SDY
+6 SET $PIECE(SDX,U,SDI)=$FNUMBER($SELECT(SDY=0:0,1:$PIECE(SDX,U,SDI)/SDY),"",1)
+7 QUIT
End DoDot:1
+8 QUIT SDX
+9 ;
STOP ;Check for stop task request
+1 IF $DATA(ZTQUEUED)
SET (SDOUT,ZTSTOP)=$SELECT($$S^%ZTLOAD:1,1:0)
QUIT
+2 ;
+1 ;Input: SDTX=array to return text
+2 ;IHS/ANMC/LJF 10/6/2000
DO FOOT^BSDCCRL(.SDTX)
QUIT
+3 SET SDTX(1)=SDLINE
+4 SET SDTX(2)="NOTE: TYPE '0' activity represents appointments scheduled during the report time frame that were not indicated by the user or by"
+5 SET SDTX(3)="calculation to be ""next available"" appointments. TYPE '1' activity represents appointments defined by the user as being ""next"
+6 SET SDTX(4)="available"" appointments. TYPE '2' activity represents appointments calculated to be ""next available"" appointments. TYPE '3'"
+7 SET SDTX(5)="activity represents appointments indicated both by the user and by calculation to be ""next available"" appointments. WAIT TIME is"
+8 SET SDTX(6)="the average number of days from the date an appointment was scheduled to the date it is to be performed."
+9 SET SDTX(7)=SDLINE
+10 QUIT