ONCTPC6 ;HIRMFO/GWB - PCE Study of Thyroid Cancer - Table VI;7/22/96
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
K TABLE,HTABLE
S TABLE("DATE OF LAST CONTACT OR DEATH")="DLC"
S TABLE("VITAL STATUS")="VS"
S TABLE("CANCER STATUS")="CS"
S TABLE("AUTOPSY")="A"
S TABLE("COMPLETED BY")="CB"
S TABLE("REVIEWED BY CANCER COMMITTEE")="RBCC"
S HTABLE(1)="DATE OF LAST CONTACT OR DEATH"
S HTABLE(2)="VITAL STATUS"
S HTABLE(3)="CANCER STATUS"
S HTABLE(4)="AUTOPSY"
S HTABLE(5)="COMPLETED BY"
S HTABLE(6)="REVIEWED BY CANCER COMMITTEE"
S CHOICES=6
W @IOF D HEAD^ONCTPC0 W !?23,"TABLE VI - STATUS AT LAST CONTACT",!
DLC S DLC="" I $D(^ONCO(160,ONCOPA,"F","B")) S DLC=$O(^ONCO(160,ONCOPA,"F","B",""),-1)
I DLC'="" S Y=DLC D DATEOT^ONCOPCE S DLC=Y
W !,"DATE OF LAST CONTACT OR DEATH: ",DLC
VS S DIE="^ONCO(160,",DA=ONCONUM
S DR="15VITAL STATUS................." D ^DIE G:$D(Y) JUMP
I X=1 S $P(^ONCO(165.5,ONCONUM,7),U,14)=0
CS S CS="" I $D(^ONCO(165.5,ONCONUM,"TS","AA")) D
.S CSDAT=$O(^ONCO(165.5,ONCONUM,"TS","AA",""))
.S CSIEN=$O(^ONCO(165.5,ONCONUM,"TS","AA",CSDAT,""))
.S CSPNT=$P(^ONCO(165.5,ONCONUM,"TS",CSIEN,0),U,2)
.S CS=$P(^ONCO(164.42,CSPNT,0),U,1)
W !,"CANCER STATUS................: ",CS
A S DIE="^ONCO(160,",DA=ONCONUM
S DR="22.9AUTOPSY......................" D ^DIE G:$D(Y) JUMP
CB S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="81COMPLETED BY................." D ^DIE G:$D(Y) JUMP
RBCC S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="82REVIEWED BY CANCER COMMITTEE." D ^DIE G:$D(Y) JUMP
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 CS,CSDAT,CSIEN,CSPNT,DLC
K DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCTPC6 2010 printed Nov 22, 2024@17:39:07 Page 2
ONCTPC6 ;HIRMFO/GWB - PCE Study of Thyroid Cancer - Table VI;7/22/96
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 KILL TABLE,HTABLE
+3 SET TABLE("DATE OF LAST CONTACT OR DEATH")="DLC"
+4 SET TABLE("VITAL STATUS")="VS"
+5 SET TABLE("CANCER STATUS")="CS"
+6 SET TABLE("AUTOPSY")="A"
+7 SET TABLE("COMPLETED BY")="CB"
+8 SET TABLE("REVIEWED BY CANCER COMMITTEE")="RBCC"
+9 SET HTABLE(1)="DATE OF LAST CONTACT OR DEATH"
+10 SET HTABLE(2)="VITAL STATUS"
+11 SET HTABLE(3)="CANCER STATUS"
+12 SET HTABLE(4)="AUTOPSY"
+13 SET HTABLE(5)="COMPLETED BY"
+14 SET HTABLE(6)="REVIEWED BY CANCER COMMITTEE"
+15 SET CHOICES=6
+16 WRITE @IOF
DO HEAD^ONCTPC0
WRITE !?23,"TABLE VI - STATUS AT LAST CONTACT",!
DLC SET DLC=""
IF $DATA(^ONCO(160,ONCOPA,"F","B"))
SET DLC=$ORDER(^ONCO(160,ONCOPA,"F","B",""),-1)
+1 IF DLC'=""
SET Y=DLC
DO DATEOT^ONCOPCE
SET DLC=Y
+2 WRITE !,"DATE OF LAST CONTACT OR DEATH: ",DLC
VS SET DIE="^ONCO(160,"
SET DA=ONCONUM
+1 SET DR="15VITAL STATUS................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+2 IF X=1
SET $PIECE(^ONCO(165.5,ONCONUM,7),U,14)=0
CS SET CS=""
IF $DATA(^ONCO(165.5,ONCONUM,"TS","AA"))
Begin DoDot:1
+1 SET CSDAT=$ORDER(^ONCO(165.5,ONCONUM,"TS","AA",""))
+2 SET CSIEN=$ORDER(^ONCO(165.5,ONCONUM,"TS","AA",CSDAT,""))
+3 SET CSPNT=$PIECE(^ONCO(165.5,ONCONUM,"TS",CSIEN,0),U,2)
+4 SET CS=$PIECE(^ONCO(164.42,CSPNT,0),U,1)
End DoDot:1
+5 WRITE !,"CANCER STATUS................: ",CS
A SET DIE="^ONCO(160,"
SET DA=ONCONUM
+1 SET DR="22.9AUTOPSY......................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
CB SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="81COMPLETED BY................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
RBCC SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="82REVIEWED BY CANCER COMMITTEE."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+2 WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
+3 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 CS,CSDAT,CSIEN,CSPNT,DLC
+2 KILL DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
+3 QUIT