All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edits.seer.internal.rules.IF602.xml Maven / Gradle / Ivy

There is a newer version: 024-13
Show newest version
        <rule id="IF602" name="TNM Path T, Primary Site, Surgery - Ed 7 (COC)" tag="N2266" java-path="lines.line" category="inter-field" depends="Behavior_Code_ICD-O-3,Histologic_Type_ICD-O-3,Primary_Site,RX_Summ--Surg_Prim_Site,TNM_Path_T,Type_of_Reporting_Source,Year_of_Diagnosis">
            <expression><![CDATA[//Skip conditions 1, 2
if (line.dateOfDiagnosisYear == null || line.dateOfDiagnosisYear < '2016' || line.typeOfReportingSource == '7' || line.typeOfReportingSource == '6')
    return true

//Skip conditions 3, 4
if (line.behaviorCodeIcdO3 == '0' || line.behaviorCodeIcdO3 == '1' || line.tnmPathT == null || line.tnmPathT == '88')
    return true

//Skip conditions 5, 6
if (line.rxSummSurgPrimSite == null || (line.tnmEditionNumber != '07' && line.tnmEditionNumber != 'U7'))
    return true

String siteGroup = (String)((Closure)Context.AJCC7CodeLookup16).call(line)
if (siteGroup == '046') {
    if (line.sex == '2' || line.sex == '6')
        siteGroup = '46A'
    else
        siteGroup = '46B'
}

//A.
if (((List)Context.IF602_List1).contains(siteGroup) && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p[23][ABCD]?|p4A?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (((List)Context.IF602_List2).contains(siteGroup) && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p2[ABCD]?|p3[AB]?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (((List)Context.IF602_List3).contains(siteGroup) && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p[23][ABCD]?|p4[ABC]?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '039' && line.tnmPathT == 'p1' && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if ((siteGroup == '027' || siteGroup == '033') && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p2$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '028' && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p2A?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '043' && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p2[ABCD]?|p3[ABC]?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '052' && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p[23][ABCD]?|p4A?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '053' && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p[23][ABCD]?|p4[AB]?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '51A' && Functions.matches(line.tnmPathT, /^p[1234][ABCD]?$/) && (line.rxSummSurgPrimSite < '20' || line.rxSummSurgPrimSite == '99'))
    return false

//B.
if (siteGroup == '041' && Functions.matches(line.tnmPathT, /^p2[ABC]?$/) && (line.rxSummSurgPrimSite < '30' || line.rxSummSurgPrimSite == '99'))
    return false
else if (siteGroup == '045' && Functions.matches(line.tnmPathT, /^p1[ABCD]?|p1MI|p2[ABCD]?|p3[AB]?|p4A?$/) && (line.rxSummSurgPrimSite < '30' || line.rxSummSurgPrimSite == '99'))
    return false

//C.
if (siteGroup == '042' && Functions.matches(line.tnmPathT, /^p[0123]$/) && (line.rxSummSurgPrimSite < '40' || line.rxSummSurgPrimSite == '99'))
    return false

return true]]></expression>
            <message>TNM Path T, Primary Site and Surgery conflict</message>
            <description><![CDATA[This edit is skipped if any of the following conditions are true:

1. Year of Date of Diagnosis is less than 2016, blank (unknown), or invalid
2. Case is autopsy only (Type of Reporting Source = 6) or death certificate only (Type of Reporting Source = 7)
3. Behavior Code ICD-O-3 = 0 (benign) or 1 (borderline)
4. TNM Path T is blank or 88
5. RX Summ--Surg Prim Site is blank
6. TNM Edition Number not = 07, U7


Definitive surgical resection is required for TNM Path T except for the highest T category.

A.  For the following TNM groups and specified TNM Path T codes, RX Summ--Surg Prim Site must be equal to or greater than 20 and not equal 99 (unknown):

1. TNM groups in List 1 (highest pT = 4B):
     TNM Path T = p1-p4A

2. TNM groups in List 2 (highest pT = 3C or 4)
     TNM Path T = p1-p3B

3. TNM groups in List 3 (highest pT = 4D):
     TNM Path T = p1-p4C

4. TNM group Placenta (Chapter 39), the highest pT = 2:
     TNM Path T = p1

5. TNM group Bone (Chapter 27
   TNM group Vulva (Chapter 33), the highest pT = 3:
     TNM Path T = p1-p2

6. TNM group Soft Tissue (Chapter 28), the highest pT = 2B:
     TNM Path T = p1-p2A

7. TNM group Kidney (Chapter 43), the highest pT = 4:
     TNM Path T = p1-p3C

8. TNM group Retinoblastoma (Chapter 52), the highest pT = 4B:
     TNM Path T = p1-p4A

9. TNM group Carcinoma of the Lacrimal Gland (Chapter 53), the highest pT = 4C:
     TNM Path T = p1-p4B

10. TNM group Ciliary Body and Choroid (Chapter 51A), the highest pT = 4E:
     TNM Path T = p1-p4D


B. For the following TNM groups and specified TNM Path T codes, RX Summ--Surg Prim Site must be equal to or greater than 30 and not equal 99 (unknown):

1. TNM group Prostate (Chapter 41), the highest pT = 4.  Prostate is an exception to the rule regarding definitive surgical resection being required for TNM Path T except for the highest T category. AJCC does not allow pathologic staging for T1, and allows pathologic staging based on biopsy for T3 and T4. Definitive surgical resection is required for T2, T2A, T2B, and T2C.
         TNM Path T = p2 - p2C

2. TNM group Urinary Bladder (Chapter 45), the highest pT = 4B:
     TNM Path T = p1-p4A

C.  For TNM group Testis (Chapter 42), for p0, p1, p2, p3, RX Summ--Surg Prim Site must be equal to or greater than 40 and not equal 99 (unknown).


LIST 1  - Highest pT = 4B *************************************
- The number next to each site group indicates the chapter in the AJCC Cancer Staging Manual, Edition 7.

3. Lip and Oral Cavity
4. Pharynx
   4A. Oropharynx and Hypopharynx
   4D. Oropharynx
5. Larynx
   5A. Supraglottis, Subglottis, Other
   5B. Glottis
6. Nasal Cavity and Paranasal Sinuses
7. Major Salivary Glands
8. Thyroid Gland
   8A. Thyroid: Papillary/follicular, age less than 045
   8B. Thyroid: Papillary/follicular, age greater than or equal 045
       but not 999
   8C. Thyroid: Papillary/follicular, age equal 999 (unknown)
   8D. Thyroid: Medullary
   8E. Thyroid: Anaplastic
   8F. Thyroid: Anaplastic
9. Mucosal Melanoma of the Head and Neck
10. Esophagus and Esophagus Gastric Junction
   10A. Esophagus
   10B. Esophagus Gastric Junction
11. Stomach
13A. Appendix: Carcinoma
14. Colon and Rectum
31. Melanoma of the Skin
51. Malignant Melanoma of Uvea
    51B. Iris


LIST 2 - Highest pT = p3C or p4 *********************************
         where next highest is no greater than 3B
4. Pharynx
   4B. Nasopharynx
       Sites: C110, C112-C113, C118-C119
   4C. Nasopharynx
        Sites: C111
       Discriminator (CS Site-Specific Factor25):010
12. Small Intestine
13. Appendix
    13B. Appendix: Carcinoid
15. Anus
16. Gastrointestinal Stromal Tumor (GIST)
    16A. GIST: Gastric
    16B. GIST: Small Intestine
17. Neuroendocrine Tumors (NET)
    17A. NET: Stomach
    17B. NET: Small Intestine and Ampulla of Vater
    17C. NET: Colon and Rectum
20. Gallbladder
21. Perihilar Bile Ducts
22. Distal Bile Duct
23. Ampulla of Vater
24. Exocrine and Endocrine Pancreas
25. Lung
26. Pleural Mesothelioma
29. Cutaneous Squamous Cell Carcinoma and other Cutaneous Carcinomas
30. Merkel Cell Carcinoma
34. Vagina
35. Cervix Uteri
36. Corpus Uteri
36A. Corpus Uteri: Carcinomas
36B. Corpus Uteri: Leiomyosarcoma and Endometrial Stromal Sarcoma
36C. Corpus Uteri: Adenosarcoma
37. Ovary and Peritoneal Carcinomas
37A. Ovary
     Sites: C569
37B. Peritoneal Carcinomas
     Sites: C481-C482, C488 (Sex = 2,female) and
     Discriminator (CS Site-Specific Factor 25) = 002
38. Fallopian Tube
40. Penis
42. Testis
44. Renal Pelvis and Ureter
46. Urethra
    46A. Urethra - Female
    46B. Urethra - not Female
47. Adrenal
47A. Adrenal Cortex
47B. Adrenal Cortical Carcinoma
48. Carcinoma of the Eyelid
50. Malignant Melanoma of the Conjunctiva
54. Sarcoma of the Orbit
57. Lymphoid Neoplasms
    57B. Primary Cutaneous Lymphomas


LIST 3 - Highest pT = p4D *********************************

32. Breast
49. Conjunctiva
55. Ocular Adnexal Lymphoma]]></description>
            <history>
                <event version="SE16-015-01" user="kirbyk" date="2016-06-08" ref="67435">Edit created.</event>
                <event version="SE16-016-01" user="kirbyk" date="2017-01-18" ref="67611">Added skip condition for TNM Edition Number.</event>
                <event version="SE16-016-02" user="kirbyk" date="2017-02-14" ref="67637">Removed Liver (018) and Intrahepatic Bile Duct (019) checks from edit.</event>
                <event version="SE16-016-08" user="depryf" date="2017-11-22" ref="67674">Edit syntax updated to allow pre-compilation optimization; no change in behavior.</event>
                <event version="SE18-018-02" user="schadega" date="2018-05-18" ref="67743">Name change.</event>
                <event version="SE18-020-01" user="depryf" date="2020-02-04" ref="68281">Changed property names to align with NAACCR XML IDs.</event>
            </history>
        </rule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy