ONCCPC1 ;Hines OIFO/GWB - PCE Study of Colorectal Cancer ;05/30/00
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;Table I
K TABLE,HTABLE
S TABLE("ACCESSION NUMBER")="AN"
S TABLE("SEQUENCE NUMBER")="SN"
S TABLE("POSTAL CODE AT DIAGNOSIS")="PCAD"
S TABLE("DATE OF BIRTH")="DOB"
S TABLE("RACE")="R"
S TABLE("SPANISH ORIGIN")="SO"
S TABLE("SEX")="S"
S TABLE("PRIMARY PAYER AT DIAGNOSIS")="PPAD"
S TABLE("FAMILY HISTORY OF COLORECTAL CANCER")="FHOCC"
S TABLE("PERSONAL HISTORY OF COLORECTAL CANCER")="PHOCC"
S TABLE("MULTIPLE COLON/RECTUM PRIMARIES 1997")="MPWCR"
S TABLE("PERSONAL HISTORY OF NON-COLORECTAL CANCER")="PHONC"
S TABLE("PREVIOUS TAH/BSO")="PTAHBSO"
S TABLE("OTHER PRIOR CONDITIONS")="OPC"
S HTABLE(1)="ACCESSION NUMBER"
S HTABLE(2)="SEQUENCE NUMBER"
S HTABLE(3)="POSTAL CODE AT DIAGNOSIS"
S HTABLE(4)="DATE OF BIRTH"
S HTABLE(5)="RACE"
S HTABLE(6)="SPANISH ORIGIN"
S HTABLE(7)="SEX"
S HTABLE(8)="PRIMARY PAYER AT DIAGNOSIS"
S HTABLE(9)="FAMILY HISTORY OF COLORECTAL CANCER"
S HTABLE(10)="PERSONAL HISTORY OF COLORECTAL CANCER"
S HTABLE(11)="MULTIPLE COLON/RECTUM PRIMARIES 1997"
S HTABLE(12)="PERSONAL HISTORY OF NON-COLORECTAL CANCER"
S HTABLE(13)="PREVIOUS TAH/BSO"
S HTABLE(14)="OTHER PRIOR CONDITIONS"
S CHOICES=14
K DIQ S DIC="^ONCO(165.5,",DR=".05;.06",DA=ONCONUM,DIQ="ONC" D EN^DIQ1
S D0=ONCOPA D DOB1^ONCOES S Y=X D DATEOT^ONCOPCE S DOB=Y
W @IOF D HEAD^ONCCPC0
W !?25,"TABLE I - GENERAL INFORMATION"
W !?25,"-----------------------------"
AN W !,"ACCESSION NUMBER.....................: ",ONC(165.5,ONCONUM,.05)
SN W !,"SEQUENCE NUMBER......................: ",ONC(165.5,ONCONUM,.06)
PCAD S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="9POSTAL CODE AT DIAGNOSIS............." D ^DIE G:$D(Y) JUMP
DOB W !,"DATE OF BIRTH........................: ",DOB
R S DIE="^ONCO(160,",DA=ONCOPA
S DR="8RACE................................." D ^DIE G:$D(Y) JUMP
SO S DIE="^ONCO(160,",DA=ONCOPA
S DR="9SPANISH ORIGIN......................." D ^DIE G:$D(Y) JUMP
S S DIE="^ONCO(160,",DA=ONCOPA
S DR="10SEX.................................." D ^DIE G:$D(Y) JUMP
PPAD S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="18PRIMARY PAYER AT DIAGNOSIS..........." D ^DIE G:$D(Y) JUMP
FHOCC S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="700FAMILY HISTORY OF COLORECTAL CANCER.." D ^DIE G:$D(Y) JUMP
PHOCC S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="701PERSONAL HISTORY OF COLORECTAL CANCER" D ^DIE G:$D(Y) JUMP
MPWCR S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="702MULTIPLE COLON/RECTUM PRIMARIES 1997." D ^DIE G:$D(Y) JUMP
PHONC W !!,"PERSONAL HISTORY OF NON-COLORECTAL CANCER:",!
S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="703 BREAST............................." D ^DIE G:$D(Y) JUMP
S DR="302 CERVIX............................." D ^DIE G:$D(Y) JUMP
S DR="704 LUNG..............................." D ^DIE G:$D(Y) JUMP
S DR="705 OVARY.............................." D ^DIE G:$D(Y) JUMP
S DR="706 OVARIAN CARCINOMA, PERITONEAL SITE." D ^DIE G:$D(Y) JUMP
S DR="307 PROSTATE..........................." D ^DIE G:$D(Y) JUMP
S DR="707 STOMACH............................" D ^DIE G:$D(Y) JUMP
S DR="708 THYROID............................" D ^DIE G:$D(Y) JUMP
S DR="709 UTERUS............................." D ^DIE G:$D(Y) JUMP
S DR="308 OTHER.............................." D ^DIE G:$D(Y) JUMP
W !
PTAHBSO S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="710PREVIOUS TAH/BSO....................." D ^DIE G:$D(Y) JUMP
OPC W !!,"OTHER PRIOR CONDITIONS:",!
S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="711 FAP................................" D ^DIE G:$D(Y) JUMP
S DR="712 HNPCC.............................." D ^DIE G:$D(Y) JUMP
S DR="713 IBD................................" D ^DIE G:$D(Y) JUMP
S DR="714 PRIOR POLYPS......................." D ^DIE G:$D(Y) JUMP
S DR="715 POLYPS............................." 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 HTABLE,TABLE,CHOICES
K DOB
K DA,DR,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,XX,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCCPC1 4360 printed Dec 13, 2024@02:22:28 Page 2
ONCCPC1 ;Hines OIFO/GWB - PCE Study of Colorectal Cancer ;05/30/00
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;Table I
+3 KILL TABLE,HTABLE
+4 SET TABLE("ACCESSION NUMBER")="AN"
+5 SET TABLE("SEQUENCE NUMBER")="SN"
+6 SET TABLE("POSTAL CODE AT DIAGNOSIS")="PCAD"
+7 SET TABLE("DATE OF BIRTH")="DOB"
+8 SET TABLE("RACE")="R"
+9 SET TABLE("SPANISH ORIGIN")="SO"
+10 SET TABLE("SEX")="S"
+11 SET TABLE("PRIMARY PAYER AT DIAGNOSIS")="PPAD"
+12 SET TABLE("FAMILY HISTORY OF COLORECTAL CANCER")="FHOCC"
+13 SET TABLE("PERSONAL HISTORY OF COLORECTAL CANCER")="PHOCC"
+14 SET TABLE("MULTIPLE COLON/RECTUM PRIMARIES 1997")="MPWCR"
+15 SET TABLE("PERSONAL HISTORY OF NON-COLORECTAL CANCER")="PHONC"
+16 SET TABLE("PREVIOUS TAH/BSO")="PTAHBSO"
+17 SET TABLE("OTHER PRIOR CONDITIONS")="OPC"
+18 SET HTABLE(1)="ACCESSION NUMBER"
+19 SET HTABLE(2)="SEQUENCE NUMBER"
+20 SET HTABLE(3)="POSTAL CODE AT DIAGNOSIS"
+21 SET HTABLE(4)="DATE OF BIRTH"
+22 SET HTABLE(5)="RACE"
+23 SET HTABLE(6)="SPANISH ORIGIN"
+24 SET HTABLE(7)="SEX"
+25 SET HTABLE(8)="PRIMARY PAYER AT DIAGNOSIS"
+26 SET HTABLE(9)="FAMILY HISTORY OF COLORECTAL CANCER"
+27 SET HTABLE(10)="PERSONAL HISTORY OF COLORECTAL CANCER"
+28 SET HTABLE(11)="MULTIPLE COLON/RECTUM PRIMARIES 1997"
+29 SET HTABLE(12)="PERSONAL HISTORY OF NON-COLORECTAL CANCER"
+30 SET HTABLE(13)="PREVIOUS TAH/BSO"
+31 SET HTABLE(14)="OTHER PRIOR CONDITIONS"
+32 SET CHOICES=14
+33 KILL DIQ
SET DIC="^ONCO(165.5,"
SET DR=".05;.06"
SET DA=ONCONUM
SET DIQ="ONC"
DO EN^DIQ1
+34 SET D0=ONCOPA
DO DOB1^ONCOES
SET Y=X
DO DATEOT^ONCOPCE
SET DOB=Y
+35 WRITE @IOF
DO HEAD^ONCCPC0
+36 WRITE !?25,"TABLE I - GENERAL INFORMATION"
+37 WRITE !?25,"-----------------------------"
AN WRITE !,"ACCESSION NUMBER.....................: ",ONC(165.5,ONCONUM,.05)
SN WRITE !,"SEQUENCE NUMBER......................: ",ONC(165.5,ONCONUM,.06)
PCAD SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="9POSTAL CODE AT DIAGNOSIS............."
DO ^DIE
if $DATA(Y)
GOTO JUMP
DOB WRITE !,"DATE OF BIRTH........................: ",DOB
R SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="8RACE................................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
SO SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="9SPANISH ORIGIN......................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
S SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="10SEX.................................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PPAD SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="18PRIMARY PAYER AT DIAGNOSIS..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
FHOCC SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="700FAMILY HISTORY OF COLORECTAL CANCER.."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PHOCC SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="701PERSONAL HISTORY OF COLORECTAL CANCER"
DO ^DIE
if $DATA(Y)
GOTO JUMP
MPWCR SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="702MULTIPLE COLON/RECTUM PRIMARIES 1997."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PHONC WRITE !!,"PERSONAL HISTORY OF NON-COLORECTAL CANCER:",!
+1 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+2 SET DR="703 BREAST............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+3 SET DR="302 CERVIX............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+4 SET DR="704 LUNG..............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+5 SET DR="705 OVARY.............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+6 SET DR="706 OVARIAN CARCINOMA, PERITONEAL SITE."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+7 SET DR="307 PROSTATE..........................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+8 SET DR="707 STOMACH............................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+9 SET DR="708 THYROID............................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+10 SET DR="709 UTERUS............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+11 SET DR="308 OTHER.............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+12 WRITE !
PTAHBSO SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="710PREVIOUS TAH/BSO....................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
OPC WRITE !!,"OTHER PRIOR CONDITIONS:",!
+1 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+2 SET DR="711 FAP................................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+3 SET DR="712 HNPCC.............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+4 SET DR="713 IBD................................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
+5 SET DR="714 PRIOR POLYPS......................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+6 SET DR="715 POLYPS............................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+7 WRITE !
KILL DIR
SET DIR(0)="E"
DO ^DIR
+8 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 HTABLE,TABLE,CHOICES
+1 KILL DOB
+2 KILL DA,DR,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,XX,Y
+3 QUIT