source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCSG0A.m@ 1093

Last change on this file since 1093 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 5.8 KB
Line 
1ONCSG0A ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;6/20/02
2 ;;2.11;ONCOLOGY;**35,41,43**;Mar 07, 1995
3 ;
4 ;HEAD AND NECK SITES (continued)
5 ;
6PAR12 ;Paranasal Sinuses - 1st and 2nd editions
7 I M[1 S SG=4
8 E I M[0 D
9 .I (N[2)!(N[3) S SG=4
10 .E I N[1,(T[1)!(T[2)!(T[3)!(T[4) S SG=$S(T=4:4,1:3)
11 .E I N[0,(T[1)!(T[2)!(T[3)!(T[4) S SG=+T
12 Q
13 ;
14PAR34 ;Paranasal Sinuses - 3rd and 4th editions
15 I M[1 S SG=4
16 E I M[0 D
17 .I (N[2)!(N[3) S SG=4
18 .E I N[1,(T[1)!(T[2)!(T[3)!(T[4) S SG=$S(T=4:4,1:3)
19 .E I N[0,(T["IS")!(T[1)!(T[2)!(T[3)!(T[4) S SG=+T
20 Q
21 ;
22PAR5 ;Paranasal Sinuses - 5th edition
23 S TNM=T_$E(N,1)_M D K TNM Q
24 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
25 .I TNM=100 S SG=1 Q ;I T1 N0 M0
26 .I TNM=200 S SG=2 Q ;II T2 N0 M0
27 .I TNM=300 S SG=3 Q ;III T3 N0 M0
28 .I TNM=110 S SG=3 Q ; T1 N1 M0
29 .I TNM=210 S SG=3 Q ; T2 N1 M0
30 .I TNM=310 S SG=3 Q ; T3 N1 M0
31 .I TNM=400 S SG="4A" Q ;IVA T4 N0 M0
32 .I TNM=410 S SG="4A" Q ; T4 N1 M0
33 .I $E(N,1)=2,M=0 S SG="4B" Q ;IVB Any T N2 M0
34 .I $E(N,1)=3,M=0 S SG="4B" Q ; Any T N3 M0
35 .I M=1 S SG="4C" Q ;IVC Any T Any N M1
36 ;
37PAR6 ;Paranasal Sinuses - 6th edition
38 S TNM=T_$E(N,1)_M D K TNM Q
39 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
40 .I TNM=100 S SG=1 Q ;I T1 N0 M0
41 .I TNM=200 S SG=2 Q ;II T2 N0 M0
42 .I TNM=300 S SG=3 Q ;III T3 N0 M0
43 .I TNM=110 S SG=3 Q ; T1 N1 M0
44 .I TNM=210 S SG=3 Q ; T2 N1 M0
45 .I TNM=310 S SG=3 Q ; T3 N1 M0
46 .I TNM="4A00" S SG="4A" Q ;IVA T4a N0 M0
47 .I TNM="4A10" S SG="4A" Q ; T4a N1 M0
48 .I TNM=120 S SG="4A" Q ; T1 N2 M0
49 .I TNM=220 S SG="4A" Q ; T2 N2 M0
50 .I TNM=320 S SG="4A" Q ; T3 N2 M0
51 .I TNM="4A20" S SG="4A" Q ; T4a N2 M0
52 .I T="4B",M=0 S SG="4B" Q ;IVB T4b Any N M0
53 .I $E(N,1)=3,M=0 S SG="4B" Q ; Any T N3 M0
54 .I M=1 S SG="4C" Q ;IVC Any T Any N M1
55 ;
56SAL12 ;Major Salivary Glands - 1st and 2nd editions
57 I M[1 S SG=4
58 E I M[0 D
59 .I N[1,(T[1)!(T[2)!(T[3)!(T[4) S SG=$S(T>2:4,1:3)
60 .E I N[0,(T[1)!(T[2)!(T[3)!(T[4) S SG=$S(T[4:3,T[3:2,1:1)
61 Q
62 ;
63SAL34 ;Major Salivary Glands - 3rd and 4th editions
64 I M S SG=4
65 E I (T["4B")!(N[2)!(N[3),M[0 S SG=4
66 E I (T["1A")!(T["2A"),N[0,M[0 S SG=1
67 E I (T["1B")!(T["2B")!(T["3A"),N[0,M[0 S SG=2
68 E I (T["3B")!(T["4A"),N[0,M[0 S SG=3
69 E I N[1,M[0 S SG=3
70 Q
71 ;
72SAL5 ;Major Salivary Glands - 5th edition
73 S TNM=T_$E(N,1)_M D K TNM Q
74 .I TNM=100 S SG=1 Q ;I T1 N0 M0
75 .I TNM=200 S SG=1 Q ; T2 N0 M0
76 .I TNM=300 S SG=2 Q ;II T3 N0 M0
77 .I TNM=110 S SG=3 Q ;III T1 N1 M0
78 .I TNM=210 S SG=3 Q ; T2 N1 M0
79 .I TNM=400 S SG=4 Q ;IV T4 N0 M0
80 .I TNM=310 S SG=4 Q ; T3 N1 M0
81 .I TNM=410 S SG=4 Q ; T4 N1 M0
82 .I $E(N,1)=2,M=0 S SG=4 Q ; Any T N2 M0
83 .I $E(N,1)=3,M=0 S SG=4 Q ; Any T N3 M0
84 .I M=1 S SG=4 Q ; Any T Any N M1
85 ;
86SAL6 ;Major Salivary Glands - 6th edition
87 S TNM=T_$E(N,1)_M D K TNM Q
88 .I TNM=100 S SG=1 Q ;I T1 N0 M0
89 .I TNM=200 S SG=2 Q ;II T2 N0 M0
90 .I TNM=300 S SG=3 Q ;III T3 N0 M0
91 .I TNM=110 S SG=3 Q ; T1 N1 M0
92 .I TNM=210 S SG=3 Q ; T2 N1 M0
93 .I TNM=310 S SG=3 Q ; T3 N1 M0
94 .I TNM="4A00" S SG="4A" Q ;IVA T4a N0 M0
95 .I TNM="4A10" S SG="4A" Q ; T4a N1 M0
96 .I TNM=120 S SG="4A" Q ; T1 N2 M0
97 .I TNM=220 S SG="4A" Q ; T2 N2 M0
98 .I TNM=320 S SG="4A" Q ; T3 N2 M0
99 .I TNM="4A20" S SG="4A" Q ; T4a N2 M0
100 .I T="4B",M=0 S SG="4B" Q ;IVB T4b Any N M0
101 .I N=3,M=0 S SG="4B" Q ; Any T N3 M0
102 .I M=1 S SG="4C" Q ;IVC Any T Any N M1
103 ;
104THY15 K SG
105 I G=4 S SG=4
106 E D
107 .N MO S MO=$$HIST^ONCFUNC(D0)
108 .D @$S((MO=85103)!(MO=85113):"THYDM",1:"THYDPF")
109 I '$D(SG) S SG=99
110 Q
111 ;
112THYDM ;Thyroid - Medullary
113 I M S SG=4
114 E I T[1,N[0,M[0 S SG=1
115 E I (T[2)!(T[3)!(T[4),N[0,M[0 S SG=2
116 E I N[1,M[0 S SG=3
117 E S SG=99
118 Q
119 ;
120THYDPF ;Thyroid - Papillary or Follicular
121 N OKMO
122 S OKMO=("^80503^82603^82900^82903^83300^83303^83313^83323^83333^83340^83403^83503^80203^"[(U_MO_U))
123 I 'OKMO W !!?12,"Histology code is incompatible." Q
124 E D
125 .D AGE^ONCOCOM
126 .I X<45 S SG=$S(M[1:2,M[0:1,1:"E")
127 .E D THYDP45
128 Q
129 ;
130THYDP45 ;THYROID - Papillary or Follicular - 45 years and older
131 I M[1 S SG=4
132 E I M[0 D
133 .I N[1 S SG=3
134 .E I N[0 D
135 ..I T[1 S SG=1
136 ..E I (T[2)!(T[3) S SG=2
137 ..E I T[4 S SG=3
138 Q
139 ;
140THY6 ;Thyroid Gland - 6th edition
141 D AGE^ONCOCOM
142 S MO=$$HIST^ONCFUNC(D0)
143 S OKMO="80503^82603^82903^83303^83313^83323^83353^83403^83413^83423^83433^83443^83503" ;Papillary or Follicular
144 I X<45,OKMO[MO S SG=$S(M=0:1,M=1:2,1:99) D Q
145 .W !!,?12,"NOTE: Papillary or Follicular"
146 .W !,?12," Under 45 years"
147 S TNM=T_N_M D K TNM Q
148 .I TNM=100 S SG=1 Q ;I T1 N0 M0
149 .I TNM=200 S SG=2 Q ;II T2 N0 M0
150 .I TNM=300 S SG=3 Q ;III T3 N0 M0
151 .I TNM="11A0" S SG=3 Q ; T1 N1a M0
152 .I TNM="21A0" S SG=3 Q ; T2 N1a M0
153 .I TNM="31A0" S SG=3 Q ; T3 N1a M0
154 .I TNM="4A00" S SG="4A" Q ;IVA T4a N0 M0
155 .I TNM="4A1A0" S SG="4A" Q ; T4a N1a M0
156 .I TNM="11B0" S SG="4A" Q ; T1 N1b M0
157 .I TNM="21B0" S SG="4A" Q ; T2 N1b M0
158 .I TNM="31B0" S SG="4A" Q ; T3 N1b M0
159 .I TNM="4A1B0" S SG="4A" Q ; T4a N1b M0
160 .I T="4B",M=0 S SG="4B" Q ;IVB T4b Any N M0
161 .I M=1 S SG="4C" Q ;IVC Any T Any N M1
Note: See TracBrowser for help on using the repository browser.