ONCMPC2 ;HINES CIOFO/GWB - 1999 Melanoma Study - Table II ;1/12/99
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
K TABLE,HTABLE
S TABLE("14. CLASS OF CASE")="COC"
S TABLE("15. DATE OF INITIAL DIAGNOSIS")="DOID"
S TABLE("16. PRIMARY SITE (ICD-O-2)")="PS"
S TABLE("17. LOCATION OF DISEASE PRESENTATION")="LODP"
S TABLE("18. LATERALITY")="L"
S TABLE("19. HISTOLOGY (ICD-O-2)")="HIST"
S TABLE("20. BEHAVIOR CODE(ICD-O-2)")="BC"
S TABLE("21. GRADE")="GRADE"
S TABLE("22. DIAGNOSTIC CONFIRMATION")="DC"
S HTABLE(1)="14. CLASS OF CASE"
S HTABLE(2)="15. DATE OF INITIAL DIAGNOSIS"
S HTABLE(3)="16. PRIMARY SITE (ICD-O-2)"
S HTABLE(4)="17. LOCATION OF DISEASE PRESENTATION"
S HTABLE(5)="18. LATERALITY"
S HTABLE(6)="19. HISTOLOGY (ICD-O-2)"
S HTABLE(7)="20. BEHAVIOR CODE (ICD-O-2)"
S HTABLE(8)="21. GRADE"
S HTABLE(9)="22. DIAGNOSTIC CONFIRMATION"
S CHOICES=9
K DIQ
S DIC="^ONCO(165.5,",DR=".04;20;22;28",DA=ONCONUM,DIQ="ONC",DIQ(0)="IE"
D EN^DIQ1
S DIE="^ONCO(165.5,",DA=ONCONUM
S TOP=$P($G(^ONCO(165.5,D0,2)),U,1),TOPCOD=""
I TOP'="" S TOPCOD=$P(^ONCO(164,TOP,0),U,2)
W @IOF D HEAD^ONCMPC0
W !," TABLE II - INITIAL DIAGNOSIS"
W !," ----------------------------"
COC W !," 14. CLASS OF CASE................: ",ONC(165.5,ONCONUM,.04,"E")
DOID S DOID=$E(DATEDX,4,5)_"/"_$E(DATEDX,6,7)_"/"_(1700+$E(DATEDX,1,3))
W !," 15. DATE OF INITIAL DIAGNOSIS....: ",DOID
PS W !," 16. PRIMARY SITE (ICD-O-2).......: ",TOPCOD
LODP I TOPCOD'="C44.9" D G L
.S $P(^ONCO(165.5,ONCONUM,"MEL1"),U,9)=8
.W !," 17. LOC OF DISEASE PRESENTATION..: NA, primary site known"
S DR="1108 17. LOC OF DISEASE PRESENTATION.." D ^DIE G:$D(Y) JUMP
L W !," 18. LATERALITY...................: ",ONC(165.5,ONCONUM,28,"E")
HIST W !," 19. HISTOLOGY (ICD-O-2)..........: ",$E(ONC(165.5,ONCONUM,22,"I"),1,4)," ",ONC(165.5,ONCONUM,22,"E")
BC W !," 20. BEHAVIOR CODE (ICD-O-2)......: ",$E(ONC(165.5,ONCONUM,22,"I"),5)
GRADE S DR="24 21. GRADE........................" D ^DIE G:$D(Y) JUMP
DC S DR="26 22. DIAGNOSTIC CONFIRMATION......" D ^DIE G:$D(Y) JUMP
PRTC W ! 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 CHOICES,HTABLE,TABLE
K DOID,NCDS,CDS,PP,LP,GS,PIECE
K DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCMPC2 2617 printed Nov 22, 2024@17:33:47 Page 2
ONCMPC2 ;HINES CIOFO/GWB - 1999 Melanoma Study - Table II ;1/12/99
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 KILL TABLE,HTABLE
+3 SET TABLE("14. CLASS OF CASE")="COC"
+4 SET TABLE("15. DATE OF INITIAL DIAGNOSIS")="DOID"
+5 SET TABLE("16. PRIMARY SITE (ICD-O-2)")="PS"
+6 SET TABLE("17. LOCATION OF DISEASE PRESENTATION")="LODP"
+7 SET TABLE("18. LATERALITY")="L"
+8 SET TABLE("19. HISTOLOGY (ICD-O-2)")="HIST"
+9 SET TABLE("20. BEHAVIOR CODE(ICD-O-2)")="BC"
+10 SET TABLE("21. GRADE")="GRADE"
+11 SET TABLE("22. DIAGNOSTIC CONFIRMATION")="DC"
+12 SET HTABLE(1)="14. CLASS OF CASE"
+13 SET HTABLE(2)="15. DATE OF INITIAL DIAGNOSIS"
+14 SET HTABLE(3)="16. PRIMARY SITE (ICD-O-2)"
+15 SET HTABLE(4)="17. LOCATION OF DISEASE PRESENTATION"
+16 SET HTABLE(5)="18. LATERALITY"
+17 SET HTABLE(6)="19. HISTOLOGY (ICD-O-2)"
+18 SET HTABLE(7)="20. BEHAVIOR CODE (ICD-O-2)"
+19 SET HTABLE(8)="21. GRADE"
+20 SET HTABLE(9)="22. DIAGNOSTIC CONFIRMATION"
+21 SET CHOICES=9
+22 KILL DIQ
+23 SET DIC="^ONCO(165.5,"
SET DR=".04;20;22;28"
SET DA=ONCONUM
SET DIQ="ONC"
SET DIQ(0)="IE"
+24 DO EN^DIQ1
+25 SET DIE="^ONCO(165.5,"
SET DA=ONCONUM
+26 SET TOP=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
SET TOPCOD=""
+27 IF TOP'=""
SET TOPCOD=$PIECE(^ONCO(164,TOP,0),U,2)
+28 WRITE @IOF
DO HEAD^ONCMPC0
+29 WRITE !," TABLE II - INITIAL DIAGNOSIS"
+30 WRITE !," ----------------------------"
COC WRITE !," 14. CLASS OF CASE................: ",ONC(165.5,ONCONUM,.04,"E")
DOID SET DOID=$EXTRACT(DATEDX,4,5)_"/"_$EXTRACT(DATEDX,6,7)_"/"_(1700+$EXTRACT(DATEDX,1,3))
+1 WRITE !," 15. DATE OF INITIAL DIAGNOSIS....: ",DOID
PS WRITE !," 16. PRIMARY SITE (ICD-O-2).......: ",TOPCOD
LODP IF TOPCOD'="C44.9"
Begin DoDot:1
+1 SET $PIECE(^ONCO(165.5,ONCONUM,"MEL1"),U,9)=8
+2 WRITE !," 17. LOC OF DISEASE PRESENTATION..: NA, primary site known"
End DoDot:1
GOTO L
+3 SET DR="1108 17. LOC OF DISEASE PRESENTATION.."
DO ^DIE
if $DATA(Y)
GOTO JUMP
L WRITE !," 18. LATERALITY...................: ",ONC(165.5,ONCONUM,28,"E")
HIST WRITE !," 19. HISTOLOGY (ICD-O-2)..........: ",$EXTRACT(ONC(165.5,ONCONUM,22,"I"),1,4)," ",ONC(165.5,ONCONUM,22,"E")
BC WRITE !," 20. BEHAVIOR CODE (ICD-O-2)......: ",$EXTRACT(ONC(165.5,ONCONUM,22,"I"),5)
GRADE SET DR="24 21. GRADE........................"
DO ^DIE
if $DATA(Y)
GOTO JUMP
DC SET DR="26 22. DIAGNOSTIC CONFIRMATION......"
DO ^DIE
if $DATA(Y)
GOTO JUMP
PRTC WRITE !
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
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))
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
+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 CHOICES,HTABLE,TABLE
+1 KILL DOID,NCDS,CDS,PP,LP,GS,PIECE
+2 KILL DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
+3 QUIT