VistA-FOIAVistA/r/ONCOLOGY-ONC/ONCSPC4.m

146 lines
6.6 KiB
Mathematica

ONCSPC4 ;HIRMFO/GWB - PCE Study of Soft Tissue Sarcoma 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^ONCSPC4"
S TABLE("SURGERY")="S^ONCSPC4"
S TABLE("RADIATION THERAPY")="R^ONCSPC4"
S TABLE("CHEMOTHERAPY")="C^ONCSPC4A"
S HTABLE(1)="DATE OF FIRST COURSE TREATMENT"
S HTABLE(2)="SURGERY"
S HTABLE(3)="RADIATION THERAPY"
S HTABLE(4)="CHEMOTHERAPY"
S CHOICES=4
S D0=ONCONUM D DFC^ONCOCOM S DOFCT=Y
S DIC="^ONCO(165.5,",DR="50;51.2;53;53.2;58.1;58.2;58.3",DA=ONCONUM
S DIQ="ONC",DIQ(0)="IE" D EN^DIQ1
W @IOF D HEAD^ONCSPC0 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 !," NON CANCER-DIRECTED SURGERY DATE: ",NCDSDT
W !," NON CANCER-DIRECTED SURGERY.....: ",NCDS1 W:NCDS2'="" !,?39,NCDS2
W !," SURGERY OF PRIMARY SITE DATE....: ",CDSDT
CDS W !," SURGERY OF PRIMARY SITE.........: ",CDS1 W:CDS2'="" !,?39,CDS2
I (CDS="")!($E(CDS,1,2)="00") D W @IOF G R
.S $P(^ONCO(165.5,ONCONUM,3),U,28)=8
.W !," RESIDUAL PRIMARY TUMOR..........: NA"
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,1)=8
.W !," TREATING SURGEON................: Not applicable, no surgery"
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,2)=9
.W !," ASA CLASS.......................: Class unknown or not applicable"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,42)=8
.W !," POSTOPERATIVE DEATH.............: 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
S DR="526 TREATING SURGEON................" D ^DIE G:$D(Y) JUMP
S DR="527 ASA CLASS......................." D ^DIE G:$D(Y) JUMP
S DR="441 POSTOPERATIVE DEATH............." D ^DIE G:$D(Y) JUMP
R W !!,"RADIATION THERAPY:",!
S RAD=ONC(165.5,ONCONUM,51.2,"I")
I RAD=0 D W !," EXTERNAL BEAM RADIATION.........: No" D EB0 W !!," INTRAOPERATIVE RADIATION........: No" D IR0 W !!," BRACHYTHERAPY...................: No" D B0 G RSS
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,3)=0
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,6)=0
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,9)=0
I RAD=9 D W !," EXTERNAL BEAM RADIATION.........: Unknown" D EB9 W !!," INTRAOPERATIVE RADIATION........: Unknown" D IR9 W !!," BRACHYTHERAPY...................: Unknown" D B9 G RSS
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,3)=9
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,6)=9
.S $P(^ONCO(165.5,ONCONUM,"STS2"),U,9)=9
S DR="532 EXTERNAL BEAM RADIATION........." D ^DIE G:$D(Y) JUMP
I X=0 D EB0 G IR
I X=9 D EB9 G IR
S DR="533 NUMBER OF FRACTIONS..........." D ^DIE G:$D(Y) JUMP
S DR="362 DOSE.........................." D ^DIE G:$D(Y) JUMP
S DR="534 RADIATION ENERGY (MV)........." D ^DIE G:$D(Y) JUMP
S DR="567 DATE THERAPY STARTED.........." D ^DIE G:$D(Y) JUMP
S DR="361 DATE THERAPY ENDED............" D ^DIE G:$D(Y) JUMP
IR W ! S DR="535 INTRAOPERATIVE RADIATION........" D ^DIE G:$D(Y) JUMP
I X=0 D IR0 G B
I X=9 D IR9 G B
S DR="536 DOSE.........................." D ^DIE G:$D(Y) JUMP
S DR="537 RADIATION ENERGY (MV)........." D ^DIE G:$D(Y) JUMP
B W ! S DR="538 BRACHYTHERAPY..................." D ^DIE G:$D(Y) JUMP
I X=0 D B0 G RSS
I X=9 D B9 G RSS
S DR="539 NUMBER OF DAYS GIVEN.........." D ^DIE G:$D(Y) JUMP
S DR="540 DOSE.........................." D ^DIE G:$D(Y) JUMP
S DR="541 DATE THERAPY STARTED.........." D ^DIE G:$D(Y) JUMP
S DR="542 DATE THERAPY ENDED............" D ^DIE G:$D(Y) JUMP
RSS W ! S DR="51.3 RADIATION/SURGERY SEQUENCE......" D ^DIE G:$D(Y) JUMP
D ^ONCSPC4A
I $G(OUT)'="Y" 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
EB0 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,4)=0
W !," NUMBER OF FRACTIONS...........: 000"
S $P(^ONCO(165.5,ONCONUM,"BLA2"),U,17)=0
W !," DOSE..........................: 00000"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,5)=0
W !," RADIATION ENERGY (MV).........: 00"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,38)="0000000"
W !," DATE THERAPY STARTED..........: 00/00/0000"
S $P(^ONCO(165.5,ONCONUM,"BLA2"),U,16)="0000000"
W !," DATE THERAPY ENDED............: 00/00/0000"
Q
EB9 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,4)=999
W !," NUMBER OF FRACTIONS...........: 999"
S $P(^ONCO(165.5,ONCONUM,"BLA2"),U,17)=99999
W !," DOSE..........................: 99999"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,5)=99
W !," RADIATION ENERGY (MV).........: 99"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,38)=9999999
W !," DATE THERAPY STARTED..........: 99/99/9999"
S $P(^ONCO(165.5,ONCONUM,"BLA2"),U,16)=9999999
W !," DATE THERAPY ENDED............: 99/99/9999"
Q
IR0 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,7)=0
W !," DOSE..........................: 00000"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,8)=0
W !," RADIATION ENERGY (MV).........: 00"
Q
IR9 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,7)=99999
W !," DOSE..........................: 99999"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,8)=99
W !," RADIATION ENERGY (MV).........: 99"
Q
B0 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,10)=0
W !," NUMBER OF DAYS GIVEN..........: 000"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,11)=0
W !," DOSE..........................: 00000"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,12)="0000000"
W !," DATE THERAPY STARTED..........: 00/00/0000"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,13)="0000000"
W !," DATE THERAPY ENDED............: 00/00/0000"
Q
B9 S $P(^ONCO(165.5,ONCONUM,"STS2"),U,10)=999
W !," NUMBER OF DAYS GIVEN..........: 999"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,11)=99999
W !," DOSE..........................: 99999"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,12)=9999999
W !," DATE THERAPY STARTED..........: 99/99/9999"
S $P(^ONCO(165.5,ONCONUM,"STS2"),U,13)=9999999
W !," DATE THERAPY ENDED............: 99/99/9999"
Q