ONCOTN ;Hines OIFO/GWB - TNM Staging ;02/28/11
;;2.2;ONCOLOGY;**1,4,5,6**;Jul 31, 2013;Build 10
;
N DATEDX,H,ONCED,S,YR
S DATEDX=$P(^ONCO(165.5,D0,0),U,16)
S YR=$E(DATEDX,1,3)
S ONCED=$S(YR<283:1,YR<288:2,YR<292:3,YR<298:4,YR<303:5,YR<310:6,1:7)
S S=$P(^ONCO(165.5,D0,0),U,1)
S T=$P($G(^ONCO(165.5,D0,2)),U,1)
I T="" W !!?5,"PRIMARY SITE not defined.",! S Y=20 Q
S H=$$HIST^ONCFUNC(D0)
S HT14=$E(H,1,4)
S SD=$P($G(^ONCO(165.5,D0,"CS3")),U,1)
I H="" W !!?5,"HISTOLOGY not defined.",! S Y=$S(DATEDX>3001231:22.3,1:22) Q
S Y="@69"
;
;Dermatofibrosarcomas of the skin
I (HT14=8832)!(HT14=8833),($E(T,3,4)=44) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for dermatofibrosarcomas of the skin.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Laryngeal cartilage C32.3 - 7th Edition
;Removed from 7th Edition Larynx chapter 5
I ONCED>6,T=67323 D Q
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
7 ;Major Salivary Glands - 7th Edition
I ONCED>6,($E(T,3,4)="07")!($E(T,3,4)="08"),(HT14<8000)!((HT14>8576)&(HT14<8940))!((HT14>8950)&(HT14<8980))!(HT14>8981) D Q
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
8 ;Mycosis fungoides and Sezary Disease of Skin, Vulva, Penis, Scrotum
I (H=97003)!(H=97013),($E(T,3,4)=44)!($E(T,3,4)=51)!($E(T,3,4)=60)!(T=67632),ONCED>5 Q
;
I (S=62)!($$LYMPHOMA^ONCFUNC(D0)) D Q
.I ONCED>6,(T=67441)!(T=67690)!(T=67695)!(T=67696) Q
.W !!?3,"No TNM classification is available for Lymphoid Neoplasms.",!
.;D CTNM88,PTNM88 ;changed to call these from within the input template
.S Y="@376"
;
I (T=67301)!(T=67339)!(T=67379)!($E(T,1,4)=6739)!(T=67630)!(T=67631)!(T=67637)!(T=67638)!(T=67639)!(T=67691)!(T=67750)!(T=67754)!(T=67755)!(T=67758)!(T=67759)!($E(T,1,4)=6776)!($E(T,1,4)=6726) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I $E(T,1,4)=6774,ONCED<7 D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I (T=67248)!(T=67249),ONCED>6 D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I T=67695,SD="020",ONCED>6 D S Y="@313" Q
.W !!?3,"AJCC does not define staging for lacrimal sac.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I (T=67254)!(T=67312)!(T=67313)!(T=67318)!(T=67319) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I ONCED=6,$$MELANOMA^ONCOU55(D0),($E(T,3,4)=44)!($E(T,3,4)=51)!($E(T,3,4)=60)!(T=67632),(H=87233)!(H=87283)!(H=87303)!(H=87403)!(H=87412)!(H=87413)!(H=87463)!(H=87703)!(H=87733)!(H=87743)!(H=87422) D S Y="@313" Q
.W !!?1,"Histology ",$E(H,1,4)_"/"_$E(H,5)," is not appropriate for or relevant to the staging of melanoma.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I (ONCED<7),((H<8020)!(H>8090)),(T=67140)!(T=67142)!(T=67148) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I (T=67250)!($E(T,1,4)=6715)!($E(T,1,4)=6716)!($E(T,1,4)=6717)!($E(T,1,4)=6718),$E(H,1,4)=8936,ONCED=6 D S Y="@313" Q
.W !!," No TNM coding/staging available for GASTROINTESTINAL STROMA of ",$S($E(T,1,4)=6715:"ESOPHAGUS",$E(T,1,4)=6716:"STOMACH",$E(T,1,4)=6717:"SMALL INTESTINE",$E(T,1,4)=6718:"COLON",T=67250:"PANCREAS, HEAD",1:""),".",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Carcinoid Tumors
I ($E(T,3,4)=16)!($E(T,3,4)=17)!($E(T,3,4)=18)!(T=67199)!(T=67209)!($E(T,3,4)=21)!(T=67239)!($E(T,3,4)=24)!($E(T,3,4)=25),($E(H,1,4)=8249)!($E(H,1,4)=9091) D Q
.I ONCED>6,($E(T,3,4)=16)!($E(T,3,4)=17)!(T=67180)!(T=67181)!(T=67182)!(T=67183)!(T=67184)!(T=67185)!(T=67186)!(T=67187)!(T=67188)!(T=67189)!(T=67199)!(T=67209)!(T=67241) Q
.W !!?3,"No TNM coding/staging is available for carcinoid tumors" D
..I ($E(T,3,4)=16)!($E(T,3,4)=17)!($E(T,3,4)=18)!($E(T,3,4)=21)!(T=67239)!($E(T,3,4)=24)!(T=67241)!($E(T,3,4)=25) W !?3,"of the ",$P($G(^ONCO(164,T,0)),U,1),"."
..W !
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
.S Y="@313"
;
I $E(T,1,4)=6734 D ^ONCLNG,^ONCLNG1 I $D(ONCLUNG(H)) D S Y="@313" Q
.W !!?3,"No TNM coding/staging available for sarcomas and rare tumors of the lung.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
.K ONCLUNG
K ONCLUNG
;
;I (T=67380)!(T=67381)!(T=67382)!(T=67383)!(T=67388)!($E(T,1,4)=6747)!($E(T,1,4)=6748)!($E(T,1,4)=6749),(H=91203)!(H=89903) D S Y="@313" Q
;.W !!?3,"No TNM coding/staging available for angiosarcoma or malignant mesenchymoma.",! D ;removed these in p5
;.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I $E(T,1,4)=6748,H=90503 D S Y="@313" Q
.W !!?3,"No TNM coding/staging available for malignant peritoneal mesothelioma.",! D
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;I (T=67300)!(T=67310)!(T=67311),(H=95223) D S Y="@313" Q
;.W !!," No TNM coding available for OLFACTORY NEUROMBLASTOMA of ",$S(T=67300:"NASAL CAVITY",T=67310:"SINUS, MAXILLARY",T=67311:"SINUS ETHMOID",1:""),".",!
;.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Fallopian Tube (C57.0)
;Other/unspecified female genitalia (C57.1-C57.9)
I ((T=67570)&(ONCED<5))!(($E(T,1,4)=6757)&(T'=67570)) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Paraurethral gland (C68.1)
;Overlapping lesion of urinary organs (C68.8)
;Urinary system, NOS (C68.9)
I ONCED>5,((T=67681)!(T=67688)!(T=67689)) D S Y="@313" Q
.W !!?3,"AJCC does not define staging for this site.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Melanoma of the Eyelid
I ONCED<5,T=67441,$$MELANOMA^ONCOU55(D0) D S Y=37.2 Q
.W !!?3,"No classification is recommended at present.",!
.S $P(^ONCO(165.5,D0,2),U,25)=88
.W !,"CLINICAL T: T88 NA"
;
;Brain and Spinal Cord
I ONCED>4,(T=67700)!(T=67701)!(T=67709)!(T=67751)!(T=67752)!(T=67753)!($E(T,3,4)=71)!($E(T,3,4)=72) D S Y="@313" Q
.W !!?3,"Central Nervous System Tumors have no TNM designation.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
;Kaposi's sarcoma
I H=91403 D S Y="@313" Q
.W !!?3,"No TNM classification or staging is available for Kaposi's sarcoma.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
;
I $P(^ONCO(164,T,0),U,11)="" D S Y="@313" Q
.W !!?3,"No stage grouping is presently recommended.",!
.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
Q
;
CN2 ;GTT - clinical
S T=$P($G(^ONCO(165.5,D0,2)),U,1)
I T=67589 D S Y=37.3 Q
.W !!," Regional lymph node (N) classification does not apply to these tumors.",!
.S $P(^ONCO(165.5,D0,2),U,26)=""
.W !,"CLINICAL N:"
Q
;
CN4 ;GTT - pathologic
S T=$P($G(^ONCO(165.5,D0,2)),U,1)
I T=67589 D S Y=87 Q
.W !!," Regional lymph node (N) classification does not apply to these tumors.",!
.S $P(^ONCO(165.5,D0,2.1),U,2)=""
.W !,"PATHOLOGIC N:"
Q
;
CN5 ;GTT - other
S T=$P($G(^ONCO(165.5,D0,2)),U,1)
I T=67589 D S Y=99 Q
.W !!," Regional lymph node (N) classification does not apply to these tumors.",!
.S $P(^ONCO(165.5,D0,2.1),U,7)=""
.W !,"OTHER N:"
Q
;
RECN ;GTT - Subsequent Recurrences - other
S T=$P($G(^ONCO(165.5,D0,2)),U,1)
I T=67589 D S Y=3 Q
.W !!," Regional lymph node (N) classification does not apply to these tumors.",!
.S $P(^ONCO(165.5,D0,23,D1,0),U,8)=""
.W !,"OTHER N:"
Q
;
ES ;Automatic Staging
N CM,G,HT,HT14,N,M,SD,SP,STGTYP,T,TX,XX,XXX,YR
S YR=$E($P($G(^ONCO(165.5,D0,0)),U,16),1,3)
S ONCED=$S(YR<283:1,YR<288:2,YR<292:3,YR<298:4,YR<303:5,YR<310:6,1:7)
I ONCED<3 D Q
.W !!,"DATE DX prior to 1988. Automatic staging unavailable.",!
S STGTYP=$S(STGIND="C":"CLINICAL",STGIND="P":"PATHOLOGIC",STGIND="O":"OTHER",STGIND="R":"RECURRENCE",1:"")
S XX=$G(^ONCO(165.5,D0,2))
G EX:XX=""
S ST=$P(^ONCO(165.5,D0,0),U,1)
S G=$P(^ONCO(165.5,D0,2),U,5)
S TX=$P(^ONCO(165.5,D0,2),U,1)
S HT=$$HIST^ONCFUNC(D0)
S SP=$P($G(^ONCO(164,+TX,0)),U,11)
S SD=$P($G(^ONCO(165.5,D0,"CS3")),U,1)
I STGIND="C" D
.S XXX=$G(^ONCO(165.5,D0,2))
.S T=$P(XXX,U,25)
.S N=$P(XXX,U,26)
.S M=$P(XXX,U,27)
I STGIND="P" D
.S XXX=$G(^ONCO(165.5,D0,2.1))
.S T=$P(XXX,U,1)
.S N=$P(XXX,U,2)
.S M=$P(XXX,U,3)
.S CM=$P($G(^ONCO(165.5,D0,2)),U,27)
.I (T'="X")!(N'="X"),$E(M,1)'=1,CM'="X" D
..S M=CM
..W !!?12,"CLINICAL M will be used to calculate PATHOLOGIC STAGE GROUPING."
I STGIND="O" D
.S XXX=$G(^ONCO(165.5,D0,2.1))
.S T=$P(XXX,U,6)
.S N=$P(XXX,U,7)
.S M=$P(XXX,U,8)
I STGIND="R" D
.S XXX=$G(^ONCO(165.5,D0,23,DA,0))
.S T=$P(XXX,U,6)
.S N=$P(XXX,U,7)
.S M=$P(XXX,U,8)
I T="" D G SG
.W !!?3,"No ",STGTYP," T category has been assigned."
.S SG=99
I N="",ST'=58,'$$GTT^ONCOU55(D0) D G SG
.W !!?3,"No ",STGTYP," N category has been assigned."
.S SG=99
I M="",'$$OCULAR D G SG
.W !?3,"No ",STGTYP," M category has been assigned."
.S SG=99
;
;Gastrointestinal Stromal Tumor (Gist) 8935-8936
I ($E(HT,1,4)=8935)!($E(HT,1,4)=8936),(($E(TX,3,4)=15)!($E(TX,3,4)=16)!($E(TX,3,4)=17)!($E(TX,3,4)=18)!($E(TX,3,4)=21)!($E(TX,3,4)=48)!(TX=67199)!(TX=67209)),ONCED>6 S AG="121" G AG
;
;Neuroendocrine Tumor 8153, 8240-8242, 8246, 8249
I ONCED>6,(($E(HT,1,4)=8153)!($E(HT,1,4)=8240)!($E(HT,1,4)=8241)!($E(HT,1,4)=8242)!($E(HT,1,4)=8246)!($E(HT,1,4)=8249)),(($E(TX,3,4)=16)!($E(TX,3,4)=17)!($E(TX,3,4)=18)!(TX=67241)!(TX=67199)!(TX=67209)) S AG=122 G AG
;
;Esophagus/GE Junction C16.0-C16.2
I TX=67160,ONCED>6 S AG="9" G AG
I TX=67161!(TX=67162),ONCED>6,SD="010"!(SD="020")!(SD="040")!(SD="060") S AG="9" G AG
;
;Gallbladder
;Distal Bile Duct
I TX=67240,ONCED>6,(SD="040")!(SD="070") S AG=63 G AG
I TX=67240,ONCED>6,SD="030" S AG=14 G AG
;
;Melanoma of the Eyelid (C44.1)
I TX=67441,ONCED<5,$$MELANOMA^ONCOU55(D0) S AG=37 G AG
;
;Melanoma of the Skin
I $$MELANOMA^ONCOU55(D0),$P($G(^ONCO(164,+TX,0)),U,15) S AG=22 G AG
;
;Merkel Cell Carcinoma
I $E(HT,1,4)=8247,ONCED>6 S AG=21 G AG
;
;Ovary and Primary Peritoneal Carcinoma - 7th edition
S HT14=$E(HT,1,4)
I ONCED>6,(TX=67481)!(TX=67482)!(TX=67488),(HT14>7999)&(HT14<8577)!(HT14>8929)&(HT14<9111) S AG=26,SP=67569 G AG
;
;GTT
I TX=67589 S AG=54 G AG
;
;Urethra (C68.9)
;Urothelial (Transitional Cell) Carcinoma of the Prostate
I ONCED>4,TX=67619,(HT=81203)!(HT=81303)!(HT=81223)!(HT=81202) D G AG
.S AG=35
;
;Melanoma of the Conjunctiva
I $$MELANOMA^ONCOU55(D0),TX=67690 S AG=39 G AG
;
;Melanoma of the Uvea
I $$MELANOMA^ONCOU55(D0),((TX=67693)!(TX=67694)) S AG=40 G AG
;
;Ocular Adnexa Lymphoma
I ONCED>6,$$LYMPHOMA^ONCFUNC(D0),((TX=67441)!(TX=67690)!(TX=67695)!(TX=67696)) S AG=431 G AG
;
;Lymphoid Neoplasms
;Mycosis fungoides (9700/3)
;Sezary Disease (9701/3)
I ONCED>5,(HT=97003)!(HT=97013) S AG=55 G AG
;
S AG=$P($G(^ONCO(164,+TX,0)),U,12)
;
AG ;DO staging subroutine
S SG=99
I T=88,N=88,M=88 S SG=88 G SG
S ONCOED=ONCED
D @(AG_"^ONCOTN0")
W:SG=99 !!,?12,"TNM combination not in staging table."
;
SG ;Computed stage
I STGIND="C" S $P(^ONCO(165.5,D0,2),U,20)=SG
I STGIND="P" S $P(^ONCO(165.5,D0,2.1),U,4)=SG
I STGIND="O" S $P(^ONCO(165.5,D0,2.1),U,9)=SG
I STGIND="R" S $P(^ONCO(165.5,D0,23,DA,0),U,9)=SG
I SG'="" S X=SG D KSG^ONCOCRC D
.I STGIND="C" D CSSG^ONCOCRC Q
.I STGIND="P" D PSSG^ONCOCRC Q
N CMPFLG S CMPFLG="COMPUTING TNM"
W !!?12,"Computed "_$S(STGIND="C":"CLINICAL",STGIND="P":"PATHOLOGIC",STGIND="O":"OTHER",STGIND="R":"RECURRENCE",1:"")," STAGE GROUPING: ",$$SGOUT^ONCOTNO(D0),!
EX Q
;
CTNM88 ;CLINICAL TNM 88
S $P(^ONCO(165.5,D0,2),U,25)=88
S $P(^ONCO(165.5,D0,2),U,26)=88
S $P(^ONCO(165.5,D0,2),U,27)=88
W !,"CLINICAL T: T88 NA"
W !,"CLINICAL N: N88 NA"
W !,"CLINICAL M: M88 NA",!
I $$LYMPHOMA^ONCFUNC(D0) Q
S:$P($G(^ONCO(165.5,D0,7)),U,7)="" $P(^ONCO(165.5,D0,7),U,7)="0000000"
S:$P($G(^ONCO(165.5,D0,7)),U,14)="" $P(^ONCO(165.5,D0,7),U,14)="0000000"
Q
;
CSB I DATEDX>2951231 D
.S $P(^ONCO(165.5,D0,3),U,32)=1 ;ONC*2.2*6 use pointer value now
.W !,"STAGED BY (CLINICAL STAGE): Not staged",!
Q
;
PTNM88 ;PATHOLOGIC TNM 88
S $P(^ONCO(165.5,D0,7),U,17)="N"
S $P(^ONCO(165.5,D0,2.1),U,1)=88
S $P(^ONCO(165.5,D0,2.1),U,2)=88
S $P(^ONCO(165.5,D0,2.1),U,3)=88
W !,"MULTIMODALITY THERAPY: NO"
W !,"PATHOLOGIC T: T88 NA"
W !,"PATHOLOGIC N: N88 NA"
W !,"PATHOLOGIC M: M88 NA",!
Q
;
PSB I DATEDX>2951231 D
.S $P(^ONCO(165.5,D0,2.1),U,5)=1 ;ONC*2.2*6 use pointer value now
.W !,"STAGED BY (PATHOLOGIC STAGE): Not staged",!
Q
;
CSTG88 ;CLINICAL STAGE 88
S $P(^ONCO(165.5,D0,2),U,20)=88
W !,"STAGE GROUP CLINICAL: NA",!
S TMP=$G(X),X=88 D CSSG^ONCOCRC S X=TMP
K TMP
Q
;
PSTG88 ;PATHOLOGIC STAGE 88
S $P(^ONCO(165.5,D0,2.1),U,4)=88
W !,"STAGE GROUP PATHOLOGIC: NA",!
S TMP=$G(X),X=88 D PSSG^ONCOCRC S X=TMP
K TMP
Q
;
OCULAR() ;
I $G(HT14)="" S HT14=$E(HT,1,4)
I ONCED>6,$$LYMPHOMA^ONCFUNC(D0),((TX=67441)!(TX=67690)!(TX=67695)!(TX=67696)),((HT14>9589)&(HT14<9700)!(HT14>9701)&(HT14<9739)!(HT14>9810)&(HT14<9819)!(HT14>9819)&(HT14<9838)) Q 1
Q 0
;
CN1 ;No longer used. Called by PCEs.
CN3 ;No longer used. Called by PCEs.
Q
;
CLEANUP ;Cleanup
K AG,D0,D1,DA,ONCOED,SG,ST,STGIND,X,Y
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOTN 13229 printed Dec 13, 2024@02:25:54 Page 2
ONCOTN ;Hines OIFO/GWB - TNM Staging ;02/28/11
+1 ;;2.2;ONCOLOGY;**1,4,5,6**;Jul 31, 2013;Build 10
+2 ;
+3 NEW DATEDX,H,ONCED,S,YR
+4 SET DATEDX=$PIECE(^ONCO(165.5,D0,0),U,16)
+5 SET YR=$EXTRACT(DATEDX,1,3)
+6 SET ONCED=$SELECT(YR<283:1,YR<288:2,YR<292:3,YR<298:4,YR<303:5,YR<310:6,1:7)
+7 SET S=$PIECE(^ONCO(165.5,D0,0),U,1)
+8 SET T=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
+9 IF T=""
WRITE !!?5,"PRIMARY SITE not defined.",!
SET Y=20
QUIT
+10 SET H=$$HIST^ONCFUNC(D0)
+11 SET HT14=$EXTRACT(H,1,4)
+12 SET SD=$PIECE($GET(^ONCO(165.5,D0,"CS3")),U,1)
+13 IF H=""
WRITE !!?5,"HISTOLOGY not defined.",!
SET Y=$SELECT(DATEDX>3001231:22.3,1:22)
QUIT
+14 SET Y="@69"
+15 ;
+16 ;Dermatofibrosarcomas of the skin
+17 IF (HT14=8832)!(HT14=8833)
IF ($EXTRACT(T,3,4)=44)
Begin DoDot:1
+18 WRITE !!?3,"AJCC does not define staging for dermatofibrosarcomas of the skin.",!
+19 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+20 ;
+21 ;Laryngeal cartilage C32.3 - 7th Edition
+22 ;Removed from 7th Edition Larynx chapter 5
+23 IF ONCED>6
IF T=67323
Begin DoDot:1
+24 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
QUIT
+25 ;
7 ;Major Salivary Glands - 7th Edition
+1 IF ONCED>6
IF ($EXTRACT(T,3,4)="07")!($EXTRACT(T,3,4)="08")
IF (HT14<8000)!((HT14>8576)&(HT14<8940))!((HT14>8950)&(HT14<8980))!(HT14>8981)
Begin DoDot:1
+2 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
QUIT
+3 ;
8 ;Mycosis fungoides and Sezary Disease of Skin, Vulva, Penis, Scrotum
+1 IF (H=97003)!(H=97013)
IF ($EXTRACT(T,3,4)=44)!($EXTRACT(T,3,4)=51)!($EXTRACT(T,3,4)=60)!(T=67632)
IF ONCED>5
QUIT
+2 ;
+3 IF (S=62)!($$LYMPHOMA^ONCFUNC(D0))
Begin DoDot:1
+4 IF ONCED>6
IF (T=67441)!(T=67690)!(T=67695)!(T=67696)
QUIT
+5 WRITE !!?3,"No TNM classification is available for Lymphoid Neoplasms.",!
+6 ;D CTNM88,PTNM88 ;changed to call these from within the input template
+7 SET Y="@376"
End DoDot:1
QUIT
+8 ;
+9 IF (T=67301)!(T=67339)!(T=67379)!($EXTRACT(T,1,4)=6739)!(T=67630)!(T=67631)!(T=67637)!(T=67638)!(T=67639)!(T=67691)!(T=67750)!(T=67754)!(T=67755)!(T=67758)!(T=67759)!($EXTRACT(T,1,4)=6776)!($EXTRACT(T,1,4)=6726)
Begin DoDot:1
+10 WRITE !!?3,"AJCC does not define staging for this site.",!
+11 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+12 ;
+13 IF $EXTRACT(T,1,4)=6774
IF ONCED<7
Begin DoDot:1
+14 WRITE !!?3,"AJCC does not define staging for this site.",!
+15 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+16 ;
+17 IF (T=67248)!(T=67249)
IF ONCED>6
Begin DoDot:1
+18 WRITE !!?3,"AJCC does not define staging for this site.",!
+19 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+20 ;
+21 IF T=67695
IF SD="020"
IF ONCED>6
Begin DoDot:1
+22 WRITE !!?3,"AJCC does not define staging for lacrimal sac.",!
+23 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+24 ;
+25 IF (T=67254)!(T=67312)!(T=67313)!(T=67318)!(T=67319)
Begin DoDot:1
+26 WRITE !!?3,"AJCC does not define staging for this site.",!
+27 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+28 ;
+29 IF ONCED=6
IF $$MELANOMA^ONCOU55(D0)
IF ($EXTRACT(T,3,4)=44)!($EXTRACT(T,3,4)=51)!($EXTRACT(T,3,4)=60)!(T=67632)
IF (H=87233)!(H=87283)!(H=87303)!(H=87403)!(H=87412)!(H=87413)!(H=87463)!(H=87703)!(H=87733)!(H=87743)!(H=87422)
Begin DoDot:1
+30 WRITE !!?1,"Histology ",$EXTRACT(H,1,4)_"/"_$EXTRACT(H,5)," is not appropriate for or relevant to the staging of melanoma.",!
+31 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+32 ;
+33 IF (ONCED<7)
IF ((H<8020)!(H>8090))
IF (T=67140)!(T=67142)!(T=67148)
Begin DoDot:1
+34 WRITE !!?3,"AJCC does not define staging for this site.",!
+35 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+36 ;
+37 IF (T=67250)!($EXTRACT(T,1,4)=6715)!($EXTRACT(T,1,4)=6716)!($EXTRACT(T,1,4)=6717)!($EXTRACT(T,1,4)=6718)
IF $EXTRACT(H,1,4)=8936
IF ONCED=6
Begin DoDot:1
+38 WRITE !!," No TNM coding/staging available for GASTROINTESTINAL STROMA of ",$SELECT($EXTRACT(T,1,4)=6715:"ESOPHAGUS",$EXTRACT(T,1,4)=6716:"STOMACH",$EXTRACT(T,1,4)=6717:"SMALL INTESTINE",$EXTRACT(T,1,4)=6718:"COLON",T=67250:"PAN
CREAS, HEAD",1:""),".",!
+39 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+40 ;
+41 ;Carcinoid Tumors
+42 IF ($EXTRACT(T,3,4)=16)!($EXTRACT(T,3,4)=17)!($EXTRACT(T,3,4)=18)!(T=67199)!(T=67209)!($EXTRACT(T,3,4)=21)!(T=67239)!($EXTRACT(T,3,4)=24)!($EXTRACT(T,3,4)=25)
IF ($EXTRACT(H,1,4)=8249)!($EXTRACT(H,1,4)=9091)
Begin DoDot:1
+43 IF ONCED>6
IF ($EXTRACT(T,3,4)=16)!($EXTRACT(T,3,4)=17)!(T=67180)!(T=67181)!(T=67182)!(T=67183)!(T=67184)!(T=67185)!(T=67186)!(T=67187)!(T=67188)!(T=67189)!(T=67199)!(T=67209)!(T=67241)
QUIT
+44 WRITE !!?3,"No TNM coding/staging is available for carcinoid tumors"
Begin DoDot:2
+45 IF ($EXTRACT(T,3,4)=16)!($EXTRACT(T,3,4)=17)!($EXTRACT(T,3,4)=18)!($EXTRACT(T,3,4)=21)!(T=67239)!($EXTRACT(T,3,4)=24)!(T=67241)!($EXTRACT(T,3,4)=25)
WRITE !?3,"of the ",$PIECE($GET(^ONCO(164,T,0)),U,1),"."
+46 WRITE !
End DoDot:2
+47 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
+48 SET Y="@313"
End DoDot:1
QUIT
+49 ;
+50 IF $EXTRACT(T,1,4)=6734
DO ^ONCLNG
DO ^ONCLNG1
IF $DATA(ONCLUNG(H))
Begin DoDot:1
+51 WRITE !!?3,"No TNM coding/staging available for sarcomas and rare tumors of the lung.",!
+52 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
+53 KILL ONCLUNG
End DoDot:1
SET Y="@313"
QUIT
+54 KILL ONCLUNG
+55 ;
+56 ;I (T=67380)!(T=67381)!(T=67382)!(T=67383)!(T=67388)!($E(T,1,4)=6747)!($E(T,1,4)=6748)!($E(T,1,4)=6749),(H=91203)!(H=89903) D S Y="@313" Q
+57 ;.W !!?3,"No TNM coding/staging available for angiosarcoma or malignant mesenchymoma.",! D ;removed these in p5
+58 ;.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
+59 ;
+60 IF $EXTRACT(T,1,4)=6748
IF H=90503
Begin DoDot:1
+61 WRITE !!?3,"No TNM coding/staging available for malignant peritoneal mesothelioma.",!
Begin DoDot:2
End DoDot:2
+62 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+63 ;
+64 ;I (T=67300)!(T=67310)!(T=67311),(H=95223) D S Y="@313" Q
+65 ;.W !!," No TNM coding available for OLFACTORY NEUROMBLASTOMA of ",$S(T=67300:"NASAL CAVITY",T=67310:"SINUS, MAXILLARY",T=67311:"SINUS ETHMOID",1:""),".",!
+66 ;.D CTNM88,CSTG88,CSB,PTNM88,PSTG88,PSB
+67 ;
+68 ;Fallopian Tube (C57.0)
+69 ;Other/unspecified female genitalia (C57.1-C57.9)
+70 IF ((T=67570)&(ONCED<5))!(($EXTRACT(T,1,4)=6757)&(T'=67570))
Begin DoDot:1
+71 WRITE !!?3,"AJCC does not define staging for this site.",!
+72 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+73 ;
+74 ;Paraurethral gland (C68.1)
+75 ;Overlapping lesion of urinary organs (C68.8)
+76 ;Urinary system, NOS (C68.9)
+77 IF ONCED>5
IF ((T=67681)!(T=67688)!(T=67689))
Begin DoDot:1
+78 WRITE !!?3,"AJCC does not define staging for this site.",!
+79 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+80 ;
+81 ;Melanoma of the Eyelid
+82 IF ONCED<5
IF T=67441
IF $$MELANOMA^ONCOU55(D0)
Begin DoDot:1
+83 WRITE !!?3,"No classification is recommended at present.",!
+84 SET $PIECE(^ONCO(165.5,D0,2),U,25)=88
+85 WRITE !,"CLINICAL T: T88 NA"
End DoDot:1
SET Y=37.2
QUIT
+86 ;
+87 ;Brain and Spinal Cord
+88 IF ONCED>4
IF (T=67700)!(T=67701)!(T=67709)!(T=67751)!(T=67752)!(T=67753)!($EXTRACT(T,3,4)=71)!($EXTRACT(T,3,4)=72)
Begin DoDot:1
+89 WRITE !!?3,"Central Nervous System Tumors have no TNM designation.",!
+90 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+91 ;
+92 ;Kaposi's sarcoma
+93 IF H=91403
Begin DoDot:1
+94 WRITE !!?3,"No TNM classification or staging is available for Kaposi's sarcoma.",!
+95 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+96 ;
+97 IF $PIECE(^ONCO(164,T,0),U,11)=""
Begin DoDot:1
+98 WRITE !!?3,"No stage grouping is presently recommended.",!
+99 DO CTNM88
DO CSTG88
DO CSB
DO PTNM88
DO PSTG88
DO PSB
End DoDot:1
SET Y="@313"
QUIT
+100 QUIT
+101 ;
CN2 ;GTT - clinical
+1 SET T=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
+2 IF T=67589
Begin DoDot:1
+3 WRITE !!," Regional lymph node (N) classification does not apply to these tumors.",!
+4 SET $PIECE(^ONCO(165.5,D0,2),U,26)=""
+5 WRITE !,"CLINICAL N:"
End DoDot:1
SET Y=37.3
QUIT
+6 QUIT
+7 ;
CN4 ;GTT - pathologic
+1 SET T=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
+2 IF T=67589
Begin DoDot:1
+3 WRITE !!," Regional lymph node (N) classification does not apply to these tumors.",!
+4 SET $PIECE(^ONCO(165.5,D0,2.1),U,2)=""
+5 WRITE !,"PATHOLOGIC N:"
End DoDot:1
SET Y=87
QUIT
+6 QUIT
+7 ;
CN5 ;GTT - other
+1 SET T=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
+2 IF T=67589
Begin DoDot:1
+3 WRITE !!," Regional lymph node (N) classification does not apply to these tumors.",!
+4 SET $PIECE(^ONCO(165.5,D0,2.1),U,7)=""
+5 WRITE !,"OTHER N:"
End DoDot:1
SET Y=99
QUIT
+6 QUIT
+7 ;
RECN ;GTT - Subsequent Recurrences - other
+1 SET T=$PIECE($GET(^ONCO(165.5,D0,2)),U,1)
+2 IF T=67589
Begin DoDot:1
+3 WRITE !!," Regional lymph node (N) classification does not apply to these tumors.",!
+4 SET $PIECE(^ONCO(165.5,D0,23,D1,0),U,8)=""
+5 WRITE !,"OTHER N:"
End DoDot:1
SET Y=3
QUIT
+6 QUIT
+7 ;
ES ;Automatic Staging
+1 NEW CM,G,HT,HT14,N,M,SD,SP,STGTYP,T,TX,XX,XXX,YR
+2 SET YR=$EXTRACT($PIECE($GET(^ONCO(165.5,D0,0)),U,16),1,3)
+3 SET ONCED=$SELECT(YR<283:1,YR<288:2,YR<292:3,YR<298:4,YR<303:5,YR<310:6,1:7)
+4 IF ONCED<3
Begin DoDot:1
+5 WRITE !!,"DATE DX prior to 1988. Automatic staging unavailable.",!
End DoDot:1
QUIT
+6 SET STGTYP=$SELECT(STGIND="C":"CLINICAL",STGIND="P":"PATHOLOGIC",STGIND="O":"OTHER",STGIND="R":"RECURRENCE",1:"")
+7 SET XX=$GET(^ONCO(165.5,D0,2))
+8 if XX=""
GOTO EX
+9 SET ST=$PIECE(^ONCO(165.5,D0,0),U,1)
+10 SET G=$PIECE(^ONCO(165.5,D0,2),U,5)
+11 SET TX=$PIECE(^ONCO(165.5,D0,2),U,1)
+12 SET HT=$$HIST^ONCFUNC(D0)
+13 SET SP=$PIECE($GET(^ONCO(164,+TX,0)),U,11)
+14 SET SD=$PIECE($GET(^ONCO(165.5,D0,"CS3")),U,1)
+15 IF STGIND="C"
Begin DoDot:1
+16 SET XXX=$GET(^ONCO(165.5,D0,2))
+17 SET T=$PIECE(XXX,U,25)
+18 SET N=$PIECE(XXX,U,26)
+19 SET M=$PIECE(XXX,U,27)
End DoDot:1
+20 IF STGIND="P"
Begin DoDot:1
+21 SET XXX=$GET(^ONCO(165.5,D0,2.1))
+22 SET T=$PIECE(XXX,U,1)
+23 SET N=$PIECE(XXX,U,2)
+24 SET M=$PIECE(XXX,U,3)
+25 SET CM=$PIECE($GET(^ONCO(165.5,D0,2)),U,27)
+26 IF (T'="X")!(N'="X")
IF $EXTRACT(M,1)'=1
IF CM'="X"
Begin DoDot:2
+27 SET M=CM
+28 WRITE !!?12,"CLINICAL M will be used to calculate PATHOLOGIC STAGE GROUPING."
End DoDot:2
End DoDot:1
+29 IF STGIND="O"
Begin DoDot:1
+30 SET XXX=$GET(^ONCO(165.5,D0,2.1))
+31 SET T=$PIECE(XXX,U,6)
+32 SET N=$PIECE(XXX,U,7)
+33 SET M=$PIECE(XXX,U,8)
End DoDot:1
+34 IF STGIND="R"
Begin DoDot:1
+35 SET XXX=$GET(^ONCO(165.5,D0,23,DA,0))
+36 SET T=$PIECE(XXX,U,6)
+37 SET N=$PIECE(XXX,U,7)
+38 SET M=$PIECE(XXX,U,8)
End DoDot:1
+39 IF T=""
Begin DoDot:1
+40 WRITE !!?3,"No ",STGTYP," T category has been assigned."
+41 SET SG=99
End DoDot:1
GOTO SG
+42 IF N=""
IF ST'=58
IF '$$GTT^ONCOU55(D0)
Begin DoDot:1
+43 WRITE !!?3,"No ",STGTYP," N category has been assigned."
+44 SET SG=99
End DoDot:1
GOTO SG
+45 IF M=""
IF '$$OCULAR
Begin DoDot:1
+46 WRITE !?3,"No ",STGTYP," M category has been assigned."
+47 SET SG=99
End DoDot:1
GOTO SG
+48 ;
+49 ;Gastrointestinal Stromal Tumor (Gist) 8935-8936
+50 IF ($EXTRACT(HT,1,4)=8935)!($EXTRACT(HT,1,4)=8936)
IF (($EXTRACT(TX,3,4)=15)!($EXTRACT(TX,3,4)=16)!($EXTRACT(TX,3,4)=17)!($EXTRACT(TX,3,4)=18)!($EXTRACT(TX,3,4)=21)!($EXTRACT(TX,3,4)=48)!(TX=67199)!(TX=67209))
IF ONCED>6
SET AG="121"
GOTO AG
+51 ;
+52 ;Neuroendocrine Tumor 8153, 8240-8242, 8246, 8249
+53 IF ONCED>6
IF (($EXTRACT(HT,1,4)=8153)!($EXTRACT(HT,1,4)=8240)!($EXTRACT(HT,1,4)=8241)!($EXTRACT(HT,1,4)=8242)!($EXTRACT(HT,1,4)=8246)!($EXTRACT(HT,1,4)=8249))
IF (($EXTRACT(TX,3,4)=16)!($EXTRACT(TX,3,4)=17)!($EXTRACT(TX,3,4)=18)!(TX=67241)!(TX=67199)!(TX=67209))
SET AG=122
GOTO AG
+54 ;
+55 ;Esophagus/GE Junction C16.0-C16.2
+56 IF TX=67160
IF ONCED>6
SET AG="9"
GOTO AG
+57 IF TX=67161!(TX=67162)
IF ONCED>6
IF SD="010"!(SD="020")!(SD="040")!(SD="060")
SET AG="9"
GOTO AG
+58 ;
+59 ;Gallbladder
+60 ;Distal Bile Duct
+61 IF TX=67240
IF ONCED>6
IF (SD="040")!(SD="070")
SET AG=63
GOTO AG
+62 IF TX=67240
IF ONCED>6
IF SD="030"
SET AG=14
GOTO AG
+63 ;
+64 ;Melanoma of the Eyelid (C44.1)
+65 IF TX=67441
IF ONCED<5
IF $$MELANOMA^ONCOU55(D0)
SET AG=37
GOTO AG
+66 ;
+67 ;Melanoma of the Skin
+68 IF $$MELANOMA^ONCOU55(D0)
IF $PIECE($GET(^ONCO(164,+TX,0)),U,15)
SET AG=22
GOTO AG
+69 ;
+70 ;Merkel Cell Carcinoma
+71 IF $EXTRACT(HT,1,4)=8247
IF ONCED>6
SET AG=21
GOTO AG
+72 ;
+73 ;Ovary and Primary Peritoneal Carcinoma - 7th edition
+74 SET HT14=$EXTRACT(HT,1,4)
+75 IF ONCED>6
IF (TX=67481)!(TX=67482)!(TX=67488)
IF (HT14>7999)&(HT14<8577)!(HT14>8929)&(HT14<9111)
SET AG=26
SET SP=67569
GOTO AG
+76 ;
+77 ;GTT
+78 IF TX=67589
SET AG=54
GOTO AG
+79 ;
+80 ;Urethra (C68.9)
+81 ;Urothelial (Transitional Cell) Carcinoma of the Prostate
+82 IF ONCED>4
IF TX=67619
IF (HT=81203)!(HT=81303)!(HT=81223)!(HT=81202)
Begin DoDot:1
+83 SET AG=35
End DoDot:1
GOTO AG
+84 ;
+85 ;Melanoma of the Conjunctiva
+86 IF $$MELANOMA^ONCOU55(D0)
IF TX=67690
SET AG=39
GOTO AG
+87 ;
+88 ;Melanoma of the Uvea
+89 IF $$MELANOMA^ONCOU55(D0)
IF ((TX=67693)!(TX=67694))
SET AG=40
GOTO AG
+90 ;
+91 ;Ocular Adnexa Lymphoma
+92 IF ONCED>6
IF $$LYMPHOMA^ONCFUNC(D0)
IF ((TX=67441)!(TX=67690)!(TX=67695)!(TX=67696))
SET AG=431
GOTO AG
+93 ;
+94 ;Lymphoid Neoplasms
+95 ;Mycosis fungoides (9700/3)
+96 ;Sezary Disease (9701/3)
+97 IF ONCED>5
IF (HT=97003)!(HT=97013)
SET AG=55
GOTO AG
+98 ;
+99 SET AG=$PIECE($GET(^ONCO(164,+TX,0)),U,12)
+100 ;
AG ;DO staging subroutine
+1 SET SG=99
+2 IF T=88
IF N=88
IF M=88
SET SG=88
GOTO SG
+3 SET ONCOED=ONCED
+4 DO @(AG_"^ONCOTN0")
+5 if SG=99
WRITE !!,?12,"TNM combination not in staging table."
+6 ;
SG ;Computed stage
+1 IF STGIND="C"
SET $PIECE(^ONCO(165.5,D0,2),U,20)=SG
+2 IF STGIND="P"
SET $PIECE(^ONCO(165.5,D0,2.1),U,4)=SG
+3 IF STGIND="O"
SET $PIECE(^ONCO(165.5,D0,2.1),U,9)=SG
+4 IF STGIND="R"
SET $PIECE(^ONCO(165.5,D0,23,DA,0),U,9)=SG
+5 IF SG'=""
SET X=SG
DO KSG^ONCOCRC
Begin DoDot:1
+6 IF STGIND="C"
DO CSSG^ONCOCRC
QUIT
+7 IF STGIND="P"
DO PSSG^ONCOCRC
QUIT
End DoDot:1
+8 NEW CMPFLG
SET CMPFLG="COMPUTING TNM"
+9 WRITE !!?12,"Computed "_$SELECT(STGIND="C":"CLINICAL",STGIND="P":"PATHOLOGIC",STGIND="O":"OTHER",STGIND="R":"RECURRENCE",1:"")," STAGE GROUPING: ",$$SGOUT^ONCOTNO(D0),!
EX QUIT
+1 ;
CTNM88 ;CLINICAL TNM 88
+1 SET $PIECE(^ONCO(165.5,D0,2),U,25)=88
+2 SET $PIECE(^ONCO(165.5,D0,2),U,26)=88
+3 SET $PIECE(^ONCO(165.5,D0,2),U,27)=88
+4 WRITE !,"CLINICAL T: T88 NA"
+5 WRITE !,"CLINICAL N: N88 NA"
+6 WRITE !,"CLINICAL M: M88 NA",!
+7 IF $$LYMPHOMA^ONCFUNC(D0)
QUIT
+8 if $PIECE($GET(^ONCO(165.5,D0,7)),U,7)=""
SET $PIECE(^ONCO(165.5,D0,7),U,7)="0000000"
+9 if $PIECE($GET(^ONCO(165.5,D0,7)),U,14)=""
SET $PIECE(^ONCO(165.5,D0,7),U,14)="0000000"
+10 QUIT
+11 ;
CSB IF DATEDX>2951231
Begin DoDot:1
+1 ;ONC*2.2*6 use pointer value now
SET $PIECE(^ONCO(165.5,D0,3),U,32)=1
+2 WRITE !,"STAGED BY (CLINICAL STAGE): Not staged",!
End DoDot:1
+3 QUIT
+4 ;
PTNM88 ;PATHOLOGIC TNM 88
+1 SET $PIECE(^ONCO(165.5,D0,7),U,17)="N"
+2 SET $PIECE(^ONCO(165.5,D0,2.1),U,1)=88
+3 SET $PIECE(^ONCO(165.5,D0,2.1),U,2)=88
+4 SET $PIECE(^ONCO(165.5,D0,2.1),U,3)=88
+5 WRITE !,"MULTIMODALITY THERAPY: NO"
+6 WRITE !,"PATHOLOGIC T: T88 NA"
+7 WRITE !,"PATHOLOGIC N: N88 NA"
+8 WRITE !,"PATHOLOGIC M: M88 NA",!
+9 QUIT
+10 ;
PSB IF DATEDX>2951231
Begin DoDot:1
+1 ;ONC*2.2*6 use pointer value now
SET $PIECE(^ONCO(165.5,D0,2.1),U,5)=1
+2 WRITE !,"STAGED BY (PATHOLOGIC STAGE): Not staged",!
End DoDot:1
+3 QUIT
+4 ;
CSTG88 ;CLINICAL STAGE 88
+1 SET $PIECE(^ONCO(165.5,D0,2),U,20)=88
+2 WRITE !,"STAGE GROUP CLINICAL: NA",!
+3 SET TMP=$GET(X)
SET X=88
DO CSSG^ONCOCRC
SET X=TMP
+4 KILL TMP
+5 QUIT
+6 ;
PSTG88 ;PATHOLOGIC STAGE 88
+1 SET $PIECE(^ONCO(165.5,D0,2.1),U,4)=88
+2 WRITE !,"STAGE GROUP PATHOLOGIC: NA",!
+3 SET TMP=$GET(X)
SET X=88
DO PSSG^ONCOCRC
SET X=TMP
+4 KILL TMP
+5 QUIT
+6 ;
OCULAR() ;
+1 IF $GET(HT14)=""
SET HT14=$EXTRACT(HT,1,4)
+2 IF ONCED>6
IF $$LYMPHOMA^ONCFUNC(D0)
IF ((TX=67441)!(TX=67690)!(TX=67695)!(TX=67696))
IF ((HT14>9589)&(HT14<9700)!(HT14>9701)&(HT14<9739)!(HT14>9810)&(HT14<9819)!(HT14>9819)&(HT14<9838))
QUIT 1
+3 QUIT 0
+4 ;
CN1 ;No longer used. Called by PCEs.
CN3 ;No longer used. Called by PCEs.
+1 QUIT
+2 ;
CLEANUP ;Cleanup
+1 KILL AG,D0,D1,DA,ONCOED,SG,ST,STGIND,X,Y