ONCMPC1 ;Hines OIFO/GWB - 1999 Melanoma Study ;01/07/99
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;Table I
K TABLE,HTABLE
S TABLE("1. INSTITUTION ID NUMBER")="IIN"
S TABLE("2. ACCESSION NUMBER")="ACC"
S TABLE("3. SEQUENCE NUMBER")="SEQ"
S TABLE("4. POSTAL CODE AT DIAGNOSIS")="PCAD"
S TABLE("5. DATE OF BIRTH")="DOB"
S TABLE("6. RACE")="RACE"
S TABLE("7. SPANISH ORIGIN")="SO"
S TABLE("8. SEX")="SEX"
S TABLE("9. PRIMARY PAYER AT DIAGNOSIS")="PPAD"
S TABLE("10. PERSONAL HISTORY OF MELANOMA")="PHOM"
S TABLE("11. PERSONAL HISTORY OF OTHER CANCER")="PHOOC"
S TABLE("12. PREGNANCY AT INITIAL DX")="PAID"
S TABLE("13. EXOGENOUS HORMONES")="EH"
S HTABLE(1)=" 1. INSTITUTION ID NUMBER"
S HTABLE(2)=" 2. ACCESSION NUMBER"
S HTABLE(3)=" 3. SEQUENCE NUMBER"
S HTABLE(4)=" 4. POSTAL CODE AT DIAGNOSIS"
S HTABLE(5)=" 5. DATE OF BIRTH"
S HTABLE(6)=" 6. RACE"
S HTABLE(7)=" 7. SPANISH ORIGIN"
S HTABLE(8)=" 8. SEX"
S HTABLE(9)=" 9. PRIMARY PAYER AT DIAGNOSIS"
S HTABLE(10)="10. PERSONAL HISTORY OF MELANOMA"
S HTABLE(11)="11. PERSONAL HISTORY OF OTHER CANCER"
S HTABLE(12)="12. PREGNANCY AT INITIAL DX"
S HTABLE(13)="13. EXOGENOUS HORMONES"
S CHOICES=13
K DIQ S DIC="^ONCO(165.5,",DR=".04;.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^ONCMPC0
IIN W !," 1. INSTITUTION ID NUMBER........: ",$$IIN^ONCFUNC
W !!," TABLE I - GENERAL INFORMATION"
W !," -----------------------------"
ACC W !," 2. ACCESSION NUMBER.............: ",ONC(165.5,ONCONUM,.05)
SEQ W !," 3. SEQUENCE NUMBER..............: ",ONC(165.5,ONCONUM,.06)
PCAD S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="9 4. POSTAL CODE AT DIAGNOSIS....." D ^DIE G:$D(Y) JUMP
DOB W !," 5. DATE OF BIRTH................: ",DOB
RACE S DIE="^ONCO(160,",DA=ONCOPA
S DR="8 6. RACE........................." D ^DIE G:$D(Y) JUMP
SO S DIE="^ONCO(160,",DA=ONCOPA
S DR="9 7. SPANISH ORIGIN..............." D ^DIE G:$D(Y) JUMP
SEX S DIE="^ONCO(160,",DA=ONCOPA
S DR="10 8. SEX.........................." D ^DIE G:$D(Y) JUMP
PPAD S DIE="^ONCO(165.5,",DA=ONCONUM
S DR="18 9. PRIMARY PAYER AT DIAGNOSIS..." D ^DIE G:$D(Y) JUMP
S DIE="^ONCO(165.5,",DA=ONCONUM
PHOM S DR="1100 10. PERSONAL HISTORY OF MELANOMA." D ^DIE G:$D(Y) JUMP
PHOOC D FSC^ONCOMNI S FSCDEF=X,FDDDEF=FSDX
D SSC^ONCOMNI S SSCDEF=X,SDDDEF=SSDX
S DIE="^ONCO(165.5,",DA=ONCONUM
S DF=$S(X'="C88.8":"Yes",1:"No")
S DR="1101 11. PERSONAL HISTORY OF OTHER CA.//"_DF D ^DIE G:$D(Y) JUMP
I X=0 D G PAH
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,3)=67888
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,4)=8888888
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,5)=67888
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,6)=8888888
.W !!," 1ST SITE CODE...............: C88.8"
.W !," DATE DIAGNOSED..............: 88/8888"
.W !!," 2ND SITE CODE...............: C88.8"
.W !," DATE DIAGNOSED..............: 88/8888"
I X=9 D G PAH
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,3)=67999
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,4)=9999999
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,5)=67999
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,6)=9999999
.W !!," 1ST SITE CODE...............: C99.9"
.W !," DATE DIAGNOSED..............: 99/9999"
.W !!," 2ND SITE CODE...............: C99.9"
.W !," DATE DIAGNOSED..............: 99/9999"
W !
S DR="1102 1ST SITE CODE...............//"_FSCDEF D ^DIE G:$D(Y) JUMP
S DR="1103 DATE DIAGNOSED..............//"_FDDDEF D ^DIE G:$D(Y) JUMP
W !
S DR="1104 2ND SITE CODE...............//"_SSCDEF D ^DIE G:$D(Y) JUMP
S DR="1105 DATE DIAGNOSED..............//"_SDDDEF D ^DIE G:$D(Y) JUMP
PAH W !!," PREGNANCY AND HORMONES",!
I $$GET1^DIQ(160,ONCOPA,10,"I")=1 D W ! G PRTC
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,7)=8
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,8)=8
.W !," 12. PREGNANCY AT INITIAL DX......: NA, male"
.W !," 13. EXOGENOUS HORMONES...........: NA, male patient"
PAID S DR="1106 12. PREGNANCY AT INITIAL DX......" D ^DIE G:$D(Y) JUMP
EH S DR="1107 13. EXOGENOUS HORMONES..........." D ^DIE G:$D(Y) JUMP
PRTC K DIR S DIR(0)="E" D ^DIR S:$D(DIRUT) OUT="Y"
G EXIT
JUMP ;Jump to prompts
S XX="" R !!," GO TO ITEM NUMBER: ",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:X?1.2N X=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,ONC,DOB,OSP,IIN
K DIC,DR,DA,DIQ,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCMPC1 4653 printed Nov 22, 2024@17:33:46 Page 2
ONCMPC1 ;Hines OIFO/GWB - 1999 Melanoma Study ;01/07/99
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;Table I
+3 KILL TABLE,HTABLE
+4 SET TABLE("1. INSTITUTION ID NUMBER")="IIN"
+5 SET TABLE("2. ACCESSION NUMBER")="ACC"
+6 SET TABLE("3. SEQUENCE NUMBER")="SEQ"
+7 SET TABLE("4. POSTAL CODE AT DIAGNOSIS")="PCAD"
+8 SET TABLE("5. DATE OF BIRTH")="DOB"
+9 SET TABLE("6. RACE")="RACE"
+10 SET TABLE("7. SPANISH ORIGIN")="SO"
+11 SET TABLE("8. SEX")="SEX"
+12 SET TABLE("9. PRIMARY PAYER AT DIAGNOSIS")="PPAD"
+13 SET TABLE("10. PERSONAL HISTORY OF MELANOMA")="PHOM"
+14 SET TABLE("11. PERSONAL HISTORY OF OTHER CANCER")="PHOOC"
+15 SET TABLE("12. PREGNANCY AT INITIAL DX")="PAID"
+16 SET TABLE("13. EXOGENOUS HORMONES")="EH"
+17 SET HTABLE(1)=" 1. INSTITUTION ID NUMBER"
+18 SET HTABLE(2)=" 2. ACCESSION NUMBER"
+19 SET HTABLE(3)=" 3. SEQUENCE NUMBER"
+20 SET HTABLE(4)=" 4. POSTAL CODE AT DIAGNOSIS"
+21 SET HTABLE(5)=" 5. DATE OF BIRTH"
+22 SET HTABLE(6)=" 6. RACE"
+23 SET HTABLE(7)=" 7. SPANISH ORIGIN"
+24 SET HTABLE(8)=" 8. SEX"
+25 SET HTABLE(9)=" 9. PRIMARY PAYER AT DIAGNOSIS"
+26 SET HTABLE(10)="10. PERSONAL HISTORY OF MELANOMA"
+27 SET HTABLE(11)="11. PERSONAL HISTORY OF OTHER CANCER"
+28 SET HTABLE(12)="12. PREGNANCY AT INITIAL DX"
+29 SET HTABLE(13)="13. EXOGENOUS HORMONES"
+30 SET CHOICES=13
+31 KILL DIQ
SET DIC="^ONCO(165.5,"
SET DR=".04;.05;.06"
SET DA=ONCONUM
SET DIQ="ONC"
+32 DO EN^DIQ1
+33 SET D0=ONCOPA
DO DOB1^ONCOES
SET Y=X
DO DATEOT^ONCOPCE
SET DOB=Y
+34 WRITE @IOF
DO HEAD^ONCMPC0
IIN WRITE !," 1. INSTITUTION ID NUMBER........: ",$$IIN^ONCFUNC
+1 WRITE !!," TABLE I - GENERAL INFORMATION"
+2 WRITE !," -----------------------------"
ACC WRITE !," 2. ACCESSION NUMBER.............: ",ONC(165.5,ONCONUM,.05)
SEQ WRITE !," 3. SEQUENCE NUMBER..............: ",ONC(165.5,ONCONUM,.06)
PCAD SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="9 4. POSTAL CODE AT DIAGNOSIS....."
DO ^DIE
if $DATA(Y)
GOTO JUMP
DOB WRITE !," 5. DATE OF BIRTH................: ",DOB
RACE SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="8 6. RACE........................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
SO SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="9 7. SPANISH ORIGIN..............."
DO ^DIE
if $DATA(Y)
GOTO JUMP
SEX SET DIE="^ONCO(160,"
SET DA=ONCOPA
+1 SET DR="10 8. SEX.........................."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PPAD SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+1 SET DR="18 9. PRIMARY PAYER AT DIAGNOSIS..."
DO ^DIE
if $DATA(Y)
GOTO JUMP
+2 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
PHOM SET DR="1100 10. PERSONAL HISTORY OF MELANOMA."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PHOOC DO FSC^ONCOMNI
SET FSCDEF=X
SET FDDDEF=FSDX
+1 DO SSC^ONCOMNI
SET SSCDEF=X
SET SDDDEF=SSDX
+2 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+3 SET DF=$SELECT(X'="C88.8":"Yes",1:"No")
+4 SET DR="1101 11. PERSONAL HISTORY OF OTHER CA.//"_DF
DO ^DIE
if $DATA(Y)
GOTO JUMP
+5 IF X=0
Begin DoDot:1
+6 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,3)=67888
+7 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,4)=8888888
+8 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,5)=67888
+9 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,6)=8888888
+10 WRITE !!," 1ST SITE CODE...............: C88.8"
+11 WRITE !," DATE DIAGNOSED..............: 88/8888"
+12 WRITE !!," 2ND SITE CODE...............: C88.8"
+13 WRITE !," DATE DIAGNOSED..............: 88/8888"
End DoDot:1
GOTO PAH
+14 IF X=9
Begin DoDot:1
+15 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,3)=67999
+16 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,4)=9999999
+17 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,5)=67999
+18 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,6)=9999999
+19 WRITE !!," 1ST SITE CODE...............: C99.9"
+20 WRITE !," DATE DIAGNOSED..............: 99/9999"
+21 WRITE !!," 2ND SITE CODE...............: C99.9"
+22 WRITE !," DATE DIAGNOSED..............: 99/9999"
End DoDot:1
GOTO PAH
+23 WRITE !
+24 SET DR="1102 1ST SITE CODE...............//"_FSCDEF
DO ^DIE
if $DATA(Y)
GOTO JUMP
+25 SET DR="1103 DATE DIAGNOSED..............//"_FDDDEF
DO ^DIE
if $DATA(Y)
GOTO JUMP
+26 WRITE !
+27 SET DR="1104 2ND SITE CODE...............//"_SSCDEF
DO ^DIE
if $DATA(Y)
GOTO JUMP
+28 SET DR="1105 DATE DIAGNOSED..............//"_SDDDEF
DO ^DIE
if $DATA(Y)
GOTO JUMP
PAH WRITE !!," PREGNANCY AND HORMONES",!
+1 IF $$GET1^DIQ(160,ONCOPA,10,"I")=1
Begin DoDot:1
+2 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,7)=8
+3 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,8)=8
+4 WRITE !," 12. PREGNANCY AT INITIAL DX......: NA, male"
+5 WRITE !," 13. EXOGENOUS HORMONES...........: NA, male patient"
End DoDot:1
WRITE !
GOTO PRTC
PAID SET DR="1106 12. PREGNANCY AT INITIAL DX......"
DO ^DIE
if $DATA(Y)
GOTO JUMP
EH SET DR="1107 13. EXOGENOUS HORMONES..........."
DO ^DIE
if $DATA(Y)
GOTO JUMP
PRTC KILL DIR
SET DIR(0)="E"
DO ^DIR
if $DATA(DIRUT)
SET OUT="Y"
+1 GOTO EXIT
JUMP ;Jump to prompts
+1 SET XX=""
READ !!," GO TO ITEM NUMBER: ",X:DTIME
+2 IF (X="")!(X[U)
SET OUT="Y"
GOTO EXIT
+3 IF X["?"
Begin DoDot:1
+4 WRITE !," CHOOSE FROM:"
FOR I=1:1:CHOICES
WRITE !,?5,HTABLE(I)
End DoDot:1
GOTO JUMP
+5 IF '$DATA(TABLE(X))
if X?1.2N
SET X=X_"."
SET XX=X
SET X=$ORDER(TABLE(X))
IF ($PIECE(X,XX,1)'="")!(X="")
WRITE *7,"??"
Begin DoDot:1
+6 WRITE !," CHOOSE FROM:"
FOR I=1:1:CHOICES
WRITE !,?5,HTABLE(I)
End DoDot:1
GOTO JUMP
+7 SET X=TABLE(X)
+8 GOTO @X
EXIT KILL HTABLE,TABLE,CHOICES,ONC,DOB,OSP,IIN
+1 KILL DIC,DR,DA,DIQ,DIE,DIR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
+2 QUIT