source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCCSSTF.m@ 1259

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

initial load of WorldVistAEHR

File size: 8.4 KB
Line 
1ONCCSSTF ;Hines OIFO/GWB - COLLABORATIVE STAGING STUFFING; 01/07/04
2 ;;2.11;ONCOLOGY;**40,43,46**;Mar 07, 1995;Build 39
3 ;
4 Q:$G(TOP)=""
5 S MO=$$HIST^ONCFUNC(D0)
6 S MM="NO"
7 I $$MELANOMA^ONCOU55(D0) D
8 .S:$P($G(^ONCO(165.5,D0,"CS")),U,5)="" $P(^ONCO(165.5,D0,"CS"),U,5)=$P($G(^ONCO(165.5,D0,2)),U,9)
9 E D
10 .S:$P($G(^ONCO(165.5,D0,"CS1")),U,10)="" $P(^ONCO(165.5,D0,"CS1"),U,10)=$P($G(^ONCO(165.5,D0,2)),U,9)
11 ;
12 ;Pharynx, NOS, Other Ill-Defined Oral Cavity Sites
13 I (TOP=67140)!(TOP=67142)!(TOP=67148) D EVAL9
14 ;Other & Ill-defined Digestive Organs
15 I ($E(TOP,3,4)=26) D EVAL9
16 ;Middle Ear
17 I TOP=67301 D EVAL9
18 ;Accessory (Paranasal) Sinuses
19 I (TOP=67312)!(TOP=67313)!(TOP=67318)!(TOP=67319) D EVAL9
20 ;Trachea
21 I TOP=67339 D EVAL9
22 ;Other & Ill-Defined Respiratory Sites & Intrathoracic Organs
23 I (TOP=67390)!(TOP=67398)!(TOP=67399) D EVAL9
24 ;Broad & Round Ligaments, Parametrium, Uterine Adnexa
25 I (TOP=67571)!(TOP=67572)!(TOP=67573)!(TOP=67574) D EVAL9
26 ;Other & Unspecified Female Genital Organs
27 I (TOP=67577)!(TOP=67578)!(TOP=67579) D EVAL9
28 ;Prostate
29 I TOP=67619 D
30 .S:$P($G(^ONCO(165.5,D0,2.2)),U,2)=99 $P(^ONCO(165.5,D0,"CS"),U,7)="097"
31 .S GS=$$GET1^DIQ(165.5,D0,623)
32 .I GS'="" S GS=$S(GS="02":"002",GS="03":"003",GS="04":"004",GS="05":"005",GS="06":"006",GS="07":"007",GS="08":"008",GS="09":"009",GS="10":"010",1:"") S $P(^ONCO(165.5,D0,"CS"),U,10)=GS
33 ;Other & Unspecified Male Genital Organs
34 I ($E(TOP,3,4)=63) D EVAL9
35 ;Paraurethral Gland, Overlapping Lesion of Urinary Organs, &
36 ;Unspecified Urinary Organs
37 I (TOP=67681)!(TOP=67688)!(TOP=67689) D EVAL9
38 ;Cornea, Retina, Choroid, Ciliary Body, Eyeball, Overlapping &
39 ;Other Eye
40 I '$$MELANOMA^ONCOU55(D0),(TOP=67691)!(TOP=67692)!(TOP=67693)!(TOP=67694)!(TOP=67698)!(TOP=67699) D EVAL9
41 ;Brain & Cerebral Meninges
42 I (TOP=67700)!($E(TOP,3,4)=71) D EVAL9,LN
43 ;Other Parts of CNS
44 I (TOP=67701)!(TOP=67709)!($E(TOP,3,4)=72) D EVAL9,LN
45 ;Thymus, Adrenal (Suprarenal) Gland, & Other Endocrine Glands
46 I (TOP=67379)!($E(TOP,3,4)=74)!($E(TOP,3,4)=75) D EVAL9
47 ;
48MM ;Malignant Melanoma of Skin, Vulva, Penis, Scrotum
49 I $$MELANOMA^ONCOU55(D0),($E(TOP,3,4)=44)!($E(TOP,3,4)=51)!($E(TOP,3,4)=60)!(TOP=67632) D SSF56 Q
50 ;Malignant Melanoma of Conjunctiva
51 I $$MELANOMA^ONCOU55(D0),TOP=67690 S MM="YES" G SSF26
52 ;Malignant Melanoma of Iris & Ciliary Body
53 I $$MELANOMA^ONCOU55(D0),TOP=67694 S MM="YES" G SSF26
54 ;Malignant Melanoma of Choroid
55 I $$MELANOMA^ONCOU55(D0),TOP=67693 S MM="YES" G SSF26
56 ;Malignant Melanoma of Other Eye
57 I $$MELANOMA^ONCOU55(D0),(TOP=67691)!(TOP=67692)!(TOP=67695)!(TOP=67698)!(TOP=67699) D SSF168 Q
58MFSD ;Mycosis Fungoides and Sezary Disease of Skin, Vulva, Penis, Scrotum
59 I (MO=97003)!(MO=97013),($E(TOP,3,4)=44)!($E(TOP,3,4)=51)!($E(TOP,3,4)=60)!(TOP=67632) D SSF26 Q
60RET ;Retinoblastoma
61 I $E(MO,1,3)=951,($E(TOP,3,4)=69) S MM="YES" G SSF26
62 ;Kaposi Sarcoma of All Sites (9140)
63 I MO=91403 D D EVAL9 S MM="YES" G SSF26
64 .S $P(^ONCO(165.5,D0,"CS1"),U,10)=888
65 .S $P(^ONCO(165.5,D0,"CS"),U,3)=88
66LYMPH ;Hodgkin & Non-Hodgkin Lymphomas of All Sites
67 ;(excl. Mycosis Fungoides & Sezary Disease)
68 I $$LYMPHOMA^ONCFUNC(D0),MO'=97003,MO'=97013 D LN D Q
69 .S $P(^ONCO(165.5,D0,"CS1"),U,10)=888
70 .S $P(^ONCO(165.5,D0,"CS"),U,2)=9
71 .S $P(^ONCO(165.5,D0,"CS"),U,4)=9
72 .S $P(^ONCO(165.5,D0,"CS"),U,3)=88
73 .S $P(^ONCO(165.5,D0,"CS"),U,8)=888
74 .S $P(^ONCO(165.5,D0,"CS"),U,9)=888
75 .S $P(^ONCO(165.5,D0,"CS"),U,10)=888
76HRIMN ;Hematopoietic, Reticuloendothelial, Immunoproliferative, &
77 ;Myeloproliferative Neoplasms
78 I (MO'<97310)&(MO'>99899) D EVAL9,LN,SSF168 D Q
79 .S $P(^ONCO(165.5,D0,"CS1"),U,10)=888
80 .S $P(^ONCO(165.5,D0,"CS"),U,3)=88
81 .;EXTENSION (CS) (165.5,30.2) stuffing with 80 (Systemic disease)
82 .I (MO'=97313)&($E(MO,1,4)'=9740)&($E(MO,1,4)'=9750)&($E(MO,1,4)'=9755)&($E(MO,1,4)'=9756)&($E(MO,1,4)'=9757)&($E(MO,1,4)'=9758)&($E(MO,1,4)'=9930) D
83 ..S $P(^ONCO(165.5,D0,"CS"),U,11)=80
84 ;
85SSF16 ;SITE-SPECIFIC FACTOR 1-6 = 888 (Not applicable for this site)
86 ;Esophagus
87 I ($E(TOP,3,4)=15) D SSF168 Q
88 ;Stomach
89 I ($E(TOP,3,4)=16) D SSF168 Q
90 ;Small Intestine
91 I ($E(TOP,3,4)=17) D SSF168 Q
92 ;Anus
93 I ($E(TOP,3,4)=21) D SSF168 Q
94 ;Gallbladder
95 I TOP=67239 D SSF168 Q
96 ;Extrahepatic Bile Duct(s)
97 I TOP=67240 D SSF168 Q
98 ;Ampulla of Vater
99 I TOP=67241 D SSF168 Q
100 ;Other Biliary & Biliary, NOS
101 I (TOP=67248)!(TOP=67249) D SSF168 Q
102 ;Pancreas: Head
103 I TOP=67250 D SSF168 Q
104 ;Pancreas: Body & Tail
105 I (TOP=67251)!(TOP=67252) D SSF168 Q
106 ;Pancreas: Other & Unspecified
107 I (TOP=67253)!(TOP=67254)!(TOP=67257)!(TOP=67258)!(TOP=67259) D SSF168 Q
108 ;Other & Ill-defined Digestive Organs
109 I (TOP=67260)!(TOP=6728)!(TOP=67269) D SSF168 Q
110 ;Trachea
111 I TOP=67339 D SSF168 Q
112 ;Lung
113 I ($E(TOP,3,4)=34) D SSF168 Q
114 ;Heart, Mediastinum
115 I (TOP=67380)!(TOP=67381)!(TOP=67382)!(TOP=67383)!(TOP=67388) D SSF168 Q
116 ;Other & Ill-Defined Respiratory Sites & Intrathoracic Organs
117 I (TOP=67390)!(TOP=67398)!(TOP=67399) D SSF168 Q
118 ;Bone
119 I ($E(TOP,3,4)=40)!($E(TOP,3,4)=41) D SSF168 Q
120 ;Skin
121 ;(excl. Mycosis Fungoides & Sezary Disease)
122 I (TOP=67440)!(TOP=67442)!(TOP=67443)!(TOP=67444)!(TOP=67445)!(TOP=67446)!(TOP=67447)!(TOP=67448)!(TOP=67449),MO'=97003,MO'=97013 D SSF168 Q
123 ;Skin of Eylid
124 I TOP=67441 D SSF168 Q
125 ;Peripheral Nerves & Autonomic Nervous System;
126 ;Connective, Subcutaneous, & Other Soft Tissues
127 I ($E(TOP,3,4)=47)!($E(TOP,3,4)=49) D SSF168 Q
128 ;Retroperitoneum & Peritoneum
129 I ($E(TOP,3,4)=48) D SSF168 Q
130 ;Vulva
131 I ($E(TOP,3,4)=51) D SSF168 Q
132 ;Vagina
133 I TOP=67529 D SSF168 Q
134 ;Cervix Uteri
135 I ($E(TOP,3,4)=53) D SSF168 Q
136 ;Corpus Uteri; Uterus, NOS
137 I ($E(TOP,3,4)=54)!(TOP=67559) D SSF168 Q
138 ;Fallopian Tube
139 I TOP=67570 D SSF168 Q
140 ;Broad & Round Ligaments, Parametrium, Uterine Adnexa
141 I (TOP=67571)!(TOP=67572)!(TOP=67573)!(TOP=67574) D SSF168 Q
142 ;Other & Unspecified Female Genital Organs
143 I (TOP=67577)!(TOP=67578)!(TOP=67579) D SSF168 Q
144 ;Penis
145 I ($E(TOP,3,4)=60) D SSF168 Q
146 ;Other & Unspecified Male Genital Organs
147 I ($E(TOP,3,4)=63) D SSF168 Q
148 ;Scrotum
149 I TOP=67632 D SSF168 Q
150 ;Kidney (Renal Parenchyma)
151 I TOP=67649 D SSF168 Q
152 ;Renal Pelvis & Ureter
153 I (TOP=67659)!(TOP=67669) D SSF168 Q
154 ;Bladder
155 I ($E(TOP,3,4)=67) D SSF168 Q
156 ;Urethra
157 I TOP=67680 D SSF168 Q
158 ;Paraurethral Gland, Overlapping Lesion of Urinary Organs, &
159 ;Unspecified Urinary Organs
160 I (TOP=67681)!(TOP=67688)!(TOP=67689) D SSF168 Q
161 ;Conjunctiva
162 I TOP=67690 D SSF168 Q
163 ;Cornea, Retina, Choroid, Ciliary Body, Eyeball, Overlapping &
164 ;Other Eye
165 I (TOP=67691)!(TOP=67692)!(TOP=67693)!(TOP=67694)!(TOP=67698)!(TOP=67699) D SSF168 Q
166 ;Lacrimal Gland
167 I TOP=67695 D SSF168 Q
168 ;Orbit
169 I TOP=67696 D SSF168 Q
170 ;Other & Ill-Defined Sites, Unknown Primary Site
171 I ($E(TOP,3,4)=42)!($E(TOP,3,4)=76)!($E(TOP,3,4)=77)!(TOP=67809) D EVAL9,LN,SSF168 D Q
172 .S $P(^ONCO(165.5,D0,"CS"),U,11)=88
173 .S $P(^ONCO(165.5,D0,"CS"),U,3)=88
174 ;
175SSF26 ;SITE-SPECIFIC FACTOR 2-6 = 888 (Not applicable for this site)
176 ;Colon
177 ;Rectosigmoid, Rectum
178 ;Pleura
179 ;Mycosis Fungoides & Sezary Disease (9700-9701)
180 ;Ovary
181 ;Placenta
182 I TOP=67589 D LN S $P(^ONCO(165.5,D0,"CS"),U,2)=9
183 ;Brain & Cerebral Meninges
184 ;Other Parts of CNS
185 ;Thyroid
186 ;Thymus, Adrenal (Suprarenal) Gland, & Other Endocrine Glands
187 I ($E(TOP,3,4)=18)!(TOP=67199)!(TOP=67209)!(TOP=67384)!(MO=97003)!(MO=97013)!(TOP=67569)!(TOP=67589)!(MM="YES")!(TOP=67700)!($E(TOP,3,4)=71)!(TOP=67701)!(TOP=67709)!($E(TOP,3,4)=72)!(TOP=67739)!(TOP=67379)!($E(TOP,3,4)=74)!($E(TOP,3,4)=75) D Q
188 .S $P(^ONCO(165.5,D0,"CS"),U,6)=888
189 .S $P(^ONCO(165.5,D0,"CS"),U,7)=888
190 .S $P(^ONCO(165.5,D0,"CS"),U,8)=888
191 .S $P(^ONCO(165.5,D0,"CS"),U,9)=888
192 .S $P(^ONCO(165.5,D0,"CS"),U,10)=888
193 ;
194SSF36 ;SITE-SPECIFIC FACTOR 3-6 = 888 (Not applicable for this site)
195 ;Liver & Intrahepatic Bile Ducts
196 I ($E(TOP,3,4)=22) D Q
197 .S $P(^ONCO(165.5,D0,"CS"),U,7)=888
198 .S $P(^ONCO(165.5,D0,"CS"),U,8)=888
199 .S $P(^ONCO(165.5,D0,"CS"),U,9)=888
200 .S $P(^ONCO(165.5,D0,"CS"),U,10)=888
201 ;
202SSF6 ;SITE-SPECIFIC FACTOR 6 = 888 (Not applicable for this site)
203 ;Testis
204 I ($E(TOP,3,4)=62) D Q
205 .S $P(^ONCO(165.5,D0,"CS"),U,10)=888
206 ;
207 Q
208 ;
209EVAL9 S $P(^ONCO(165.5,D0,"CS"),U,1)=9
210 S $P(^ONCO(165.5,D0,"CS"),U,2)=9
211 S $P(^ONCO(165.5,D0,"CS"),U,4)=9
212 Q
213 ;
214SSF168 S $P(^ONCO(165.5,D0,"CS"),U,5)=888
215 S $P(^ONCO(165.5,D0,"CS"),U,6)=888
216 S $P(^ONCO(165.5,D0,"CS"),U,7)=888
217 S $P(^ONCO(165.5,D0,"CS"),U,8)=888
218 S $P(^ONCO(165.5,D0,"CS"),U,9)=888
219 S $P(^ONCO(165.5,D0,"CS"),U,10)=888
220 Q
221 ;
222SSF56 ;SITE-SPECIFIC FACTOR 5-6 = 888 (Not applicable for this site)
223 S $P(^ONCO(165.5,D0,"CS"),U,9)=888
224 S $P(^ONCO(165.5,D0,"CS"),U,10)=888
225 Q
226 ;
227LN S $P(^ONCO(165.5,D0,"CS"),U,12)=88
228 S $P(^ONCO(165.5,D0,2),U,12)=99
229 S $P(^ONCO(165.5,D0,2),U,13)=99
230 Q
Note: See TracBrowser for help on using the repository browser.