SCDXPOV ;ALB/SCK - VISIT REPORT BY NPCDB TRANSMISSION STATUS ; 05 Oct 98 8:37 PM
;;5.3;Scheduling;**73,118,123,159,173,1015**;AUG 13, 1993;Build 21
;
Q
EN ; Main entry point for the visit report.
;
; Variables:
; SCXBEG - Beginning date for encounters
; SCXEND - Ending date for encounters
; SCXMD - Multi-divisional Flag, 1: Multi-divisional, 0: if not
; SCXSITE - Site
; SCXSN - Site Number
; SCDIV - Division
; SCHDIV - Temporary division holder
; SCXTFLG - Flag for show totals only
; SCXOPT - Report option, 1: transmission only, 2: visit only, 3: both
; SCXABRT - Flag abort condition
;
N SCXBEG,SCXEND,SCXMD,SCDIV,SCHDIV,SCXTFLG,SCXOPT,SCXABRT
;
K ^TMP("SCDXPOV",$J),^TMP("SCDXV",$J)
;
S SCXBEG=$$GETDATE^SCDXPOV2("From Date: ")
G:SCXBEG<0 END
EN1 S SCXEND=$$GETDATE^SCDXPOV2("To Date: ")
G:SCXEND<0 END
I SCXEND<SCXBEG D G EN1
. W !!,"TO DATE CANNOT BE EARLIER THAN FROM DATE",!
S SCXEND=SCXEND+.9
S SCXMD=0 I $D(^DIC(4,+$$SITE^VASITE(SCXBEG),"DIV")),^("DIV")="Y" S SCXMD=1
S SCXOPT=$$RPTOPT^SCDXPOV2 G:SCXOPT<0 END
I SCXMD,SCXOPT'[2 S SCXTFLG=$$SHWTOT^SCDXPOV2 G:SCXTFLG<0 END
S %ZIS="Q" D ^%ZIS G:POP END
I $D(IO("Q")) D QUE^SCDXPOV2 G END
;
START ;
S SCXABRT=0
S SCDIV=$P($$SITE^VASITE(SCXBEG),U,3)
I SCXMD F SCDIV=0:0 S SCDIV=$O(^DG(40.8,SCDIV)) Q:'SCDIV S SCHDIV=SCDIV,SCDIV=$P($$SITE^VASITE(SCXBEG,+SCDIV),U,3) D:SCDIV]"" INIT(SCDIV) S SCDIV=SCHDIV
I 'SCXMD D INIT(SCDIV)
;
D BUILD(SCXBEG,SCXEND)
D:SCXOPT'[2 WRT^SCDXPOV1
G:SCXABRT END
D:SCXOPT'=1 WRT^SCDXPOV3
;
END ;
D:'$D(ZTQUEUED) ^%ZISC
K ^TMP("SCDXPOV",$J),^TMP("SCDXV",$J),ZTDESCR,ZTQUEUED,ZTRTN,ZTSAVE,ZTSK
Q
;
BUILD(SCXB,SCXE) ; Order through the encounters in the selected date range and process.
; Input:
; SCXB - Beginnging date (SCXBEG)
; SCXE - Ending date (SCXEND)
;
; Variables
; SDT - Date being checked
; SCXOE - Outpatient encounter being checked
;
N SDT,SCXOE
;
S SDT=SCXB-.1
F S SDT=$O(^SCE("B",SDT)) Q:SDT'>0!(SDT>SCXE) D
. S SCXOE=0
. F S SCXOE=$O(^SCE("B",SDT,SCXOE)) Q:SCXOE'>0 D:$D(^SCE(SCXOE,0)) GOTIT(SCXOE)
Q
;
GOTIT(SCXOE) ; Process line of data in the OUTPATIENT ENCOUNTER FILE
; Input:
; SCXOE - IEN of entry in the OUTPATIENT ENCOUNTER File, #409.73
; Variables
; SCX - 0 node of the OUTPATIENT ENCOUNTER entry
; SCX1 - 0 node of the TRANSMITTED OUTPATIENT ENCOUNTER entry
; SCX2 - 1 node of the TRANSMITTED OUTPATIENT ENCOUNTER entry
; SCXI - IEN of the associated entry (SCX) in the TRANSMITTED OUTPATIENT ENCOUNTER File
; SCXEL - Eligibility of the encounter
; SCXCV - Originating process for the encounter
; SCXCP - 1 if appt. type is C&P, 0 if not
; SCXDV - Division where the encounter took place
; SCXACK - Acknowledgement status of TRANSMITTED OUTPATIENT ENCOUNTER entry
; 0 - No information
; 1 - Waiting Transmission
; 2 - Transmitted
; 3 - Acknowledged
;
N SCX,SCX1,SCX2,SCXI,SCXEL,SCXCV,SCXCP,SCXDV,SCXACK
;
Q:'$D(^SD(409.73,"AENC",SCXOE))
S SCX=^SCE(SCXOE,0)
S SCXI=0,SCXI=$O(^SD(409.73,"AENC",SCXOE,SCXI))
S SCX1=^SD(409.73,SCXI,0),SCX2=$G(^(1))
;
S SCXEL=$P(SCX,U,13)
Q:SCXEL']"" Q:'$D(^DIC(8,SCXEL,0))
S SCXCV=$P(SCX,U,8) Q:SCXCV=4 S SCXCV=$$SCH(SCXCV)
S SCXCP=$S($P(SCX,U,10)=1:1,1:0)
S SCXDV=$P($$SITE^VASITE(SCXBEG,$P(SCX,U,11)),U,3)
;
;if division was inactive as of report start date, but division
; was active as of the date of this encounter, be sure an array entry
; exists to be able to count it.
I SCXDV']"" D Q:SCXDV']""
.D ECDT^SCDXUTL2(SCXI) S X=$P(X," ",1,3) D ^%DT
.S SCXDV=$P($$SITE^VASITE(Y,$P(SCX,U,11)),U,3)
.I SCXDV]"" D
..D:'$D(^TMP("SCDXPOV",$J,SCXDV)) INIT(SCXDV)
;
S SCXACK=0
;
I $P(SCX1,U,4)=1&($P(SCX2,U,1)']"")&($P(SCX2,U,4)']"") S SCXACK=1
I $P(SCX1,U,4)=0&($P(SCX2,U,1)]"")&($P(SCX2,U,4)']"") S SCXACK=2
I $P(SCX1,U,4)=0&($P(SCX2,U,1)]"")&($P(SCX2,U,4)]"") S SCXACK=3
;
Q:SCXACK=0
;
;I '$D(^TMP("SCDXPOV",$J,SCXDV)) D INIT(SCXDV)
Q:'$D(^TMP("SCDXPOV",$J,SCXDV))
;
I SCXEL]"",$P(^DIC(8,SCXEL,0),U,5)="N" D
. S $P(^TMP("SCDXPOV",$J,SCXDV,"NVELIG",SCXEL),U,SCXACK)=+$P($G(^TMP("SCDXPOV",$J,SCXDV,"NVELIG",SCXEL)),U,SCXACK)+1
. S $P(^TMP("SCDXPOV",$J,"TOT","NVELIG",SCXEL),U,SCXACK)=+$P($G(^TMP("SCDXPOV",$J,"TOT","NVELIG",SCXEL)),U,SCXACK)+1
;
I SCXEL]"",$P(^DIC(8,SCXEL,0),U,5)="Y" D
. S $P(^TMP("SCDXPOV",$J,SCXDV,"VELIG",SCXEL),U,SCXACK)=+$P($G(^TMP("SCDXPOV",$J,SCXDV,"VELIG",SCXEL)),U,SCXACK)+1
. S $P(^TMP("SCDXPOV",$J,"TOT","VELIG",SCXEL),U,SCXACK)=+$P($G(^TMP("SCDXPOV",$J,"TOT","VELIG",SCXEL)),U,SCXACK)+1
;
I SCXCV]"",$D(^TMP("SCDXPOV",$J,SCXDV,"COV",SCXCV)) D
. S $P(^TMP("SCDXPOV",$J,SCXDV,"COV",SCXCV),U,SCXACK)=+$P(^TMP("SCDXPOV",$J,SCXDV,"COV",SCXCV),U,SCXACK)+1
. S $P(^TMP("SCDXPOV",$J,"TOT","COV",SCXCV),U,SCXACK)=+$P(^TMP("SCDXPOV",$J,"TOT","COV",SCXCV),U,SCXACK)+1
;
I SCXCP,$D(^TMP("SCDXPOV",$J,SCXDV,"CP")) D
. S $P(^TMP("SCDXPOV",$J,SCXDV,"CP"),U,SCXACK)=+$P(^TMP("SCDXPOV",$J,SCXDV,"CP"),U,SCXACK)+1
. S $P(^TMP("SCDXPOV",$J,"TOT","CP"),U,SCXACK)=+$P(^TMP("SCDXPOV",$J,"TOT","CP"),U,SCXACK)+1
;
; Removed D:SCXACK, all encounters will now count towards visit
D VISIT^SCDXPOV3($P($P(SCX,U),"."),$P(SCX,U,2),SCXEL,$P(^DIC(8,SCXEL,0),U,5),SCXCV,SCXCP)
;
Q
;
SCH(SCXCV) ;Determine scheduled/unscheduled status for appointment type encounters
;Output: if SCXCV=2 or 3, SCXCV; if SCXCV=1, then 1 if appointment was pre-scheduled or 2 if appointment was a walk-in
Q:SCXCV'=1 SCXCV
N SCXAP S SCXAP=$G(^DPT(+$P(SCX,U,2),"S",+SCX,0))
Q:$P(SCXAP,U,20)'=SCXOE SCXCV
Q:$P(SCXAP,U,7)=4 2
Q 1
;
INIT(SDIV) ; Build TMP globals for encounter status count
; Ignores any entry beginning with "DOM" or "ZZ"
;
; Input:
; SDIV - Medical Center Division
;
; Variables
; SCXELG - IEN from ELIGIBILITY CODE File, File #8
; SCXN - 0 node for ELIGIBILITY CODE IEN
;
N SCXELG,SCXN,LL
S SCXELG=0
;
F S SCXELG=$O(^DIC(8,SCXELG)) Q:'SCXELG D
. S SCXN=$G(^DIC(8,SCXELG,0))
. Q:$$CHKELG^SCDXPOV2(SCXELG)
. I $P($G(^DIC(8,SCXELG,0)),U,5)="N" D
.. S ^TMP("SCDXPOV",$J,SDIV,"NVELIG",SCXELG)="0^0^0"
.. S:'$D(^TMP("SCDXPOV",$J,"TOT","NVELIG",SCXELG)) ^TMP("SCDXPOV",$J,"TOT","NVELIG",SCXELG)="0^0^0"
. I $P($G(^DIC(8,SCXELG,0)),U,5)="Y" D
.. S ^TMP("SCDXPOV",$J,SDIV,"VELIG",SCXELG)="0^0^0"
.. S:'$D(^TMP("SCDXPOV",$J,"TOT","VELIG",SCXELG)) ^TMP("SCDXPOV",$J,"TOT","VELIG",SCXELG)="0^0^0"
;
F LL=1:1:3 D
. S ^TMP("SCDXPOV",$J,SDIV,"COV",LL)="0^0^0"
. S:'$D(^TMP("SCDXPOV",$J,"TOT","COV",LL)) ^TMP("SCDXPOV",$J,"TOT","COV",LL)="0^0^0"
;
S ^TMP("SCDXPOV",$J,SDIV,"CP")="0^0^0"
S:'$D(^TMP("SCDXPOV",$J,"TOT","CP")) ^TMP("SCDXPOV",$J,"TOT","CP")="0^0^0"
Q
SCDXPOV ;ALB/SCK - VISIT REPORT BY NPCDB TRANSMISSION STATUS ; 05 Oct 98 8:37 PM
+1 ;;5.3;Scheduling;**73,118,123,159,173,1015**;AUG 13, 1993;Build 21
+2 ;
+3 QUIT
EN ; Main entry point for the visit report.
+1 ;
+2 ; Variables:
+3 ; SCXBEG - Beginning date for encounters
+4 ; SCXEND - Ending date for encounters
+5 ; SCXMD - Multi-divisional Flag, 1: Multi-divisional, 0: if not
+6 ; SCXSITE - Site
+7 ; SCXSN - Site Number
+8 ; SCDIV - Division
+9 ; SCHDIV - Temporary division holder
+10 ; SCXTFLG - Flag for show totals only
+11 ; SCXOPT - Report option, 1: transmission only, 2: visit only, 3: both
+12 ; SCXABRT - Flag abort condition
+13 ;
+14 NEW SCXBEG,SCXEND,SCXMD,SCDIV,SCHDIV,SCXTFLG,SCXOPT,SCXABRT
+15 ;
+16 KILL ^TMP("SCDXPOV",$JOB),^TMP("SCDXV",$JOB)
+17 ;
+18 SET SCXBEG=$$GETDATE^SCDXPOV2("From Date: ")
+19 IF SCXBEG<0
GOTO END
EN1 SET SCXEND=$$GETDATE^SCDXPOV2("To Date: ")
+1 IF SCXEND<0
GOTO END
+2 IF SCXEND<SCXBEG
Begin DoDot:1
+3 WRITE !!,"TO DATE CANNOT BE EARLIER THAN FROM DATE",!
End DoDot:1
GOTO EN1
+4 SET SCXEND=SCXEND+.9
+5 SET SCXMD=0
IF $DATA(^DIC(4,+$$SITE^VASITE(SCXBEG),"DIV"))
IF ^("DIV")="Y"
SET SCXMD=1
+6 SET SCXOPT=$$RPTOPT^SCDXPOV2
IF SCXOPT<0
GOTO END
+7 IF SCXMD
IF SCXOPT'[2
SET SCXTFLG=$$SHWTOT^SCDXPOV2
IF SCXTFLG<0
GOTO END
+8 SET %ZIS="Q"
DO ^%ZIS
IF POP
GOTO END
+9 IF $DATA(IO("Q"))
DO QUE^SCDXPOV2
GOTO END
+10 ;
START ;
+1 SET SCXABRT=0
+2 SET SCDIV=$PIECE($$SITE^VASITE(SCXBEG),U,3)
+3 IF SCXMD
FOR SCDIV=0:0
SET SCDIV=$ORDER(^DG(40.8,SCDIV))
IF 'SCDIV
QUIT
SET SCHDIV=SCDIV
SET SCDIV=$PIECE($$SITE^VASITE(SCXBEG,+SCDIV),U,3)
IF SCDIV]""
DO INIT(SCDIV)
SET SCDIV=SCHDIV
+4 IF 'SCXMD
DO INIT(SCDIV)
+5 ;
+6 DO BUILD(SCXBEG,SCXEND)
+7 IF SCXOPT'[2
DO WRT^SCDXPOV1
+8 IF SCXABRT
GOTO END
+9 IF SCXOPT'=1
DO WRT^SCDXPOV3
+10 ;
END ;
+1 IF '$DATA(ZTQUEUED)
DO ^%ZISC
+2 KILL ^TMP("SCDXPOV",$JOB),^TMP("SCDXV",$JOB),ZTDESCR,ZTQUEUED,ZTRTN,ZTSAVE,ZTSK
+3 QUIT
+4 ;
BUILD(SCXB,SCXE) ; Order through the encounters in the selected date range and process.
+1 ; Input:
+2 ; SCXB - Beginnging date (SCXBEG)
+3 ; SCXE - Ending date (SCXEND)
+4 ;
+5 ; Variables
+6 ; SDT - Date being checked
+7 ; SCXOE - Outpatient encounter being checked
+8 ;
+9 NEW SDT,SCXOE
+10 ;
+11 SET SDT=SCXB-.1
+12 FOR
SET SDT=$ORDER(^SCE("B",SDT))
IF SDT'>0!(SDT>SCXE)
QUIT
Begin DoDot:1
+13 SET SCXOE=0
+14 FOR
SET SCXOE=$ORDER(^SCE("B",SDT,SCXOE))
IF SCXOE'>0
QUIT
IF $DATA(^SCE(SCXOE,0))
DO GOTIT(SCXOE)
End DoDot:1
+15 QUIT
+16 ;
GOTIT(SCXOE) ; Process line of data in the OUTPATIENT ENCOUNTER FILE
+1 ; Input:
+2 ; SCXOE - IEN of entry in the OUTPATIENT ENCOUNTER File, #409.73
+3 ; Variables
+4 ; SCX - 0 node of the OUTPATIENT ENCOUNTER entry
+5 ; SCX1 - 0 node of the TRANSMITTED OUTPATIENT ENCOUNTER entry
+6 ; SCX2 - 1 node of the TRANSMITTED OUTPATIENT ENCOUNTER entry
+7 ; SCXI - IEN of the associated entry (SCX) in the TRANSMITTED OUTPATIENT ENCOUNTER File
+8 ; SCXEL - Eligibility of the encounter
+9 ; SCXCV - Originating process for the encounter
+10 ; SCXCP - 1 if appt. type is C&P, 0 if not
+11 ; SCXDV - Division where the encounter took place
+12 ; SCXACK - Acknowledgement status of TRANSMITTED OUTPATIENT ENCOUNTER entry
+13 ; 0 - No information
+14 ; 1 - Waiting Transmission
+15 ; 2 - Transmitted
+16 ; 3 - Acknowledged
+17 ;
+18 NEW SCX,SCX1,SCX2,SCXI,SCXEL,SCXCV,SCXCP,SCXDV,SCXACK
+19 ;
+20 IF '$DATA(^SD(409.73,"AENC",SCXOE))
QUIT
+21 SET SCX=^SCE(SCXOE,0)
+22 SET SCXI=0
SET SCXI=$ORDER(^SD(409.73,"AENC",SCXOE,SCXI))
+23 SET SCX1=^SD(409.73,SCXI,0)
SET SCX2=$GET(^(1))
+24 ;
+25 SET SCXEL=$PIECE(SCX,U,13)
+26 IF SCXEL']""
QUIT
IF '$DATA(^DIC(8,SCXEL,0))
QUIT
+27 SET SCXCV=$PIECE(SCX,U,8)
IF SCXCV=4
QUIT
SET SCXCV=$$SCH(SCXCV)
+28 SET SCXCP=$SELECT($PIECE(SCX,U,10)=1:1,1:0)
+29 SET SCXDV=$PIECE($$SITE^VASITE(SCXBEG,$PIECE(SCX,U,11)),U,3)
+30 ;
+31 ;if division was inactive as of report start date, but division
+32 ; was active as of the date of this encounter, be sure an array entry
+33 ; exists to be able to count it.
+34 IF SCXDV']""
Begin DoDot:1
+35 DO ECDT^SCDXUTL2(SCXI)
SET X=$PIECE(X," ",1,3)
DO ^%DT
+36 SET SCXDV=$PIECE($$SITE^VASITE(Y,$PIECE(SCX,U,11)),U,3)
+37 IF SCXDV]""
Begin DoDot:2
+38 IF '$DATA(^TMP("SCDXPOV",$JOB,SCXDV))
DO INIT(SCXDV)
End DoDot:2
End DoDot:1
IF SCXDV']""
QUIT
+39 ;
+40 SET SCXACK=0
+41 ;
+42 IF $PIECE(SCX1,U,4)=1&($PIECE(SCX2,U,1)']"")&($PIECE(SCX2,U,4)']"")
SET SCXACK=1
+43 IF $PIECE(SCX1,U,4)=0&($PIECE(SCX2,U,1)]"")&($PIECE(SCX2,U,4)']"")
SET SCXACK=2
+44 IF $PIECE(SCX1,U,4)=0&($PIECE(SCX2,U,1)]"")&($PIECE(SCX2,U,4)]"")
SET SCXACK=3
+45 ;
+46 IF SCXACK=0
QUIT
+47 ;
+48 ;I '$D(^TMP("SCDXPOV",$J,SCXDV)) D INIT(SCXDV)
+49 IF '$DATA(^TMP("SCDXPOV",$JOB,SCXDV))
QUIT
+50 ;
+51 IF SCXEL]""
IF $PIECE(^DIC(8,SCXEL,0),U,5)="N"
Begin DoDot:1
+52 SET $PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"NVELIG",SCXEL),U,SCXACK)=+$PIECE($GET(^TMP("SCDXPOV",$JOB,SCXDV,"NVELIG",SCXEL)),U,SCXACK)+1
+53 SET $PIECE(^TMP("SCDXPOV",$JOB,"TOT","NVELIG",SCXEL),U,SCXACK)=+$PIECE($GET(^TMP("SCDXPOV",$JOB,"TOT","NVELIG",SCXEL)),U,SCXACK)+1
End DoDot:1
+54 ;
+55 IF SCXEL]""
IF $PIECE(^DIC(8,SCXEL,0),U,5)="Y"
Begin DoDot:1
+56 SET $PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"VELIG",SCXEL),U,SCXACK)=+$PIECE($GET(^TMP("SCDXPOV",$JOB,SCXDV,"VELIG",SCXEL)),U,SCXACK)+1
+57 SET $PIECE(^TMP("SCDXPOV",$JOB,"TOT","VELIG",SCXEL),U,SCXACK)=+$PIECE($GET(^TMP("SCDXPOV",$JOB,"TOT","VELIG",SCXEL)),U,SCXACK)+1
End DoDot:1
+58 ;
+59 IF SCXCV]""
IF $DATA(^TMP("SCDXPOV",$JOB,SCXDV,"COV",SCXCV))
Begin DoDot:1
+60 SET $PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"COV",SCXCV),U,SCXACK)=+$PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"COV",SCXCV),U,SCXACK)+1
+61 SET $PIECE(^TMP("SCDXPOV",$JOB,"TOT","COV",SCXCV),U,SCXACK)=+$PIECE(^TMP("SCDXPOV",$JOB,"TOT","COV",SCXCV),U,SCXACK)+1
End DoDot:1
+62 ;
+63 IF SCXCP
IF $DATA(^TMP("SCDXPOV",$JOB,SCXDV,"CP"))
Begin DoDot:1
+64 SET $PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"CP"),U,SCXACK)=+$PIECE(^TMP("SCDXPOV",$JOB,SCXDV,"CP"),U,SCXACK)+1
+65 SET $PIECE(^TMP("SCDXPOV",$JOB,"TOT","CP"),U,SCXACK)=+$PIECE(^TMP("SCDXPOV",$JOB,"TOT","CP"),U,SCXACK)+1
End DoDot:1
+66 ;
+67 ; Removed D:SCXACK, all encounters will now count towards visit
+68 DO VISIT^SCDXPOV3($PIECE($PIECE(SCX,U),"."),$PIECE(SCX,U,2),SCXEL,$PIECE(^DIC(8,SCXEL,0),U,5),SCXCV,SCXCP)
+69 ;
+70 QUIT
+71 ;
SCH(SCXCV) ;Determine scheduled/unscheduled status for appointment type encounters
+1 ;Output: if SCXCV=2 or 3, SCXCV; if SCXCV=1, then 1 if appointment was pre-scheduled or 2 if appointment was a walk-in
+2 IF SCXCV'=1
QUIT SCXCV
+3 NEW SCXAP
SET SCXAP=$GET(^DPT(+$PIECE(SCX,U,2),"S",+SCX,0))
+4 IF $PIECE(SCXAP,U,20)'=SCXOE
QUIT SCXCV
+5 IF $PIECE(SCXAP,U,7)=4
QUIT 2
+6 QUIT 1
+7 ;
INIT(SDIV) ; Build TMP globals for encounter status count
+1 ; Ignores any entry beginning with "DOM" or "ZZ"
+2 ;
+3 ; Input:
+4 ; SDIV - Medical Center Division
+5 ;
+6 ; Variables
+7 ; SCXELG - IEN from ELIGIBILITY CODE File, File #8
+8 ; SCXN - 0 node for ELIGIBILITY CODE IEN
+9 ;
+10 NEW SCXELG,SCXN,LL
+11 SET SCXELG=0
+12 ;
+13 FOR
SET SCXELG=$ORDER(^DIC(8,SCXELG))
IF 'SCXELG
QUIT
Begin DoDot:1
+14 SET SCXN=$GET(^DIC(8,SCXELG,0))
+15 IF $$CHKELG^SCDXPOV2(SCXELG)
QUIT
+16 IF $PIECE($GET(^DIC(8,SCXELG,0)),U,5)="N"
Begin DoDot:2
+17 SET ^TMP("SCDXPOV",$JOB,SDIV,"NVELIG",SCXELG)="0^0^0"
+18 IF '$DATA(^TMP("SCDXPOV",$JOB,"TOT","NVELIG",SCXELG))
SET ^TMP("SCDXPOV",$JOB,"TOT","NVELIG",SCXELG)="0^0^0"
End DoDot:2
+19 IF $PIECE($GET(^DIC(8,SCXELG,0)),U,5)="Y"
Begin DoDot:2
+20 SET ^TMP("SCDXPOV",$JOB,SDIV,"VELIG",SCXELG)="0^0^0"
+21 IF '$DATA(^TMP("SCDXPOV",$JOB,"TOT","VELIG",SCXELG))
SET ^TMP("SCDXPOV",$JOB,"TOT","VELIG",SCXELG)="0^0^0"
End DoDot:2
End DoDot:1
+22 ;
+23 FOR LL=1:1:3
Begin DoDot:1
+24 SET ^TMP("SCDXPOV",$JOB,SDIV,"COV",LL)="0^0^0"
+25 IF '$DATA(^TMP("SCDXPOV",$JOB,"TOT","COV",LL))
SET ^TMP("SCDXPOV",$JOB,"TOT","COV",LL)="0^0^0"
End DoDot:1
+26 ;
+27 SET ^TMP("SCDXPOV",$JOB,SDIV,"CP")="0^0^0"
+28 IF '$DATA(^TMP("SCDXPOV",$JOB,"TOT","CP"))
SET ^TMP("SCDXPOV",$JOB,"TOT","CP")="0^0^0"
+29 QUIT