Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ONCMPC2

ONCMPC2.m

Go to the documentation of this file.
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