source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCSG3.m@ 1800

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

initial load of WorldVistAEHR

File size: 6.0 KB
RevLine 
[613]1ONCSG3 ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;07/15/02
2 ;;2.11;ONCOLOGY;**35**;Mar 07, 1995
3 ;
4 ;SKIN
5 ;
6CS ;Carcinoma of the Skin - all editions
7 K SG
8 I $E(M)=1 S SG=4
9 E I $E(M)=0 D SKNRP
10 I '$D(SG) S SG=99
11 Q
12SKNRP ;Carcinoma of the Skin
13 I $E(N)=1 S SG=3
14 E I $E(N)=0 D
15 .I T="IS" S SG=0
16 .E I T=1 S SG=1
17 .E I (T=2)!(T=3) S SG=2
18 .E I T=4 S SG=3
19 Q
20 ;
21MMS3 ;Melanoma of the Skin - 3rd edition
22 I M[1 S SG=4
23 E I (T[1)!(T[2)!(T[3),N[0,M[0 S SG=+T
24 E I N,M[0 S SG=3
25 E S SG=99
26 Q
27 ;
28MMS4 ;Malignant Melanoma of the Skin - 4th edition
29 S SG=99
30 I M[1 S SG=4
31 E I (N[1)!(N[2),M[0 S SG=3
32 E I N[0,M[0 S SG=$S((T[3)!(T[4):2,(T[1)!(T[2):1,T["IS":0,1:99)
33 Q
34 ;
35MMS5 ;Malignant Melanoma of the Skin - 5th edition
36 I T="IS" S TNM=T_$E(N,1)_$E(M,1)
37 E S TNM=$E(T,1)_$E(N,1)_$E(M,1)
38 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=1 Q ; T2 N0 M0
42 .I TNM=300 S SG=2 Q ;II T3 N0 M0
43 .I TNM=400 S SG=3 Q ;III T4 N0 M0
44 .I $E(N,1)=1,M=0 S SG=3 Q ; Any T N1 M0
45 .I $E(N,1)=2,M=0 S SG=3 Q ; Any T N2 M0
46 .I $E(M,1)=1 S SG=4 Q ;IV Any T Any N M1
47 ;
48MMS6 ;Melanoma of the Skin - 6th edition
49 I STGIND="C" D MMS6C Q
50 I STGIND="P" D MMS6P Q
51 Q
52 ;
53MMS6C ;Melanoma of the Skin - 6th edition (Clinical Stage Grouping)
54 S TNM=T_$E(N,1)_$E(M,1)
55 D K TNM Q
56 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
57 .I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
58 .I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
59 .I TNM="2A00" S SG="1B" Q ; T2a N0 M0
60 .I TNM="2B00" S SG="2A" Q ;IIA T2b N0 M0
61 .I TNM="3A00" S SG="2A" Q ; T3a N0 M0
62 .I TNM="3B00" S SG="2B" Q ;IIB T3b N0 M0
63 .I TNM="4A00" S SG="2B" Q ; T4a N0 M0
64 .I TNM="4B00" S SG="2C" Q ;IIC T4b N0 M0
65 .I $E(N,1)=1,M=0 S SG=3 Q ;III Any T N1 M0
66 .I $E(N,1)=2,M=0 S SG=3 Q ; Any T N2 M0
67 .I $E(N,1)=3,M=0 S SG=3 Q ; Any T N3 M0
68 .I $E(M,1)=1 S SG=4 Q ;IV Any T Any N M1
69 ;
70MMS6P ;Melanoma of the Skin - 6th edition (Pathologic Stage Grouping)
71 S TNM=T_N_$E(M,1)
72 D K TNM Q
73 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
74 .I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
75 .I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
76 .I TNM="2A00" S SG="1B" Q ; T2a N0 M0
77 .I TNM="2B00" S SG="2A" Q ;IIA T2b N0 M0
78 .I TNM="3A00" S SG="2A" Q ; T3a N0 M0
79 .I TNM="3B00" S SG="2B" Q ;IIB T3b N0 M0
80 .I TNM="4A00" S SG="2B" Q ; T4a N0 M0
81 .I TNM="4B00" S SG="2C" Q ;IIC T4b N0 M0
82 .I TNM="1A1A0" S SG="3A" Q ;IIIA T1a N1a M0
83 .I TNM="2A1A0" S SG="3A" Q ; T2a N1a M0
84 .I TNM="3A1A0" S SG="3A" Q ; T3a N1a M0
85 .I TNM="4A1A0" S SG="3A" Q ; T4a N1a M0
86 .I TNM="1A2A0" S SG="3A" Q ; T1a N2a M0
87 .I TNM="2A2A0" S SG="3A" Q ; T2a N2a M0
88 .I TNM="3A2A0" S SG="3A" Q ; T3a N2a M0
89 .I TNM="4A2A0" S SG="3A" Q ; T4a N2a M0
90 .I TNM="1B1A0" S SG="3B" Q ;IIIB T1b N1a M0
91 .I TNM="2B1A0" S SG="3B" Q ; T2b N1a M0
92 .I TNM="3B1A0" S SG="3B" Q ; T3b N1a M0
93 .I TNM="4B1A0" S SG="3B" Q ; T4b N1a M0
94 .I TNM="1B2A0" S SG="3B" Q ; T1b N2a M0
95 .I TNM="2B2A0" S SG="3B" Q ; T2b N2a M0
96 .I TNM="3B2A0" S SG="3B" Q ; T3b N2a M0
97 .I TNM="4B2A0" S SG="3B" Q ; T4b N2a M0
98 .I TNM="1A1B0" S SG="3B" Q ; T1a N1b M0
99 .I TNM="2A1B0" S SG="3B" Q ; T2a N1b M0
100 .I TNM="3A1B0" S SG="3B" Q ; T3a N1b M0
101 .I TNM="4A1B0" S SG="3B" Q ; T4a N1b M0
102 .I TNM="1A2B0" S SG="3B" Q ; T1a N2b M0
103 .I TNM="2A2B0" S SG="3B" Q ; T2a N2b M0
104 .I TNM="3A2B0" S SG="3B" Q ; T3a N2b M0
105 .I TNM="4A2B0" S SG="3B" Q ; T4a N2b M0
106 .I TNM="1A2C0" S SG="3B" Q ; T1a N2c M0
107 .I TNM="2A2C0" S SG="3B" Q ; T2a N2c M0
108 .I TNM="3A2C0" S SG="3B" Q ; T3a N2c M0
109 .I TNM="4A2C0" S SG="3B" Q ; T4a N2c M0
110 .I TNM="1B2C0" S SG="3B" Q ; T1b N2c M0
111 .I TNM="2B2C0" S SG="3B" Q ; T2b N2c M0
112 .I TNM="3B2C0" S SG="3B" Q ; T3b N2c M0
113 .I TNM="4B2C0" S SG="3B" Q ; T4b N2c M0
114 .I TNM="1B1B0" S SG="3C" Q ;IIIC T1b N1b M0
115 .I TNM="2B1B0" S SG="3C" Q ; T2b N1b M0
116 .I TNM="3B1B0" S SG="3C" Q ; T3b N1b M0
117 .I TNM="4B1B0" S SG="3C" Q ; T4b N1b M0
118 .I TNM="1B2B0" S SG="3C" Q ; T1b N2b M0
119 .I TNM="2B2B0" S SG="3C" Q ; T2b N2b M0
120 .I TNM="3B2B0" S SG="3C" Q ; T3b N2b M0
121 .I TNM="4B2B0" S SG="3C" Q ; T4b N2b M0
122 .I N=3,M=0 S SG="3C" Q ; Any T N3 M0
123 .I $E(M,1)=1 S SG=4 Q ;IV Any T Any N M1
124 ;
125 ;BREAST
126 ;
127BRST345 ;Breast - 3rd, 4th and 5th editions
128 I $E(M)=1 S SG=4
129 E I ($E(N)=3)!($E(T)=4),$E(M)=0 S SG="3B"
130 E I $E(T,1,2)="IS",$E(N)=0,$E(M)=0 S SG=0
131 E I $E(T)=1,$E(N)=0,$E(M)=0 S SG=1
132 E I ($E(T)=0)!($E(T)=1),$E(N)=1,$E(M)=0 S SG="2A"
133 E I $E(T)=2,$E(N)=0,$E(M)=0 S SG="2A"
134 E I $E(T)=2,$E(N)=1,$E(M)=0 S SG="2B"
135 E I $E(T)=3,$E(N)=0,$E(M)=0 S SG="2B"
136 E I ($E(T)=0)!($E(T)=1)!($E(T)=2)!($E(T)=3),$E(N)=2,$E(M)=0 S SG="3A"
137 E I $E(T)=3,$E(N)=1,$E(M)=0 S SG="3A"
138 E S SG=99
139 Q
140 ;
141BRST6 ;Breast - 6th edition
142 I T="IS" S TNM=T_$E(N,1)_$E(M,1)
143 E S TNM=$E(T,1)_$E(N,1)_$E(M,1)
144 S N=$E(N,1)
145 D K TNM Q
146 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
147 .I TNM=100 S SG=1 Q ;I T1 N0 M0
148 .I TNM="010" S SG="2A" Q ;IIA T0 N1 M0
149 .I TNM=110 S SG="2A" Q ; T1 N1 M0
150 .I TNM=200 S SG="2A" Q ; T2 N0 M0
151 .I TNM=210 S SG="2B" Q ;IIB T2 N1 M0
152 .I TNM=300 S SG="2B" Q ; T3 N0 M0
153 .I TNM="020" S SG="3A" Q ;IIIA T0 N2 M0
154 .I TNM=120 S SG="3A" Q ; T1 N2 M0
155 .I TNM=220 S SG="3A" Q ; T2 N2 M0
156 .I TNM=310 S SG="3A" Q ; T3 N1 M0
157 .I TNM=320 S SG="3A" Q ; T3 N2 M0
158 .I TNM=400 S SG="3B" Q ;IIIB T4 N0 M0
159 .I TNM=410 S SG="3B" Q ; T4 N1 M0
160 .I TNM=420 S SG="3B" Q ; T4 N2 M0
161 .I N=3,M=0 S SG="3C" Q ;IIIC Any T N3 M0
162 .I M=1 S SG=4 Q ;IV Any T Any N M1
163 ;
Note: See TracBrowser for help on using the repository browser.