105 lines
4.4 KiB
Mathematica
105 lines
4.4 KiB
Mathematica
ONCMPC1 ;Hines OIFO/GWB - 1999 Melanoma Study ;01/07/99
|
|
;;2.11;ONCOLOGY;**22,24,26**;Mar 07, 1995
|
|
;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
|