128 lines
5.9 KiB
Mathematica
128 lines
5.9 KiB
Mathematica
ONCTPC4 ;HIRMFO/GWB - PCE Study of Thyroid Cancer Table IV;6/19/96
|
|
;;2.11;ONCOLOGY;**6,11,15,16**;Mar 07, 1995
|
|
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
|