ONCOST1 ;WASH ISC/SRR,MLH-STATISTICS TIME FRAME (continued) ;12/15/99
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;
SCT1 ;CALL 1 TO ONCOSCT
;
STG ;individual stage group/treatment
W @IOF,!!!?10,"This option will print cross-tabs for ALL ANALYTIC",!?10,"cases for TREATMENT by STAGE groups (I,II,III,IV)",!!!
SZIS K IO("Q") S %ZIS="Q" S:$D(ONCOS("I")) IOP=ONCOS("I") D ^%ZIS I POP S ONCOUT="" G EX
XG F G="I","II","III","IV" D GP
G EX
GP F ONCOS("C")="GP-"_G_" AJCC SUMMARY STAGE","TREATMENT" D SET,TSK
Q
SET S ONCOS("T")="ONCOS ANNUAL ANAL/STAGE "_G,ONCOS("F")="PRIMARY",ONCOS("R")=ROW,(ONCOS("Y"),ONCOS("N"))="",ONCOS("P")=1,ONCOS("H")=^DD("SITE")_" "_ONCOS("R")_"-"_ONCOS("C")
Q
TSK D:'$D(IO("Q")) ^ONCOSCT I $D(IO("Q")) S ZTRTN="PRINT^ONCOSCT",ZTDESC="ONCOLOGY CROSS-TABS",ZTSAVE("ONCOS*")="",ZTDTH=$H D ^%ZTLOAD K ZTSK
Q
G EX
S ONCOS("C")="GP-"_G_" AJCC SUMMARY STAGE",ONCOS("T")="ONCOS ANNUAL ANAL/STAGE "_G,ONCOS("F")="PRIMARY",ONCOS("P")=1,(ONCOS("Y"),ONCOS("N"))="" G ZIS
;
;
ZIS W !! K IO("Q") S %ZIS="Q" S:$D(ONCOS("I")) IOP=ONCOS("I") D ^%ZIS I POP S ONCOUT="" G EX
NQ I '$D(IO("Q")) D ^ONCOSCT G EX
ZT S ZTRTN="PRINT^ONCOSCT",ZTDESC="ONCOLOGY STATS"
S ZTSAVE("ONCOS*")="" D ^%ZTLOAD K ZTSK G EX
JOB ; SET/RUN TEPLATES,RUN REPORTS
D TEM G EX
TEM S XDA=$O(^DIBT("F165.5","ONCOS ANNUAL ANALYTIC",0)) Q:XDA'>0 K ^DIBT(XDA,1)
G F G=0,"I","II","III","IV","U","NA" S XD0=$O(^DIBT("F165.5","ONCOS ANNUAL ANAL/STAGE "_G,0)) Q:XD0'>0 K ^DIBT(XD0,1) S XD(G)=XD0
S YR=ONCOYR,D0=0 F S D0=$O(^ONCO(165.5,"AY",YR,D0)) Q:D0'>0 I $$DIV^ONCFUNC(D0)=DUZ(2),$P(^ONCO(165.5,D0,0),U,20)=1 S ^DIBT(XDA,1,D0)="",G=$P($G(^ONCO(165.5,D0,2)),U,28) I G'="" S ^DIBT(XD(G),1,D0)=""
S $P(^DIBT(XDA,0),U,2)=DT F G=0,"I","II","III","IV","U","NA" S $P(^DIBT(XD(G),0),U,2)=DT
Q
;
EX D ^%ZISC Q ;EXIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOST1 1831 printed Dec 13, 2024@02:25:48 Page 2
ONCOST1 ;WASH ISC/SRR,MLH-STATISTICS TIME FRAME (continued) ;12/15/99
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;
SCT1 ;CALL 1 TO ONCOSCT
+1 ;
STG ;individual stage group/treatment
+1 WRITE @IOF,!!!?10,"This option will print cross-tabs for ALL ANALYTIC",!?10,"cases for TREATMENT by STAGE groups (I,II,III,IV)",!!!
SZIS KILL IO("Q")
SET %ZIS="Q"
if $DATA(ONCOS("I"))
SET IOP=ONCOS("I")
DO ^%ZIS
IF POP
SET ONCOUT=""
GOTO EX
XG FOR G="I","II","III","IV"
DO GP
+1 GOTO EX
GP FOR ONCOS("C")="GP-"_G_" AJCC SUMMARY STAGE","TREATMENT"
DO SET
DO TSK
+1 QUIT
SET SET ONCOS("T")="ONCOS ANNUAL ANAL/STAGE "_G
SET ONCOS("F")="PRIMARY"
SET ONCOS("R")=ROW
SET (ONCOS("Y"),ONCOS("N"))=""
SET ONCOS("P")=1
SET ONCOS("H")=^DD("SITE")_" "_ONCOS("R")_"-"_ONCOS("C")
+1 QUIT
TSK if '$DATA(IO("Q"))
DO ^ONCOSCT
IF $DATA(IO("Q"))
SET ZTRTN="PRINT^ONCOSCT"
SET ZTDESC="ONCOLOGY CROSS-TABS"
SET ZTSAVE("ONCOS*")=""
SET ZTDTH=$HOROLOG
DO ^%ZTLOAD
KILL ZTSK
+1 QUIT
+2 GOTO EX
+3 SET ONCOS("C")="GP-"_G_" AJCC SUMMARY STAGE"
SET ONCOS("T")="ONCOS ANNUAL ANAL/STAGE "_G
SET ONCOS("F")="PRIMARY"
SET ONCOS("P")=1
SET (ONCOS("Y"),ONCOS("N"))=""
GOTO ZIS
+4 ;
+5 ;
ZIS WRITE !!
KILL IO("Q")
SET %ZIS="Q"
if $DATA(ONCOS("I"))
SET IOP=ONCOS("I")
DO ^%ZIS
IF POP
SET ONCOUT=""
GOTO EX
NQ IF '$DATA(IO("Q"))
DO ^ONCOSCT
GOTO EX
ZT SET ZTRTN="PRINT^ONCOSCT"
SET ZTDESC="ONCOLOGY STATS"
+1 SET ZTSAVE("ONCOS*")=""
DO ^%ZTLOAD
KILL ZTSK
GOTO EX
JOB ; SET/RUN TEPLATES,RUN REPORTS
+1 DO TEM
GOTO EX
TEM SET XDA=$ORDER(^DIBT("F165.5","ONCOS ANNUAL ANALYTIC",0))
if XDA'>0
QUIT
KILL ^DIBT(XDA,1)
G FOR G=0,"I","II","III","IV","U","NA"
SET XD0=$ORDER(^DIBT("F165.5","ONCOS ANNUAL ANAL/STAGE "_G,0))
if XD0'>0
QUIT
KILL ^DIBT(XD0,1)
SET XD(G)=XD0
+1 SET YR=ONCOYR
SET D0=0
FOR
SET D0=$ORDER(^ONCO(165.5,"AY",YR,D0))
if D0'>0
QUIT
IF $$DIV^ONCFUNC(D0)=DUZ(2)
IF $PIECE(^ONCO(165.5,D0,0),U,20)=1
SET ^DIBT(XDA,1,D0)=""
SET G=$PIECE($GET(^ONCO(165.5,D0,2)),U,28)
IF G'=""
SET ^DIBT(XD(G),1,D0)=""
+2 SET $PIECE(^DIBT(XDA,0),U,2)=DT
FOR G=0,"I","II","III","IV","U","NA"
SET $PIECE(^DIBT(XD(G),0),U,2)=DT
+3 QUIT
+4 ;
EX ;EXIT
DO ^%ZISC
QUIT