ONCTPC5 ;HIRMFO/GWB - PCE Study of Thyroid Cancer - Table V;7/22/96
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
K TABLE,HTABLE S OUT=""
S TABLE("DATE OF FIRST RECURRENCE")="DOFR"
S TABLE("TYPE OF FIRST RECURRENCE")="TOFR"
S TABLE("OTHER TYPE OF FIRST RECURRENCE")="OTOFR"
S TABLE("SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION")="STFROP"
S TABLE("DISTANT SITE(S) OF FIRST RECURRENCE")="DSOFR"
S HTABLE(1)="DATE OF FIRST RECURRENCE"
S HTABLE(2)="TYPE OF FIRST RECURRENCE"
S HTABLE(3)="OTHER TYPE OF FIRST RECURRENCE"
S HTABLE(4)="SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION"
S HTABLE(5)="DISTANT SITE(S) OF FIRST RECURRENCE"
S CHOICES=5
W @IOF D HEAD^ONCTPC0 W !?15,"TABLE V - FIRST RECURRENCE AND SUBSEQUENT TREATMENT",!
DOFR S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="70DATE OF FIRST RECURRENCE......" D ^DIE G:$D(Y) JUMP
TOFR S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="71TYPE OF FIRST RECURRENCE......" D ^DIE G:$D(Y) JUMP
OTOFR S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="71.4OTHER TYPE OF FIRST RECURRENCE" D ^DIE G:$D(Y) JUMP
STFROP W !!,"SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION:"
I '$D(^ONCO(165.5,ONCONUM,4,0)) W !!,"NO SUBSEQUENT TREATMENT" G DSOFR
I $O(^ONCO(165.5,ONCONUM,4,0))="" W !!,"NO SUBSEQUENT TREATMENT" G DSOFR
I $D(^ONCO(165.5,ONCONUM,4,0)) S SCTIEN=0 F CRSE=1:1 S SCTIEN=$O(^ONCO(165.5,ONCONUM,4,SCTIEN)) Q:(SCTIEN'>0)!(CRSE=4)!(OUT="Y") D SS Q:$D(Y)
G:OUT="Y" EXIT G DSOFR
SS S ID=$P(^ONCO(165.5,ONCONUM,4,SCTIEN,0),U,1)
S Y=ID D DATEOT^ONCOPCE S ID=Y
S COURSE=$S(CRSE=1:"SECOND",CRSE=2:"THIRD",CRSE=3:"FOURTH",1:"")
W !!," ",COURSE," COURSE:",!
W !," DATE...........: ",ID
S DIE="^ONCO(165.5,"_ONCONUM_",4,",DA(1)=ONCONUM,DA=SCTIEN
S DR=".04 SURGERY........" D ^DIE G:$D(Y) JUMP
S DR=".05 RADIATION......" D ^DIE G:$D(Y) JUMP
S DR=".06 CHEMOTHERAPY..." D ^DIE G:$D(Y) JUMP
S DR=".07 HORMONE THERAPY" D ^DIE G:$D(Y) JUMP
S DR=".09 OTHER.........." D ^DIE G:$D(Y) JUMP
Q
DSOFR S DIE="^ONCO(165.5,",DA=ONCONUM
W !!,"DISTANT SITE(S) OF RECURRENCE:",!
S DR="71.1 RECURRENCE SITE 1..........." D ^DIE G:$D(Y) JUMP
I X=0 D G PRTC
.S $P(^ONCO(165.5,ONCONUM,5),U,4)=0
.W !," RECURRENCE SITE 2...........: None"
.S $P(^ONCO(165.5,ONCONUM,5),U,5)=0
.W !," RECURRENCE SITE 3...........: None"
S DR="71.2 RECURRENCE SITE 2..........." D ^DIE G:$D(Y) JUMP
I X=0 D G PRTC
.S $P(^ONCO(165.5,ONCONUM,5),U,5)=0
.W !," RECURRENCE SITE 3...........: None"
S DR="71.3 RECURRENCE SITE 3..........." D ^DIE G:$D(Y) JUMP
PRTC 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 ID
K DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCTPC5 2997 printed Nov 22, 2024@17:39:06 Page 2
ONCTPC5 ;HIRMFO/GWB - PCE Study of Thyroid Cancer - Table V;7/22/96
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 KILL TABLE,HTABLE
SET OUT=""
+3 SET TABLE("DATE OF FIRST RECURRENCE")="DOFR"
+4 SET TABLE("TYPE OF FIRST RECURRENCE")="TOFR"
+5 SET TABLE("OTHER TYPE OF FIRST RECURRENCE")="OTOFR"
+6 SET TABLE("SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION")="STFROP"
+7 SET TABLE("DISTANT SITE(S) OF FIRST RECURRENCE")="DSOFR"
+8 SET HTABLE(1)="DATE OF FIRST RECURRENCE"
+9 SET HTABLE(2)="TYPE OF FIRST RECURRENCE"
+10 SET HTABLE(3)="OTHER TYPE OF FIRST RECURRENCE"
+11 SET HTABLE(4)="SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION"
+12 SET HTABLE(5)="DISTANT SITE(S) OF FIRST RECURRENCE"
+13 SET CHOICES=5
+14 WRITE @IOF
DO HEAD^ONCTPC0
WRITE !?15,"TABLE V - FIRST RECURRENCE AND SUBSEQUENT TREATMENT",!
DOFR SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="70DATE OF FIRST RECURRENCE......"
DO ^DIE
if $DATA(Y)
GOTO JUMP
TOFR SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="71TYPE OF FIRST RECURRENCE......"
DO ^DIE
if $DATA(Y)
GOTO JUMP
OTOFR SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="71.4OTHER TYPE OF FIRST RECURRENCE"
DO ^DIE
if $DATA(Y)
GOTO JUMP
STFROP WRITE !!,"SUBSEQUENT TREATMENT FOR RECURRENCE OR PROGRESSION:"
+1 IF '$DATA(^ONCO(165.5,ONCONUM,4,0))
WRITE !!,"NO SUBSEQUENT TREATMENT"
GOTO DSOFR
+2 IF $ORDER(^ONCO(165.5,ONCONUM,4,0))=""
WRITE !!,"NO SUBSEQUENT TREATMENT"
GOTO DSOFR
+3 IF $DATA(^ONCO(165.5,ONCONUM,4,0))
SET SCTIEN=0
FOR CRSE=1:1
SET SCTIEN=$ORDER(^ONCO(165.5,ONCONUM,4,SCTIEN))
if (SCTIEN'>0)!(CRSE=4)!(OUT="Y")
QUIT
DO SS
if $DATA(Y)
QUIT
+4 if OUT="Y"
GOTO EXIT
GOTO DSOFR
SS SET ID=$PIECE(^ONCO(165.5,ONCONUM,4,SCTIEN,0),U,1)
+1 SET Y=ID
DO DATEOT^ONCOPCE
SET ID=Y
+2 SET COURSE=$SELECT(CRSE=1:"SECOND",CRSE=2:"THIRD",CRSE=3:"FOURTH",1:"")
+3 WRITE !!," ",COURSE," COURSE:",!
+4 WRITE !," DATE...........: ",ID
+5 SET DIE="^ONCO(165.5,"_ONCONUM_",4,"
SET DA(1)=ONCONUM
SET DA=SCTIEN
+6 SET DR=".04 SURGERY........"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+7 SET DR=".05 RADIATION......"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+8 SET DR=".06 CHEMOTHERAPY..."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+9 SET DR=".07 HORMONE THERAPY"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+10 SET DR=".09 OTHER.........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+11 QUIT
DSOFR SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 WRITE !!,"DISTANT SITE(S) OF RECURRENCE:",!
+2 SET DR="71.1 RECURRENCE SITE 1..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+3 IF X=0
Begin DoDot:1
+4 SET $PIECE(^ONCO(165.5,ONCONUM,5),U,4)=0
+5 WRITE !," RECURRENCE SITE 2...........: None"
+6 SET $PIECE(^ONCO(165.5,ONCONUM,5),U,5)=0
+7 WRITE !," RECURRENCE SITE 3...........: None"
End DoDot:1
GOTO PRTC
+8 SET DR="71.2 RECURRENCE SITE 2..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+9 IF X=0
Begin DoDot:1
+10 SET $PIECE(^ONCO(165.5,ONCONUM,5),U,5)=0
+11 WRITE !," RECURRENCE SITE 3...........: None"
End DoDot:1
GOTO PRTC
+12 SET DR="71.3 RECURRENCE SITE 3..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PRTC WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
+1 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 ID
+2 KILL DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
+3 QUIT