source: FOIAVistA/trunk/r/ONCOLOGY-ONC/ONCSG2.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: 5.4 KB
Line 
1ONCSG2 ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;07/15/02
2 ;;2.11;ONCOLOGY;**35,36**;Mar 07, 1995
3 ;
4 ;THORAX
5 ;
6LUN34 ;Lung - 3rd and 4th editions
7 S SG=99
8 I M=1 S SG=4
9 E I M=0 D
10 .I T=4 S SG="3B"
11 .E I N=3 S SG="3B"
12 .E I N=2 S SG=$S(T=1:"3A",T=2:"3A",T=3:"3A",1:99)
13 .E I N=1 S SG=$S(T=1:2,T=2:2,T=3:"3A",1:99)
14 .E I N=0 S SG=$S(T="X":"0C",T="IS":0,T=1:1,T=2:1,T=3:"3A",1:99)
15 Q
16 ;
17LUN56 ;Lung - 5th and 6th editions
18 S TNM=T_N_M D K TNM Q
19 .I TNM="X00" S SG="0C" Q ;Occult Tx N0 M0
20 .I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
21 .I TNM=100 S SG="1A" Q ;IA T1 N0 M0
22 .I TNM=200 S SG="1B" Q ;IB T2 N0 M0
23 .I TNM=110 S SG="2A" Q ;IIA T1 N1 M0
24 .I TNM=210 S SG="2B" Q ;IIB T2 N1 M0
25 .I TNM=300 S SG="2B" Q ; T3 N0 M0
26 .I TNM=120 S SG="3A" Q ;IIIA T1 N2 M0
27 .I TNM=220 S SG="3A" Q ; T2 N2 M0
28 .I TNM=310 S SG="3A" Q ; T3 N1 M0
29 .I TNM=320 S SG="3A" Q ; T3 N2 M0
30 .I N=3,M=0 S SG="3B" Q ;IIIB Any T N3 M0
31 .I T=4,M=0 S SG="3B" Q ; T4 Any N M0
32 .I M=1 S SG=4 Q ;IV Any T Any N M1
33 ;
34PM45 ;Pleural Mesothelioma - 4th and 5th editions
35 I M S SG=4
36 E I T[4,M[0 S SG=4
37 E I N[3,M[0 S SG=4
38 E I (T[1)!(T[2),N[0,M[0 S SG=1
39 E I (T[1)!(T[2),N[1,M[0 S SG=2
40 E I (T[1)!(T[2),N[2,M[0 S SG=3
41 E I T[3,(N[0)!(N[1)!(N[2),M[0 S SG=3
42 E S SG=99
43 Q
44 ;
45PM6 ;Pleural Mesothelioma - 6th edition
46 S TNM=T_N_M D K TNM Q
47 .I TNM=100 S SG=1 Q ;I T1 N0 M0
48 .I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
49 .I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
50 .I TNM=200 S SG=2 Q ;II T2 N0 M0
51 .I TNM=110 S SG=3 Q ;III T1 N1 M0
52 .I TNM=210 S SG=3 Q ; T2 N1 M0
53 .I TNM=120 S SG=3 Q ; T1 N2 M0
54 .I TNM=220 S SG=3 Q ; T2 N2 M0
55 .I TNM=300 S SG=3 Q ; T3 N0 M0
56 .I TNM=310 S SG=3 Q ; T3 N1 M0
57 .I TNM=320 S SG=3 Q ; T3 N2 M0
58 .I T=4,M=0 S SG=4 Q ;IV T4 Any N M0
59 .I N=3,M=0 S SG=4 Q ; Any T N3 M0
60 .I M=1 S SG=4 Q ; Any T Any N M1
61 ;
62 ;MUSCULOSKELETAL SITES
63 ;
64BONE345 ;Bone - 3rd, 4th and 5th editions
65 K SG
66 I M=1 S SG="4B"
67 E I M=0 D
68 .I N=1 S SG="4A"
69 .E I N=0 D BONLG
70 I '$D(SG) S SG=99
71 Q
72 ;
73BONLG ;Bone - 3rd, 4th and 5th editions (continued)
74 I (G=1)!(G=2) D
75 .I T=1 S SG="1A"
76 .E I T=2 S SG="1B"
77 E I (G=3)!(G=4) D
78 .I T=1 S SG="2A"
79 .E I T=2 S SG="2B"
80 Q
81 ;
82BONE6 ;Bone - 6th edition
83 S TNM=T_N_M D K TNM Q
84 .I ((G=1)!(G=2))&(TNM=100) S SG="1A" Q ;IA T1 N0 M0 G1,2
85 .I ((G=1)!(G=2))&(TNM=200) S SG="1B" Q ;IB T2 N0 M0 G1,2
86 .I ((G=3)!(G=4))&(TNM=100) S SG="2A" Q ;IIA T1 N0 M0 G3,4
87 .I ((G=3)!(G=4))&(TNM=200) S SG="2B" Q ;IIB T2 N0 M0 G3,4
88 .I TNM=300 S SG=3 Q ;III T3 N0 M0 Any G
89 .I N=0,M="1A" S SG="4A" Q ;IVA Any T N0 M1a Any G
90 .I N=1 S SG="4B" Q ;IVB Any T N1 Any M Any G
91 .I M="1B" S SG="4B" Q ; Any T Any N M1b Any G
92 ;
93STS34 ;Soft Tissue Sarcoma - 3rd and 4th editions
94 I $E(M)=1 S SG="4B"
95 E I $E(M)=0 D
96 .I $E(N)=1 S SG="4A"
97 .E I $E(N)=0,(G=1)!(G=2)!(G=3)!(G=4),(T=1)!(T=2) S SG=$S(G=1:1,G=2:2,1:3)_$S(T=1:"A",1:"B")
98 I '$D(SG) S SG=99
99 Q
100 ;
101STS5 ;Soft Tissue Sarcoma - 5th edition
102 S TNM=T_N_M D K TNM Q
103 .I ((G=1)!(G=2))&(TNM="1A00") S SG="1A" Q ;IA G1-2 T1a N0 M0
104 .I ((G=1)!(G=2))&(TNM="1B00") S SG="1A" Q ; T1b N0 M0
105 .I ((G=1)!(G=2))&(TNM="2A00") S SG="1B" Q ;IB G1-2 T2a N0 M0
106 .I ((G=1)!(G=2))&(TNM="2B00") S SG="2A" Q ;IIA G1-2 T2b N0 M0
107 .I ((G=3)!(G=4))&(TNM="1A00") S SG="2B" Q ;IIB G3-4 T1a N0 M0
108 .I ((G=3)!(G=4))&(TNM="1B00") S SG="2B" Q ; T1b N0 M0
109 .I ((G=3)!(G=4))&(TNM="2A00") S SG="2C" Q ;IIC G3-4 T2a N0 M0
110 .I ((G=3)!(G=4))&(TNM="2B00") S SG=3 Q ;III G3-4 T2b N0 M0
111 .I N=1,M=0 S SG=4 Q ;IV Any G Any T N1 M0
112 .I N=0,M=1 S SG=4 Q ;IV Any G Any T N0 M1
113 .I N=1,M=1 S SG=4 Q ;IV Any G Any T N1 M1
114 ;
115STS6 ;Soft Tissue Sarcoma - 6th edition
116 S TNM=T_N_M D K TNM Q
117 .I ((G=1)!(G=2))&(TNM="1A00") S SG="1A" Q ;IA T1a N0 M0 G1-2
118 .I ((G=1)!(G=2))&(TNM="1AX0") S SG="1A" Q ; T1a NX M0 G1-2
119 .I ((G=1)!(G=2))&(TNM="1B00") S SG="1A" Q ; T1b N0 M0 G1-2
120 .I ((G=1)!(G=2))&(TNM="1BX0") S SG="1A" Q ; T1b NX M0 G1-2
121 .I ((G=1)!(G=2))&(TNM="2A00") S SG="1B" Q ;IB T2a N0 M0 G1-2
122 .I ((G=1)!(G=2))&(TNM="2AX0") S SG="1B" Q ; T2a NX M0 G1-2
123 .I ((G=1)!(G=2))&(TNM="2B00") S SG="1B" Q ; T2b N0 M0 G1-2
124 .I ((G=1)!(G=2))&(TNM="2BX0") S SG="1B" Q ; T2b NX M0 G1-2
125 .I ((G=3)!(G=4))&(TNM="1A00") S SG="2A" Q ;IIA T1a N0 M0 G3-4
126 .I ((G=3)!(G=4))&(TNM="1AX0") S SG="2A" Q ; T1a NX M0 G3-4
127 .I ((G=3)!(G=4))&(TNM="1B00") S SG="2A" Q ; T1b N0 M0 G3-4
128 .I ((G=3)!(G=4))&(TNM="1BX0") S SG="2A" Q ; T1b NX M0 G3-4
129 .I ((G=3)!(G=4))&(TNM="2A00") S SG="2B" Q ;IIB T2a N0 M0 G3-4
130 .I ((G=3)!(G=4))&(TNM="2AX0") S SG="2B" Q ; T2a NX M0 G3-4
131 .I ((G=3)!(G=4))&(TNM="2B00") S SG=3 Q ;III T2b N0 M0 G3-4
132 .I ((G=3)!(G=4))&(TNM="2BX0") S SG=3 Q ; T2b NX M0 G3-4
133 .I N=1,M=0 S SG=4 Q ;IV Any T N1 M0 Any G
134 .I N=0,M=1 S SG=4 Q ; Any T N0 M1 Any G
135 .I N=1,M=1 S SG=4 Q ; Any T N1 M1 Any G
Note: See TracBrowser for help on using the repository browser.