ONCTPC4 ;HIRMFO/GWB - PCE Study of Thyroid Cancer Table IV;6/19/96
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
K ONC,TABLE,HTABLE
S TABLE("DATE OF FIRST COURSE TREATMENT")="DOFCT"
S TABLE("SURGERY")="S"
S TABLE("RADIATION")="R"
S TABLE("CHEMOTHERAPY")="C"
S TABLE("HORMONE THERAPY")="HT"
S HTABLE(1)="DATE OF FIRST COURSE TREATMENT"
S HTABLE(2)="SURGERY"
S HTABLE(3)="RADIATION"
S HTABLE(4)="CHEMOTHERAPY"
S HTABLE(5)="HORMONE THERAPY"
S CHOICES=5
S D0=ONCONUM D DFC^ONCOCOM S DOFCT=Y
S DIC="^ONCO(165.5,",DR="50;51.2;53.2;54.2;58.1;58.2;58.3",DA=ONCONUM
S DIQ="ONC",DIQ(0)="IE" D EN^DIQ1
W @IOF D HEAD^ONCTPC0 W !?22,"TABLE IV - FIRST COURSE OF TREATMENT",!
S DIE="^ONCO(165.5,",DA=ONCONUM
DOFCT W !,"DATE OF FIRST COURSE TREATMENT.......: ",DOFCT
S W !!,"SURGERY:",!
S NCDSDT=$P($G(^ONCO(165.5,ONCONUM,3)),U,31)
S Y=NCDSDT D DATEOT^ONCOPCE S NCDSDT=Y
S NCDS=ONC(165.5,ONCONUM,58.1,"E")
S (NCDS1,NCDS2)="",LOS=$L(NCDS) I LOS<42 S NCDS1=NCDS G CDSDT
S NOP=$L($E(NCDS,1,41)," ")
S NCDS1=$P(NCDS," ",1,NOP-1),NCDS2=$P(NCDS," ",NOP,999)
CDSDT S CDSDT=$P($G(^ONCO(165.5,ONCONUM,3)),U,1)
S Y=CDSDT D DATEOT^ONCOPCE S CDSDT=Y
S CDS=ONC(165.5,ONCONUM,58.2,"E")
S (CDS1,CDS2)="",LOS=$L(CDS) I LOS<42 S CDS1=CDS G NCDS
S NOP=$L($E(CDS,1,41)," ")
S CDS1=$P(CDS," ",1,NOP-1),CDS2=$P(CDS," ",NOP,999)
NCDS W !," DATE OF NON CANCER-DIRECTED SURGERY: ",NCDSDT
W !," NON CANCER-DIRECTED SURGERY........: ",NCDS1 W:NCDS2'="" !,?42,NCDS2
W !," DATE OF SURGERY OF PRIMARY SITE....: ",CDSDT
I (CDS="")!($E(CDS,1,2)="00") D G CDS
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,36)="0000000"
.W !," DATE OF DISCHARGE AFTER SURGERY....: 00/00/0000"
S DR="435 DATE OF DISCHARGE AFTER SURGERY...." D ^DIE G:$D(Y) JUMP
CDS W !," SURGERY OF PRIMARY SITE............: ",CDS1 W:CDS2'="" !,?42,CDS2
SC I (CDS="")!($E(CDS,1,2)="00") D G:(Y=0)!(Y="") EXIT W @IOF G R
.S $P(^ONCO(165.5,ONCONUM,3),U,28)=8
.W !," RESIDUAL PRIMARY TUMOR.............: NA"
.W ! K DIR S DIR(0)="E" D ^DIR Q:(Y=0)!(Y="") W @IOF
.W !!," SURGICAL COMPLICATIONS:",!
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,37)=8
.W !," AIRWAY PROBLEM REQ TRACHEOSTOMY..: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,38)=8
.W !," BLEEDING HEMATOMA................: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,39)=8
.W !," HYPOCALCEMIA.....................: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,40)=8
.W !," RECURRENT NERVE INJURY...........: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,41)=8
.W !," WOUND INFECTION..................: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,42)=8
.W !!," POSTOPERATIVE DEATH WITH 30 DAYS.: Not applicable, no surgery"
.W ! K DIR S DIR(0)="E" D ^DIR
S DR="59 RESIDUAL PRIMARY TUMOR............." D ^DIE G:$D(Y) JUMP
W !!," SURGICAL COMPLICATIONS:",!
S DR="436 AIRWAY PROBLEM REQ TRACHEOSTOMY.." D ^DIE G:$D(Y) JUMP
S DR="437 BLEEDING HEMATOMA................" D ^DIE G:$D(Y) JUMP
S DR="438 HYPOCALCEMIA....................." D ^DIE G:$D(Y) JUMP
S DR="439 RECURRENT NERVE INJURY..........." D ^DIE G:$D(Y) JUMP
S DR="440 WOUND INFECTION.................." D ^DIE G:$D(Y) JUMP
W !
S DR="441 POSTOPERATIVE DEATH WITHIN 30 DAYS." D ^DIE G:$D(Y) JUMP
R W !!,"RADIATION:",!
S RADDT=$P($G(^ONCO(165.5,ONCONUM,3)),U,4)
S Y=RADDT D DATEOT^ONCOPCE S RADDT=Y
W !," DATE RADIATION STARTED.............: ",RADDT
S RAD=ONC(165.5,ONCONUM,51.2,"I"),RADOT=ONC(165.5,ONCONUM,51.2,"E")
W !," RADIATION .........................: ",RADOT
I (RAD=0)!(RAD=7) D G C
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,43)=0
.W !," REGIONAL RAD (cGy) DOSE............: 00000"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,44)=0
.W !," BOOST DOSAGE.......................: 00000"
.W !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,45)=0
.W !," INITAL DOSE........................: 00000"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,46)=0
.W !," SECOND DOSE........................: 00000"
I ($E(RAD,1)=8)!($E(RAD,1)=9) D G C
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,43)=99999
.W !," REGIONAL RAD (cGy) DOSE............: 99999"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,44)=99999
.W !," BOOST DOSAGE.......................: 99999"
.W !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,45)=99999
.W !," INITAL DOSE........................: 99999"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,46)=99999
.W !," SECOND DOSE........................: 99999"
S DR="442 REGIONAL RAD (cGy) DOSE............" D ^DIE G:$D(Y) JUMP
S DR="443 BOOST DOSAGE......................." D ^DIE G:$D(Y) JUMP
W !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:",!
S DR="444 INITIAL DOSE......................." D ^DIE G:$D(Y) JUMP
S DR="445 SECOND DOSE........................" D ^DIE G:$D(Y) JUMP
C W !!,"CHEMOTHERAPY:",!
S CHEMO=ONC(165.5,ONCONUM,53.2,"I"),CHEMOT=ONC(165.5,ONCONUM,53.2,"E")
W !," CHEMOTHERAPY.......................: ",CHEMOT
I ($E(CHEMO,1)=0)!($E(CHEMO,1)=7) D G HT
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,47)=0
.W !," ADJUVANT CHEMO W BEAM RADIATION....: No concomitant treatment"
I ($E(CHEMO,1)=8)!($E(CHEMO,1)=9) D G HT
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,47)=9
.W !," ADJUVANT CHEMO W BEAM RADIATION....: Unknown if therapy concomitant"
S DR="446 ADJUVANT CHEMO W BEAM RADIATION...." D ^DIE G:$D(Y) JUMP
HT W !!,"HORMONE THERAPY:",!
S HT=ONC(165.5,ONCONUM,54.2,"I")
S HT=$S((HT=0)!(HT=7):"No",(HT=1)!(HT=2)!(HT=3):"Yes",1:"Unknown")
W !," THYROID HORMONE THERAPY............: ",HT
W ! K DIR S DIR(0)="E" D ^DIR
G EXIT
JUMP ;Jump to prompts
S XX="" R !!,"GO TO: ",X:DTIME I (X="")!(X[U) S OUT="Y" G EXIT
I X["?" D G JUMP
.W !,"CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I)
I '$D(TABLE(X)) S XX=X,X=$O(TABLE(X)) I ($P(X,XX,1)'="")!(X="") W *7,"??" D G JUMP
.W !,"CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I)
S X=TABLE(X)
G @X
EXIT K CHOICES,HTABLE,TABLE
K CDS,CDS1,CDS2,CDSDT,CHEMO,DOFCT,HT,LOS,NCDS,NCDS1,NCDS2,NCDSDT,NOP,RAD
K RADDT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCTPC4 6180 printed Nov 22, 2024@17:39:05 Page 2
ONCTPC4 ;HIRMFO/GWB - PCE Study of Thyroid Cancer Table IV;6/19/96
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 KILL ONC,TABLE,HTABLE
+3 SET TABLE("DATE OF FIRST COURSE TREATMENT")="DOFCT"
+4 SET TABLE("SURGERY")="S"
+5 SET TABLE("RADIATION")="R"
+6 SET TABLE("CHEMOTHERAPY")="C"
+7 SET TABLE("HORMONE THERAPY")="HT"
+8 SET HTABLE(1)="DATE OF FIRST COURSE TREATMENT"
+9 SET HTABLE(2)="SURGERY"
+10 SET HTABLE(3)="RADIATION"
+11 SET HTABLE(4)="CHEMOTHERAPY"
+12 SET HTABLE(5)="HORMONE THERAPY"
+13 SET CHOICES=5
+14 SET D0=ONCONUM
DO DFC^ONCOCOM
SET DOFCT=Y
+15 SET DIC="^ONCO(165.5,"
SET DR="50;51.2;53.2;54.2;58.1;58.2;58.3"
SET DA=ONCONUM
+16 SET DIQ="ONC"
SET DIQ(0)="IE"
DO EN^DIQ1
+17 WRITE @IOF
DO HEAD^ONCTPC0
WRITE !?22,"TABLE IV - FIRST COURSE OF TREATMENT",!
+18 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
DOFCT WRITE !,"DATE OF FIRST COURSE TREATMENT.......: ",DOFCT
S WRITE !!,"SURGERY:",!
+1 SET NCDSDT=$PIECE($GET(^ONCO(165.5,ONCONUM,3)),U,31)
+2 SET Y=NCDSDT
DO DATEOT^ONCOPCE
SET NCDSDT=Y
+3 SET NCDS=ONC(165.5,ONCONUM,58.1,"E")
+4 SET (NCDS1,NCDS2)=""
SET LOS=$LENGTH(NCDS)
IF LOS<42
SET NCDS1=NCDS
GOTO CDSDT
+5 SET NOP=$LENGTH($EXTRACT(NCDS,1,41)," ")
+6 SET NCDS1=$PIECE(NCDS," ",1,NOP-1)
SET NCDS2=$PIECE(NCDS," ",NOP,999)
CDSDT SET CDSDT=$PIECE($GET(^ONCO(165.5,ONCONUM,3)),U,1)
+1 SET Y=CDSDT
DO DATEOT^ONCOPCE
SET CDSDT=Y
+2 SET CDS=ONC(165.5,ONCONUM,58.2,"E")
+3 SET (CDS1,CDS2)=""
SET LOS=$LENGTH(CDS)
IF LOS<42
SET CDS1=CDS
GOTO NCDS
+4 SET NOP=$LENGTH($EXTRACT(CDS,1,41)," ")
+5 SET CDS1=$PIECE(CDS," ",1,NOP-1)
SET CDS2=$PIECE(CDS," ",NOP,999)
NCDS WRITE !," DATE OF NON CANCER-DIRECTED SURGERY: ",NCDSDT
+1 WRITE !," NON CANCER-DIRECTED SURGERY........: ",NCDS1
if NCDS2'=""
WRITE !,?42,NCDS2
+2 WRITE !," DATE OF SURGERY OF PRIMARY SITE....: ",CDSDT
+3 IF (CDS="")!($EXTRACT(CDS,1,2)="00")
Begin DoDot:1
+4 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,36)="0000000"
+5 WRITE !," DATE OF DISCHARGE AFTER SURGERY....: 00/00/0000"
End DoDot:1
GOTO CDS
+6 SET DR="435 DATE OF DISCHARGE AFTER SURGERY...."
DO ^DIE
if $DATA(Y)
GOTO JUMP
CDS WRITE !," SURGERY OF PRIMARY SITE............: ",CDS1
if CDS2'=""
WRITE !,?42,CDS2
SC IF (CDS="")!($EXTRACT(CDS,1,2)="00")
Begin DoDot:1
+1 SET $PIECE(^ONCO(165.5,ONCONUM,3),U,28)=8
+2 WRITE !," RESIDUAL PRIMARY TUMOR.............: NA"
+3 WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
if (Y=0)!(Y="")
QUIT
WRITE @IOF
+4 WRITE !!," SURGICAL COMPLICATIONS:",!
+5 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,37)=8
+6 WRITE !," AIRWAY PROBLEM REQ TRACHEOSTOMY..: Not applicable, no surgery"
+7 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,38)=8
+8 WRITE !," BLEEDING HEMATOMA................: Not applicable, no surgery"
+9 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,39)=8
+10 WRITE !," HYPOCALCEMIA.....................: Not applicable, no surgery"
+11 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,40)=8
+12 WRITE !," RECURRENT NERVE INJURY...........: Not applicable, no surgery"
+13 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,41)=8
+14 WRITE !," WOUND INFECTION..................: Not applicable, no surgery"
+15 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,42)=8
+16 WRITE !!," POSTOPERATIVE DEATH WITH 30 DAYS.: Not applicable, no surgery"
+17 WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
End DoDot:1
if (Y=0)!(Y="")
GOTO EXIT
WRITE @IOF
GOTO R
+18 SET DR="59 RESIDUAL PRIMARY TUMOR............."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+19 WRITE !!," SURGICAL COMPLICATIONS:",!
+20 SET DR="436 AIRWAY PROBLEM REQ TRACHEOSTOMY.."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+21 SET DR="437 BLEEDING HEMATOMA................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+22 SET DR="438 HYPOCALCEMIA....................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+23 SET DR="439 RECURRENT NERVE INJURY..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+24 SET DR="440 WOUND INFECTION.................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+25 WRITE !
+26 SET DR="441 POSTOPERATIVE DEATH WITHIN 30 DAYS."
DO ^DIE
if $DATA(Y)
GOTO JUMP
R WRITE !!,"RADIATION:",!
+1 SET RADDT=$PIECE($GET(^ONCO(165.5,ONCONUM,3)),U,4)
+2 SET Y=RADDT
DO DATEOT^ONCOPCE
SET RADDT=Y
+3 WRITE !," DATE RADIATION STARTED.............: ",RADDT
+4 SET RAD=ONC(165.5,ONCONUM,51.2,"I")
SET RADOT=ONC(165.5,ONCONUM,51.2,"E")
+5 WRITE !," RADIATION .........................: ",RADOT
+6 IF (RAD=0)!(RAD=7)
Begin DoDot:1
+7 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,43)=0
+8 WRITE !," REGIONAL RAD (cGy) DOSE............: 00000"
+9 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,44)=0
+10 WRITE !," BOOST DOSAGE.......................: 00000"
+11 WRITE !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:"
+12 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,45)=0
+13 WRITE !," INITAL DOSE........................: 00000"
+14 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,46)=0
+15 WRITE !," SECOND DOSE........................: 00000"
End DoDot:1
GOTO C
+16 IF ($EXTRACT(RAD,1)=8)!($EXTRACT(RAD,1)=9)
Begin DoDot:1
+17 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,43)=99999
+18 WRITE !," REGIONAL RAD (cGy) DOSE............: 99999"
+19 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,44)=99999
+20 WRITE !," BOOST DOSAGE.......................: 99999"
+21 WRITE !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:"
+22 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,45)=99999
+23 WRITE !," INITAL DOSE........................: 99999"
+24 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,46)=99999
+25 WRITE !," SECOND DOSE........................: 99999"
End DoDot:1
GOTO C
+26 SET DR="442 REGIONAL RAD (cGy) DOSE............"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+27 SET DR="443 BOOST DOSAGE......................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+28 WRITE !!," TOTAL MILLICURIES (mCi) OF RADIOIODINE:",!
+29 SET DR="444 INITIAL DOSE......................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+30 SET DR="445 SECOND DOSE........................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
C WRITE !!,"CHEMOTHERAPY:",!
+1 SET CHEMO=ONC(165.5,ONCONUM,53.2,"I")
SET CHEMOT=ONC(165.5,ONCONUM,53.2,"E")
+2 WRITE !," CHEMOTHERAPY.......................: ",CHEMOT
+3 IF ($EXTRACT(CHEMO,1)=0)!($EXTRACT(CHEMO,1)=7)
Begin DoDot:1
+4 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,47)=0
+5 WRITE !," ADJUVANT CHEMO W BEAM RADIATION....: No concomitant treatment"
End DoDot:1
GOTO HT
+6 IF ($EXTRACT(CHEMO,1)=8)!($EXTRACT(CHEMO,1)=9)
Begin DoDot:1
+7 SET $PIECE(^ONCO(165.5,ONCONUM,"THY1"),U,47)=9
+8 WRITE !," ADJUVANT CHEMO W BEAM RADIATION....: Unknown if therapy concomitant"
End DoDot:1
GOTO HT
+9 SET DR="446 ADJUVANT CHEMO W BEAM RADIATION...."
DO ^DIE
if $DATA(Y)
GOTO JUMP
HT WRITE !!,"HORMONE THERAPY:",!
+1 SET HT=ONC(165.5,ONCONUM,54.2,"I")
+2 SET HT=$SELECT((HT=0)!(HT=7):"No",(HT=1)!(HT=2)!(HT=3):"Yes",1:"Unknown")
+3 WRITE !," THYROID HORMONE THERAPY............: ",HT
+4 WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
+5 GOTO EXIT
JUMP ;Jump to prompts
+1 SET XX=""
READ !!,"GO TO: ",X:DTIME
IF (X="")!(X[U)
SET OUT="Y"
GOTO EXIT
+2 IF X["?"
Begin DoDot:1
+3 WRITE !,"CHOOSE FROM:"
FOR I=1:1:CHOICES
WRITE !,?5,HTABLE(I)
End DoDot:1
GOTO JUMP
+4 IF '$DATA(TABLE(X))
SET XX=X
SET X=$ORDER(TABLE(X))
IF ($PIECE(X,XX,1)'="")!(X="")
WRITE *7,"??"
Begin DoDot:1
+5 WRITE !,"CHOOSE FROM:"
FOR I=1:1:CHOICES
WRITE !,?5,HTABLE(I)
End DoDot:1
GOTO JUMP
+6 SET X=TABLE(X)
+7 GOTO @X
EXIT KILL CHOICES,HTABLE,TABLE
+1 KILL CDS,CDS1,CDS2,CDSDT,CHEMO,DOFCT,HT,LOS,NCDS,NCDS1,NCDS2,NCDSDT,NOP,RAD
+2 KILL RADDT
+3 QUIT