source: FOIAVistA/trunk/r/ONCOLOGY-ONC/ONCSG5.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 6.3 KB
Line 
1ONCSG5 ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;07/15/02
2 ;;2.11;ONCOLOGY;**35**;Mar 07, 1995
3 ;
4 ;GENITOURINARY SITES
5 ;
6PENIS ;Penis - all editions
7 K SG
8 I M=1 S SG=4
9 E I M=0 D PENNM
10 I '$D(SG) S SG=99
11 Q
12PENNM I (T=4)!(N=3) S SG=4
13 E I (T="IS")!(T="A"),N=0 S SG=0
14 E I T=1,N=0 S SG=1
15 E I T=1,N=1 S SG=2
16 E I T=2,(N=0)!(N=1) S SG=2
17 E I (T=1)!(T=2),N=2 S SG=3
18 E I T=3,(N=0)!(N=1)!(N=2) S SG=3
19 Q
20 ;
21PROS3 ;Prostate - 3rd edition
22 I M!(N=1)!(N=2)!(N=3)!(T[4) S SG=4
23 E I T="1A"!(T="2A"),$E(N)=0,$E(M)=0,G,G'=9 S SG=$S(G=1:0,G>1:1)
24 E I T="1B"!(T="2B"),$E(N)=0,$E(M)=0 S SG=2
25 E I T=3,$E(N)=0,$E(M)=0 S SG=3
26 E S SG=99
27 Q
28 ;
29PROS4 ;Prostate - 4th edition
30 I M!(N=1)!(N=2)!(N=3)!(T[4) S SG=4
31 E I T="1A",$E(N)=0,$E(M)=0,G,G'=9 S SG=$S(G=1:0,G>1:1)
32 E I T="1B"!(T="1C")!(T=1),$E(N)=0,$E(M)=0 S SG=1
33 E I T[2,$E(N)=0,$E(M)=0 S SG=2
34 E I T[3,$E(N)=0,$E(M)=0 S SG=3
35 E S SG=99
36 Q
37 ;
38PROS56 ;Prostate - 5th and 6th edition
39 S TNM=T_N_$E(M,1) D K TNM Q
40 .I (G=1)&(TNM="1A00") S SG=1 Q ;I T1a N0 M0 G1
41 .I ((G=2)!(G=3)!(G=4))&(TNM="1A00") S SG=2 Q ;II T1a N0 M0 G2, 3-4
42 .I TNM="1B00" S SG=2 Q ; T1b N0 M0 Any G
43 .I TNM="1C00" S SG=2 Q ; T1c N0 M0 Any G
44 .I TNM=100 S SG=2 Q ; T1 N0 M0 Any G
45 .I $E(T,1)=2,N=0,M=0 S SG=2 Q ; T2 N0 M0 Any G
46 .I $E(T,1)=3,N=0,M=0 S SG=3 Q ;III T3 N0 M0 Any G
47 .I TNM=400 S SG=4 Q ;IV T4 N0 M0 Any G
48 .I N=1,M=0 S SG=4 Q ; Any T N1 M0 Any G
49 .I $E(M,1)=1 S SG=4 Q ; Any T Any N M1 Any G
50 ;
51TES3 ;Testis - 3rd edition
52 S TNM=T_N_M D K TNM Q
53 .I TNM="IS00" S SG=0 Q
54 .I TNM=100 S SG=1 Q
55 .I TNM=200 S SG=1 Q
56 .I TNM=300 S SG=2 Q
57 .I TNM=400 S SG=2 Q
58 .I N=1,M=0 S SG=3 Q
59 .I N=2,M=0 S SG=4 Q
60 .I N=3,M=0 S SG=4 Q
61 .I M=1 S SG=4 Q
62 ;
63TES4 ;Testis - 4th edition
64 S TNM=T_N_M D K TNM Q
65 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
66 .I N=0,M=0 S SG=1 Q ;I Any T N0 M0
67 .I N=1,M=0 S SG=2 Q ;II Any T N1 M0
68 .I N=2,M=0 S SG=2 Q ; Any T N2 M0
69 .I N=3,M=0 S SG=2 Q ; Any T N3 M0
70 .I M=1 S SG=3 Q ;III Any T Any N M1
71 ;
72TES56 ;Testis - 5th and 6th editions
73 S STM=$P($G(^ONCO(165.5,D0,24)),U,8),STM=$E(STM,2)
74 S TNM=T_N_M_STM D K TNM,TM1,TM2,TM3,STM Q
75 .I TNM="IS000" S SG=0 Q ;0 Tis N0 M0 S0
76 .I TNM="100X" S SG=1 Q ;I T1 N0 M0 SX
77 .I TNM="200X" S SG=1 Q ; T2 N0 M0 SX
78 .I TNM="300X" S SG=1 Q ; T3 N0 M0 SX
79 .I TNM="400X" S SG=1 Q ; T4 N0 M0 SX
80 .I TNM=1000 S SG="1A" Q ;IA T1 N0 M0 S0
81 .I TNM=2000 S SG="1B" Q ;IB T2 N0 M0 S0
82 .I TNM=3000 S SG="1B" Q ; T3 N0 M0 S0
83 .I TNM=4000 S SG="1B" Q ; T4 N0 M0 S0
84 .I N=0,M=0,STM=1 S SG="1S" Q ;IS Any T N0 M0 S1
85 .I N=0,M=0,STM=2 S SG="1S" Q ; Any T N0 M0 S2
86 .I N=0,M=0,STM=3 S SG="1S" Q ; Any T N0 M0 S3
87 .I N=1,M=0,STM="X" S SG=2 Q ;II Any T N1 M0 SX
88 .I N=2,M=0,STM="X" S SG=2 Q ; Any T N2 M0 SX
89 .I N=3,M=0,STM="X" S SG=2 Q ; Any T N3 M0 SX
90 .I N=1,M=0,STM=0 S SG="2A" Q ;IIA Any T N1 M0 S0
91 .I N=1,M=0,STM=1 S SG="2A" Q ; Any T N1 M0 S1
92 .I N=2,M=0,STM=0 S SG="2B" Q ;IIB Any T N2 M0 S0
93 .I N=2,M=0,STM=1 S SG="2B" Q ; Any T N2 M0 S1
94 .I N=3,M=0,STM=0 S SG="2C" Q ;IIC Any T N3 M0 S0
95 .I N=3,M=0,STM=1 S SG="2C" Q ; Any T N3 M0 S1
96 .I M=1,STM="X" S SG=3 Q ;III Any T Any N M1 SX
97 .I M="1A",STM=0 S SG="3A" Q ;IIIA Any T Any N M1a S0
98 .I M="1A",STM=1 S SG="3A" Q ; Any T Any N M1a S1
99 .I N=1,M=0,STM=2 S SG="3B" Q ;IIIB Any T N1 M0 S2
100 .I N=2,M=0,STM=2 S SG="3B" Q ; Any T N2 M0 S2
101 .I N=3,M=0,STM=2 S SG="3B" Q ; Any T N3 M0 S2
102 .I M="1A",STM=2 S SG="3B" Q ; Any T Any N M1a S2
103 .I N=1,M=0,STM=3 S SG="3C" Q ;IIIC Any T N1 M0 S3
104 .I N=2,M=0,STM=3 S SG="3C" Q ; Any T N2 M0 S3
105 .I N=3,M=0,STM=3 S SG="3C" Q ; Any T N3 M0 S3
106 .I M="1A",STM=3 S SG="3C" Q ; Any T Any N M1a S3
107 .I M="1B" S SG="3C" Q ; Any T Any N M1b Any S
108 ;
109KID34 ;Kidney - 3rd and 4th editions
110 K SG
111 I M=1 S SG=4
112 E I M=0 D KIDNM
113 I '$D(SG) S SG=99
114 Q
115KIDNM I (T=4)!(N=2)!(N=3) S SG=4
116 E I T=1,N=0 S SG=1
117 E I T=2,N=0 S SG=2
118 E I (T=1)!(T=2),N=1 S SG=3
119 E I T[3,(N=0)!(N=1) S SG=3
120 Q
121 ;
122KID5 ;Kidney - 5th edition
123 S TNM=T_N_M D K TNM Q
124 .I TNM=100 S SG=1 Q ;I T1 N0 M0
125 .I TNM=200 S SG=2 Q ;II T2 N0 M0
126 .I TNM=110 S SG=3 Q ;III T1 N1 M0
127 .I TNM=210 S SG=3 Q ; T2 N1 M0
128 .I TNM="3A00" S SG=3 Q ; T3a N0 M0
129 .I TNM="3A10" S SG=3 Q ; T3a N1 M0
130 .I TNM="3B00" S SG=3 Q ; T3b N0 M0
131 .I TNM="3B10" S SG=3 Q ; T3b N1 M0
132 .I TNM="3C00" S SG=3 Q ; T3c N0 M0
133 .I TNM="3C10" S SG=3 Q ; T3c N1 M0
134 .I TNM=400 S SG=4 Q ;IV T4 N0 M0
135 .I TNM=410 S SG=4 Q ; T4 N1 M0
136 .;per R-AD 01/13/98
137 .I TNM="4X0",STGIND="P" S SG=4 ; T4 NX M0 (Pathologic staging)
138 .I N=2,M=0 S SG=4 Q ; Any T N2 M0
139 .I M=1 S SG=4 Q ; Any T Any N M1
140 ;
141KID6 ;Kidney - 6th edition
142 S TNM=T_N_M D K TNM Q
143 .I $E(T,1)=1,N=0,M=0 S SG=1 Q ;I T1 N0 M0
144 .I TNM=200 S SG=2 Q ;II T2 N0 M0
145 .I $E(T,1)=1,N=1,M=0 S SG=3 Q ;III T1 N1 M0
146 .I TNM=210 S SG=3 Q ; T2 N1 M0
147 .I TNM=300 S SG=3 Q ; T3 N0 M0
148 .I TNM=310 S SG=3 Q ; T3 N1 M0
149 .I TNM="3A00" S SG=3 Q ; T3a N0 M0
150 .I TNM="3A10" S SG=3 Q ; T3a N1 M0
151 .I TNM="3B00" S SG=3 Q ; T3b N0 M0
152 .I TNM="3B10" S SG=3 Q ; T3b N1 M0
153 .I TNM="3C00" S SG=3 Q ; T3c N0 M0
154 .I TNM="3C10" S SG=3 Q ; T3c N1 M0
155 .I TNM=400 S SG=4 Q ;IV T4 N0 M0
156 .I TNM=410 S SG=4 Q ; T4 N1 M0
157 .;per R-AD 01/13/98
158 .I TNM="4X0",STGIND="P" S SG=4 ; T4 NX M0 (Pathologic staging)
159 .I N=2,M=0 S SG=4 Q ; Any T N2 M0
160 .I M=1 S SG=4 Q ; Any T Any N M1
161 ;
Note: See TracBrowser for help on using the repository browser.