RGMTUT03 ;BIR/CML-MPI/PD Compile and Correct Data Validation Data for Local Sites (CON'T) ;08/12/02
;;1.0;CLINICAL INFO RESOURCE NETWORK;**20**;30 Apr 99
;
I '$D(^XTMP("RGMT","UT01")) D G QUIT
.I '$D(RGHLMQ) W !!,"^RGMTUT01 must be run before this report can be printed!"
K ^XTMP("RGMT","HLMQUT01")
I '$D(SITEOPT) S SITEOPT=0
;
DEV ;
I $D(RGHLMQ) G START
W !!,"Right Margin for this report is 80."
K ZTSAVE S ZTSAVE("SITEOPT")=""
D EN^XUTMDEVQ("START^RGMTUT03","MPI/PD - Print Local Site Statistic Report",.ZTSAVE) I 'POP Q
W !,"NO DEVICE SELECTED OR REPORT PRINTED!!"
G QUIT
;
START ;
K LN
S SITE=$P($$SITE^VASITE(),"^",2),LOCSTA=$P($$SITE^VASITE(),"^",3),$P(LN,"-",81)=""
D NOW^%DTC S HDT=$$FMTE^XLFDT($E(%,1,12))
S COMPDT=$$FMTE^XLFDT($E(^XTMP("RGMT","UT01","@@","COMPILE STOPPED"),1,12))
;calculate compile time
S COMPB=^XTMP("RGMT","UT01","@@","COMPILE STARTED")
S COMPS=^XTMP("RGMT","UT01","@@","COMPILE STOPPED")
S DIFF=($$FMDIFF^XLFDT(COMPS,COMPB,2))/3600
;
I '$D(RGHLMQ) D
.W @IOF,"MPI/PD Statistics - ",SITE,?53,"Printed ",HDT
.W !,"Compiled ",COMPDT," (Compile Time: ",$J(DIFF,5,2)," hrs)",!,LN
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"@@ RUNDATE")=HDT_"^(Compile Time: "_$J(DIFF,5,2)_" hrs)"
;
I '$D(RGHLMQ)&(SITEOPT=2) G DIAG1
;
CMOR ;Loop on CMOR totals in ^XTMP("RGMT","UT01","CMOR")
S GRAND=0
I '$D(RGHLMQ) W !,"=>CMOR TOTALS:"
S CMOR="" F S CMOR=$O(^XTMP("RGMT","UT01","CMOR",CMOR)) Q:$E(CMOR)="Z" Q:CMOR="" D
.S CMORSTA=0 F S CMORSTA=$O(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA)) Q:'CMORSTA D
..S SKIP=0
..I CMORSTA=564 S SKIP=1,CMORNM="FAYETTEVILLE, AR"
..I CMORSTA=565 S SKIP=1,CMORNM="FAYETTEVILLE, NC"
..I 'SKIP D
...S FRSTNM=$P(CMOR,",")
...S CMORNM=$S(FRSTNM="VAMC":$P(CMOR,",",2),1:FRSTNM)
..S TOT=$G(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA,"1TOT"))
..I TOT="" S TOT=$G(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA))
..S GRAND=GRAND+TOT
..I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"CMOR",CMOR,CMORSTA)=TOT
..I '$D(RGHLMQ) W !,CMORNM,?30," = ",?33,$J(TOT,7)
I '$D(RGHLMQ) W !?59,"TOTAL: ",?66,$J(GRAND,7)
;
TF ;Loop on Treating Facility totals
I '$D(RGHLMQ) W !!,"=>TREATING FACILITY TOTALS:"
S TF=""
F S TF=$O(^XTMP("RGMT","UT01","TF",TF)) Q:$E(TF)="Z" Q:TF="" D
.S TFSTA=0 F S TFSTA=$O(^XTMP("RGMT","UT01","TF",TF,TFSTA)) Q:'TFSTA D
..S SKIP=0
..I TFSTA=564 S SKIP=1,TFNM="FAYETTEVILLE, AR"
..I TFSTA=565 S SKIP=1,TFNM="FAYETTEVILLE, NC"
..I 'SKIP D
...S FRSTNM=$P(TF,",")
...S TFNM=$S(FRSTNM="VAMC":$P(TF,",",2),1:FRSTNM)
..S TOT=^XTMP("RGMT","UT01","TF",TF,TFSTA)
..I '$D(RGHLMQ) W !,TFNM,?30," = ",?33,$J(TOT,7)
..I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TF",TF,TFSTA)=TOT
;
I SITEOPT=1,'$D(RGHLMQ) W !! G DIAG2
;
DIAG1 ;print diagnostic data
I '$D(^XTMP("RGMT","UT01","TOT CMOR MISS TF")) S ^XTMP("RGMT","UT01","TOT CMOR MISS TF")=0
I '$D(RGHLMQ) D
.W !,"Total CMORs missing a Treating Facility",?66,"="
.W $J(^XTMP("RGMT","UT01","TOT CMOR MISS TF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT CMOR MISS TF")=^XTMP("RGMT","UT01","TOT CMOR MISS TF")
;
I '$D(^XTMP("RGMT","UT01","TOT LOC SITE MISS TF")) S ^XTMP("RGMT","UT01","TOT LOC SITE MISS TF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with NATIONAL ICN and missing local TF",?66,"="
.W $J(^XTMP("RGMT","UT01","TOT LOC SITE MISS TF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT LOC SITE MISS TF")=^XTMP("RGMT","UT01","TOT LOC SITE MISS TF")
;
I '$D(^XTMP("RGMT","UT01","TOT TFDUP")) S ^XTMP("RGMT","UT01","TOT TFDUP")=0
I '$D(RGHLMQ) D
.W !,"Total patients with Treating Facility dups",?66,"="
.W $J(^XTMP("RGMT","UT01","TOT TFDUP"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT TFDUP")=^XTMP("RGMT","UT01","TOT TFDUP")
;
I '$D(^XTMP("RGMT","UT01","REIND","MISSING AICN XREF")) S ^XTMP("RGMT","UT01","REIND","MISSING AICN XREF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with any type ICN and no ""AICN"" xref",?66,"="
.W $J(^XTMP("RGMT","UT01","REIND","MISSING AICN XREF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING AICN XREF")=^XTMP("RGMT","UT01","REIND","MISSING AICN XREF")
;
I '$D(^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF")) S ^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with LOCAL ICN and no ""AICNL"" xref",?66,"="
.W $J(^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING AICNL XREF")=^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF")
;
I '$D(^XTMP("RGMT","UT01","REIND","MISSING SSN XREF")) S ^XTMP("RGMT","UT01","REIND","MISSING SSN XREF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with any type ICN and missing ""SSN"" xref",?66,"="
.W $J(^XTMP("RGMT","UT01","REIND","MISSING SSN XREF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING SSN XREF")=^XTMP("RGMT","UT01","REIND","MISSING SSN XREF")
;
I '$D(^XTMP("RGMT","UT01","CMOR WITH NO ICN")) S ^XTMP("RGMT","UT01","CMOR WITH NO ICN")=0
I '$D(RGHLMQ) D
.W !,"Total patients with NO ICN but have a CMOR assigned",?66,"="
.W $J(^XTMP("RGMT","UT01","CMOR WITH NO ICN"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"CMOR WITH NO ICN")=^XTMP("RGMT","UT01","CMOR WITH NO ICN")
;
I '$D(^XTMP("RGMT","UT01","TOT NO ICN W/TF")) S ^XTMP("RGMT","UT01","TOT NO ICN W/TF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with NO ICN but have TFs assigned",?66,"="
.W $J(^XTMP("RGMT","UT01","TOT NO ICN W/TF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT NO ICN W/TF")=^XTMP("RGMT","UT01","TOT NO ICN W/TF")
;
I '$D(^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF")) S ^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF")=0
I '$D(RGHLMQ) D
.W !,"Total patients with LOCAL ICN but have remote TFs assigned",?66,"="
.W $J(^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF"),6)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT LOC ICN W/REMOTE TF")=^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF")
;
DIAG2 ;display counts for total patients with local/nat'l/no ICN
;
I '$D(^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT")) S ^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT")=0
I '$D(RGHLMQ) D
.W !?3,"Total patients with a national ICN",?42,"= "
.W $J(^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT"),8)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"NATIONAL ICN COUNT")=^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT")
;
I '$D(^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT")) S ^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT")=0
I '$D(RGHLMQ) D
.W !?3,"Total patients with a local ICN",?42,"= "
.W $J(^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT"),8)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"LOCAL ICN COUNT")=^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT")
;
I '$D(^XTMP("RGMT","UT01","REIND","NO ICN COUNT")) S ^XTMP("RGMT","UT01","REIND","NO ICN COUNT")=0
I '$D(RGHLMQ) D
.W !?3,"Total patients with no ICN",?42,"= "
.W $J(^XTMP("RGMT","UT01","REIND","NO ICN COUNT"),8)
I $D(RGHLMQ) S ^XTMP("RGMT","HLMQUT01",LOCSTA,"NO ICN COUNT")=^XTMP("RGMT","UT01","REIND","NO ICN COUNT")
;
QUIT ;
K %,CMOR,CMORNM,CMORSTA,COMDT,COMPB,COMPDT,COMPS,DIFF,FRSTNM,GRAND,HDT,LN,LOCSTA,SITE,SITEOPT,SKIP,TF,TFNM,TFSTA,TOT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGMTUT03 7294 printed Nov 22, 2024@16:52:43 Page 2
RGMTUT03 ;BIR/CML-MPI/PD Compile and Correct Data Validation Data for Local Sites (CON'T) ;08/12/02
+1 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**20**;30 Apr 99
+2 ;
+3 IF '$DATA(^XTMP("RGMT","UT01"))
Begin DoDot:1
+4 IF '$DATA(RGHLMQ)
WRITE !!,"^RGMTUT01 must be run before this report can be printed!"
End DoDot:1
GOTO QUIT
+5 KILL ^XTMP("RGMT","HLMQUT01")
+6 IF '$DATA(SITEOPT)
SET SITEOPT=0
+7 ;
DEV ;
+1 IF $DATA(RGHLMQ)
GOTO START
+2 WRITE !!,"Right Margin for this report is 80."
+3 KILL ZTSAVE
SET ZTSAVE("SITEOPT")=""
+4 DO EN^XUTMDEVQ("START^RGMTUT03","MPI/PD - Print Local Site Statistic Report",.ZTSAVE)
IF 'POP
QUIT
+5 WRITE !,"NO DEVICE SELECTED OR REPORT PRINTED!!"
+6 GOTO QUIT
+7 ;
START ;
+1 KILL LN
+2 SET SITE=$PIECE($$SITE^VASITE(),"^",2)
SET LOCSTA=$PIECE($$SITE^VASITE(),"^",3)
SET $PIECE(LN,"-",81)=""
+3 DO NOW^%DTC
SET HDT=$$FMTE^XLFDT($EXTRACT(%,1,12))
+4 SET COMPDT=$$FMTE^XLFDT($EXTRACT(^XTMP("RGMT","UT01","@@","COMPILE STOPPED"),1,12))
+5 ;calculate compile time
+6 SET COMPB=^XTMP("RGMT","UT01","@@","COMPILE STARTED")
+7 SET COMPS=^XTMP("RGMT","UT01","@@","COMPILE STOPPED")
+8 SET DIFF=($$FMDIFF^XLFDT(COMPS,COMPB,2))/3600
+9 ;
+10 IF '$DATA(RGHLMQ)
Begin DoDot:1
+11 WRITE @IOF,"MPI/PD Statistics - ",SITE,?53,"Printed ",HDT
+12 WRITE !,"Compiled ",COMPDT," (Compile Time: ",$JUSTIFY(DIFF,5,2)," hrs)",!,LN
End DoDot:1
+13 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"@@ RUNDATE")=HDT_"^(Compile Time: "_$JUSTIFY(DIFF,5,2)_" hrs)"
+14 ;
+15 IF '$DATA(RGHLMQ)&(SITEOPT=2)
GOTO DIAG1
+16 ;
CMOR ;Loop on CMOR totals in ^XTMP("RGMT","UT01","CMOR")
+1 SET GRAND=0
+2 IF '$DATA(RGHLMQ)
WRITE !,"=>CMOR TOTALS:"
+3 SET CMOR=""
FOR
SET CMOR=$ORDER(^XTMP("RGMT","UT01","CMOR",CMOR))
if $EXTRACT(CMOR)="Z"
QUIT
if CMOR=""
QUIT
Begin DoDot:1
+4 SET CMORSTA=0
FOR
SET CMORSTA=$ORDER(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA))
if 'CMORSTA
QUIT
Begin DoDot:2
+5 SET SKIP=0
+6 IF CMORSTA=564
SET SKIP=1
SET CMORNM="FAYETTEVILLE, AR"
+7 IF CMORSTA=565
SET SKIP=1
SET CMORNM="FAYETTEVILLE, NC"
+8 IF 'SKIP
Begin DoDot:3
+9 SET FRSTNM=$PIECE(CMOR,",")
+10 SET CMORNM=$SELECT(FRSTNM="VAMC":$PIECE(CMOR,",",2),1:FRSTNM)
End DoDot:3
+11 SET TOT=$GET(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA,"1TOT"))
+12 IF TOT=""
SET TOT=$GET(^XTMP("RGMT","UT01","CMOR",CMOR,CMORSTA))
+13 SET GRAND=GRAND+TOT
+14 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"CMOR",CMOR,CMORSTA)=TOT
+15 IF '$DATA(RGHLMQ)
WRITE !,CMORNM,?30," = ",?33,$JUSTIFY(TOT,7)
End DoDot:2
End DoDot:1
+16 IF '$DATA(RGHLMQ)
WRITE !?59,"TOTAL: ",?66,$JUSTIFY(GRAND,7)
+17 ;
TF ;Loop on Treating Facility totals
+1 IF '$DATA(RGHLMQ)
WRITE !!,"=>TREATING FACILITY TOTALS:"
+2 SET TF=""
+3 FOR
SET TF=$ORDER(^XTMP("RGMT","UT01","TF",TF))
if $EXTRACT(TF)="Z"
QUIT
if TF=""
QUIT
Begin DoDot:1
+4 SET TFSTA=0
FOR
SET TFSTA=$ORDER(^XTMP("RGMT","UT01","TF",TF,TFSTA))
if 'TFSTA
QUIT
Begin DoDot:2
+5 SET SKIP=0
+6 IF TFSTA=564
SET SKIP=1
SET TFNM="FAYETTEVILLE, AR"
+7 IF TFSTA=565
SET SKIP=1
SET TFNM="FAYETTEVILLE, NC"
+8 IF 'SKIP
Begin DoDot:3
+9 SET FRSTNM=$PIECE(TF,",")
+10 SET TFNM=$SELECT(FRSTNM="VAMC":$PIECE(TF,",",2),1:FRSTNM)
End DoDot:3
+11 SET TOT=^XTMP("RGMT","UT01","TF",TF,TFSTA)
+12 IF '$DATA(RGHLMQ)
WRITE !,TFNM,?30," = ",?33,$JUSTIFY(TOT,7)
+13 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TF",TF,TFSTA)=TOT
End DoDot:2
End DoDot:1
+14 ;
+15 IF SITEOPT=1
IF '$DATA(RGHLMQ)
WRITE !!
GOTO DIAG2
+16 ;
DIAG1 ;print diagnostic data
+1 IF '$DATA(^XTMP("RGMT","UT01","TOT CMOR MISS TF"))
SET ^XTMP("RGMT","UT01","TOT CMOR MISS TF")=0
+2 IF '$DATA(RGHLMQ)
Begin DoDot:1
+3 WRITE !,"Total CMORs missing a Treating Facility",?66,"="
+4 WRITE $JUSTIFY(^XTMP("RGMT","UT01","TOT CMOR MISS TF"),6)
End DoDot:1
+5 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT CMOR MISS TF")=^XTMP("RGMT","UT01","TOT CMOR MISS TF")
+6 ;
+7 IF '$DATA(^XTMP("RGMT","UT01","TOT LOC SITE MISS TF"))
SET ^XTMP("RGMT","UT01","TOT LOC SITE MISS TF")=0
+8 IF '$DATA(RGHLMQ)
Begin DoDot:1
+9 WRITE !,"Total patients with NATIONAL ICN and missing local TF",?66,"="
+10 WRITE $JUSTIFY(^XTMP("RGMT","UT01","TOT LOC SITE MISS TF"),6)
End DoDot:1
+11 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT LOC SITE MISS TF")=^XTMP("RGMT","UT01","TOT LOC SITE MISS TF")
+12 ;
+13 IF '$DATA(^XTMP("RGMT","UT01","TOT TFDUP"))
SET ^XTMP("RGMT","UT01","TOT TFDUP")=0
+14 IF '$DATA(RGHLMQ)
Begin DoDot:1
+15 WRITE !,"Total patients with Treating Facility dups",?66,"="
+16 WRITE $JUSTIFY(^XTMP("RGMT","UT01","TOT TFDUP"),6)
End DoDot:1
+17 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT TFDUP")=^XTMP("RGMT","UT01","TOT TFDUP")
+18 ;
+19 IF '$DATA(^XTMP("RGMT","UT01","REIND","MISSING AICN XREF"))
SET ^XTMP("RGMT","UT01","REIND","MISSING AICN XREF")=0
+20 IF '$DATA(RGHLMQ)
Begin DoDot:1
+21 WRITE !,"Total patients with any type ICN and no ""AICN"" xref",?66,"="
+22 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","MISSING AICN XREF"),6)
End DoDot:1
+23 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING AICN XREF")=^XTMP("RGMT","UT01","REIND","MISSING AICN XREF")
+24 ;
+25 IF '$DATA(^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF"))
SET ^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF")=0
+26 IF '$DATA(RGHLMQ)
Begin DoDot:1
+27 WRITE !,"Total patients with LOCAL ICN and no ""AICNL"" xref",?66,"="
+28 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF"),6)
End DoDot:1
+29 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING AICNL XREF")=^XTMP("RGMT","UT01","REIND","MISSING AICNL XREF")
+30 ;
+31 IF '$DATA(^XTMP("RGMT","UT01","REIND","MISSING SSN XREF"))
SET ^XTMP("RGMT","UT01","REIND","MISSING SSN XREF")=0
+32 IF '$DATA(RGHLMQ)
Begin DoDot:1
+33 WRITE !,"Total patients with any type ICN and missing ""SSN"" xref",?66,"="
+34 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","MISSING SSN XREF"),6)
End DoDot:1
+35 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"MISSING SSN XREF")=^XTMP("RGMT","UT01","REIND","MISSING SSN XREF")
+36 ;
+37 IF '$DATA(^XTMP("RGMT","UT01","CMOR WITH NO ICN"))
SET ^XTMP("RGMT","UT01","CMOR WITH NO ICN")=0
+38 IF '$DATA(RGHLMQ)
Begin DoDot:1
+39 WRITE !,"Total patients with NO ICN but have a CMOR assigned",?66,"="
+40 WRITE $JUSTIFY(^XTMP("RGMT","UT01","CMOR WITH NO ICN"),6)
End DoDot:1
+41 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"CMOR WITH NO ICN")=^XTMP("RGMT","UT01","CMOR WITH NO ICN")
+42 ;
+43 IF '$DATA(^XTMP("RGMT","UT01","TOT NO ICN W/TF"))
SET ^XTMP("RGMT","UT01","TOT NO ICN W/TF")=0
+44 IF '$DATA(RGHLMQ)
Begin DoDot:1
+45 WRITE !,"Total patients with NO ICN but have TFs assigned",?66,"="
+46 WRITE $JUSTIFY(^XTMP("RGMT","UT01","TOT NO ICN W/TF"),6)
End DoDot:1
+47 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT NO ICN W/TF")=^XTMP("RGMT","UT01","TOT NO ICN W/TF")
+48 ;
+49 IF '$DATA(^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF"))
SET ^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF")=0
+50 IF '$DATA(RGHLMQ)
Begin DoDot:1
+51 WRITE !,"Total patients with LOCAL ICN but have remote TFs assigned",?66,"="
+52 WRITE $JUSTIFY(^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF"),6)
End DoDot:1
+53 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"TOT LOC ICN W/REMOTE TF")=^XTMP("RGMT","UT01","TOT LOC ICN W/REMOTE TF")
+54 ;
DIAG2 ;display counts for total patients with local/nat'l/no ICN
+1 ;
+2 IF '$DATA(^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT"))
SET ^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT")=0
+3 IF '$DATA(RGHLMQ)
Begin DoDot:1
+4 WRITE !?3,"Total patients with a national ICN",?42,"= "
+5 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT"),8)
End DoDot:1
+6 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"NATIONAL ICN COUNT")=^XTMP("RGMT","UT01","REIND","NATIONAL ICN COUNT")
+7 ;
+8 IF '$DATA(^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT"))
SET ^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT")=0
+9 IF '$DATA(RGHLMQ)
Begin DoDot:1
+10 WRITE !?3,"Total patients with a local ICN",?42,"= "
+11 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT"),8)
End DoDot:1
+12 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"LOCAL ICN COUNT")=^XTMP("RGMT","UT01","REIND","LOCAL ICN COUNT")
+13 ;
+14 IF '$DATA(^XTMP("RGMT","UT01","REIND","NO ICN COUNT"))
SET ^XTMP("RGMT","UT01","REIND","NO ICN COUNT")=0
+15 IF '$DATA(RGHLMQ)
Begin DoDot:1
+16 WRITE !?3,"Total patients with no ICN",?42,"= "
+17 WRITE $JUSTIFY(^XTMP("RGMT","UT01","REIND","NO ICN COUNT"),8)
End DoDot:1
+18 IF $DATA(RGHLMQ)
SET ^XTMP("RGMT","HLMQUT01",LOCSTA,"NO ICN COUNT")=^XTMP("RGMT","UT01","REIND","NO ICN COUNT")
+19 ;
QUIT ;
+1 KILL %,CMOR,CMORNM,CMORSTA,COMDT,COMPB,COMPDT,COMPS,DIFF,FRSTNM,GRAND,HDT,LN,LOCSTA,SITE,SITEOPT,SKIP,TF,TFNM,TFSTA,TOT
+2 QUIT