VistA-WorldVistAEHR/r/ONCOLOGY-ONC/ONCCPC4.m

143 lines
7.0 KiB
Mathematica

ONCCPC4 ;HIRMFO/GWB - PCE Study of Colorectal Cancer - Table IV;2/20/97
;;2.11;ONCOLOGY;**11,15,16**;Mar 07, 1995
K ONC,TABLE,HTABLE
S TABLE("PHYSICIAN PROVIDING TREATMENT")="PPT^ONCCPC4"
S TABLE("DATE OF FIRST COURSE TREATMENT")="DOFCT^ONCCPC4"
S TABLE("DATE OF INPATIENT ADMISSION")="DOIA^ONCCPC4"
S TABLE("DATE OF INPATIENT DISCHARGE")="DOID^ONCCPC4"
S TABLE("SURGERY")="S^ONCCPC4"
S TABLE("RADIATION THERAPY")="R^ONCCPC4A"
S TABLE("CHEMOTHERAPY")="C^ONCCPC4A"
S HTABLE(1)="PHYSICIAN PROVIDING TREATMENT"
S HTABLE(2)="DATE OF FIRST COURSE TREATMENT"
S HTABLE(3)="DATE OF INPATIENT ADMISSION"
S HTABLE(4)="DATE OF INPATIENT DISCHARGE"
S HTABLE(5)="SURGERY"
S HTABLE(6)="RADIATION THERAPY"
S HTABLE(7)="CHEMOTHERAPY"
S CHOICES=7
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
S CDS=ONC(165.5,ONCONUM,58.2,"E"),RAD=ONC(165.5,ONCONUM,51.2,"I")
S CHEMO=ONC(165.5,ONCONUM,53.2,"I"),CHEMOT=ONC(165.5,ONCONUM,53.2,"E")
W @IOF D HEAD^ONCCPC0
W !?22,"TABLE IV - FIRST COURSE OF TREATMENT"
W !?22,"------------------------------------"
S DIE="^ONCO(165.5,",DA=ONCONUM
PPT S DR="762PHYSICIAN PROVIDING TREATMENT....." D ^DIE G:$D(Y) JUMP
DOFCT W !,"DATE OF FIRST COURSE TREATMENT....: ",DOFCT
DOIA S DR="1DATE OF INPATIENT ADMISSION......." D ^DIE G:$D(Y) JUMP
DOID S DR="1.1DATE OF INPATIENT DISCHARGE......." D ^DIE G:$D(Y) JUMP
S W !!,"SURGERY"
W !,"-------"
NCDSDT 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<46 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 (CDS1,CDS2)="",LOS=$L(CDS) I LOS<46 S CDS1=CDS G NCDS
S NOP=$L($E(CDS,1,46)," ")
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
SC I (CDS="")!($E(CDS,1,2)="00") D G:(Y=0)!(Y="") EXIT G R^ONCCPC4A
.W ! K DIR S DIR(0)="E" D ^DIR Q:(Y=0)!(Y="") D HEAD^ONCCPC0
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,12)=88
.W !!," ADDITIONAL SURGICAL PROCEDURES..: NA, none performed"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,13)=8
.W !," LAPAROSCOPY USED DURING SURGERY.: NA"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,14)=0
.W !," METHOD OF ANASTOMOSIS...........: Not done"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,15)=0
.W !," DIST OF ANASTOMOSIS FROM DENTATE: 0"
.S $P(^ONCO(165.5,ONCONUM,3),U,28)=8
.W !," RESIDUAL PRIMARY TUMOR..........: NA"
.W !!," OTHER SURGERY:",!
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,16)=0
.W !," COLOSTOMY.....................: No"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,17)=0
.W !," OOPHORECTOMY..................: No"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,18)=8
.W !," PATHOLOGICAL STATUS...........: NA"
.W ! K DIR S DIR(0)="E" D ^DIR Q:(Y=0)!(Y="") D HEAD^ONCCPC0
.W !," COMPLICATIONS AFTER FIRST COURSE OF TREATMENT:",!
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,19)=8
.W !," ABDOMINAL INFECTION..............: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,20)=8
.W !," ABSCESS..........................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,21)=8
.W !," ADMISSION FOR NEUTROPENIA........: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,22)=8
.W !," ANASTOMOTIC DEHISCENCE...........: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,38)=8
.W !," BLEEDING/HEMATOMA................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,23)=8
.W !," DEHYDRATION......................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,24)=8
.W !," DIARRHEA.........................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,25)=8
.W !," EARLY BOWEL OBSTRUCTION..........: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,26)=8
.W !," PERINEAL INFECTION...............: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,27)=8
.W !," PNEUMONIA........................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,28)=8
.W !," PROCTITIS........................: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,29)=8
.W !," PULMONARY EMBOLISM...............: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,30)=8
.W !," RADIATION ENTERITIS..............: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,31)=8
.W !," STOMA COMPLICATION...............: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"COL2"),U,32)=8
.W !," URINARY TRACT INFECTION..........: NA, no treatment"
.S $P(^ONCO(165.5,ONCONUM,"THY1"),U,42)=8
.K DIR S DIR(0)="E" D ^DIR Q:(Y=0)!(Y="") D HEAD^ONCCPC0
.W !!," POSTOPERATIVE DEATH W/I 30 DAYS: NA, no surgery",!
S DR="763 ADDITIONAL SURGICAL PROCEDURES.." D ^DIE G:$D(Y) JUMP
S DR="764 LAPAROSCOPY USED DURING SURGERY." D ^DIE G:$D(Y) JUMP
S DR="765 METHOD OF ANASTOMOSIS..........." D ^DIE G:$D(Y) JUMP
S DR="766 DIST OF ANASTOMOSIS FROM DENTATE" D ^DIE G:$D(Y) JUMP
S DR="59 RESIDUAL PRIMARY TUMOR.........." D ^DIE G:$D(Y) JUMP
W !!," OTHER SURGERY:",!
S DR="767 COLOSTOMY....................." D ^DIE G:$D(Y) JUMP
S DR="768 OOPHORECTOMY.................." D ^DIE G:$D(Y) JUMP
S DR="769 PATHOLOGICAL STATUS..........." D ^DIE G:$D(Y) JUMP
W !!," COMPLICATIONS AFTER FIRST COURSE OF TREATMENT:",!
S DR="770 ABDOMINAL INFECTION..........." D ^DIE G:$D(Y) JUMP
S DR="771 ABSCESS......................." D ^DIE G:$D(Y) JUMP
S DR="772 ADMISSION FOR NEUTROPENIA....." D ^DIE G:$D(Y) JUMP
S DR="773 ANASTOMOTIC DEHISCENCE........" D ^DIE G:$D(Y) JUMP
S DR="437 BLEEDING/HEMATOMA............." D ^DIE G:$D(Y) JUMP
S DR="774 DEHYDRATION..................." D ^DIE G:$D(Y) JUMP
S DR="775 DIARRHEA......................" D ^DIE G:$D(Y) JUMP
S DR="776 EARLY BOWEL OBSTRUCTION......." D ^DIE G:$D(Y) JUMP
S DR="777 PERINEAL INFECTION............" D ^DIE G:$D(Y) JUMP
S DR="778 PNEUMONIA....................." D ^DIE G:$D(Y) JUMP
S DR="779 PROCTITIS....................." D ^DIE G:$D(Y) JUMP
S DR="780 PULMONARY EMBOLISM............" D ^DIE G:$D(Y) JUMP
S DR="781 RADIATION ENTERITIS..........." D ^DIE G:$D(Y) JUMP
S DR="782 STOMA COMPLICATION............" D ^DIE G:$D(Y) JUMP
S DR="783 URINARY TRACT INFECTION......." D ^DIE G:$D(Y) JUMP
W !
S DR="441 POSTOPERATIVE DEATH W/I 30 DAYS." D ^DIE G:$D(Y) JUMP
W ! G R^ONCCPC4A
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,LOS,NCDS,NCDS1,NCDS2,NCDSDT,NOP,RAD
K RADDT,DIQ
Q