ONCSCHMC ;HINES OIFO/RTK - Schema derivation, related code continued ;04/27/18
;;2.2;ONCOLOGY;**10,12,15,17,18**;Jul 31, 2013;Build 5
;
; go through until hit is found, else return ONCSCMA=0
;
;MEDULLABLASTOMA:
;https://staging.seer.cancer.gov/eod_public/schema/3.0/medulloblastoma_v9_2023/
I ((ONCT3>699)&(ONCT3<730)) D I ONCSCMA'=0 Q
.I (HST14=9362)!((HST14>9469)&(HST14<9473))!((HST14>9473)&(HST14<9479))!((HST14>9500)&(HST14<9505))!(HST14=9508) S ONCSCMA="09724"
I ((ONCT3>699)&(ONCT3<723))!((ONCT3>723)&(ONCT3<730)) D I ONCSCMA'=0 Q
.I (HST14=9473) S ONCSCMA="09724"
I ONCTPCD="C753" D I ONCSCMA'=0 Q
.I (HST14=9362) S ONCSCMA="09724"
;
;MELANOMA CHOROID & CILIARY: C693 H8720-8790
; or C694 H8720-8790 DISCRIM1=1
I ONCTPCD="C693" D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00672"
I ONCTPCD="C694" D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) D
..I ONCSDIS1=1 S ONCSCMA="00672"
;
;MELANOMA CONJUNCTIVA: C690 H8720-8790
I ONCTPCD="C690" D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00660"
;
;MELANOMA HEAD & NECK: C003-C005,C008-C009,C019,C020-C024,C028-C029,
; C030-C031,C039,C040-C041,C048-C049,C050-C052,C058-C059,C060-C062,
; C090-C191,C098-C099,C100-C104,C108-C109,C110-C113,C118-C119,C129,
; C130-C132,C138-C139,C140,C142,C148,C300-C313,C318-C319,C320-C323,
; C328-C329 H8720-8790
I ((ONCT3>2)&(ONCT3<6))!((ONCT3>7)&(ONCT3<10))!(ONCT3="019")!((ONCT3>19)&(ONCT3<25))!((ONCT3>27)&(ONCT3<32))!((ONCT3>38)&(ONCT3<42))!((ONCT3>47)&(ONCT3<53)) D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00140"
I ((ONCT3>57)&(ONCT3<63))!(ONCT3="068")!(ONCT3="069")!(ONCT3="090")!(ONCT3="091")!((ONCT3>97)&(ONCT3<105))!((ONCT3>107)&(ONCT3<114))!(ONCT3=118)!(ONCT3=119)!((ONCT3>128)&(ONCT3<133)) D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00140"
I ((ONCT3>137)&(ONCT3<141))!(ONCT3=142)!(ONCT3=148)!((ONCT3>299)&(ONCT3<314))!(ONCT3=318)!(ONCT3=319)!((ONCT3>319)&(ONCT3<324))!(ONCT3=328)!(ONCT3=329) D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00140"
;
;MELANOMA IRIS: C694 H8720-8790
I ONCTPCD="C694" D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00671"
;
;MELANOMA SKIN: C000-C002,C006,C440-C449,C500,C510-C512,C518-C519
; C600-C602,C608-C609,C632 H8720-8790
I (ONCT3="000")!((ONCT3>0)&(ONCT3<3))!(ONCT3="006")!((ONCT3>439)&(ONCT3<450))!(ONCT3=500)!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632) D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00470"
;
;MERKEL CELL SKIN: C000-C006,C008,C009,C440-C449,C510-C512,C518-C519
; C600-C602,C608-C609,C632,C809 H8041,8190,8247
I (ONCT3="000")!((ONCT3>0)&(ONCT3<7))!(ONCT3="008")!((ONCT3>439)&(ONCT3<450))!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632)!(ONCT3=809) D I ONCSCMA'=0 Q
.I (HST14=8041)!(HST14=8190)!(HST14=8247) S ONCSCMA="00460"
;
;MIDDLE EAR: C301 H8000-8700,9700,9701
I ONCTPCD="C301" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00119"
;
;MOUTH OTHER: C058-C059,C068-C069 H8000-8700,8982,9700,9701
I "C058^C059^C068^C069^"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00077"
;
;MYCOSIS FUNGOIDES: C000-C002,C006,C440-C449,C510-C512,C518-C519,C600-C602,C608-C609,C632 H9700,9701
I (ONCT3="000")!((ONCT3>0)&(ONCT3<3))!(ONCT3="006")!((ONCT3>439)&(ONCT3<450))!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632) D I ONCSCMA'=0 Q
.I (HST14=9700)!(HST14=9701) S ONCSCMA="00811"
;
;NASAL CAVITY AND ETHMOID SINUS: C300,C311 H8000-8700,8982,9700,9701
I "C300^C311"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00122"
;
;NASOPHARYNX: C110,C112-C113,C118-C119 H8000-8700,9700,9701
; or C111 H8000-8700,9700,9701 DISCR1=1
I "C110^C112^C113^C118^C119"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00090"
I ONCTPCD="C111" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I ONCSDIS1=1 S ONCSCMA="00090"
;
;NET ADRENAL GLAND: C740,C741,C749,C755 H8680,8690,8692,8693,8700
I "C740^C741^C749^C755"[ONCTPCD D I ONCSCMA'=0 Q
.I (HST14=8680)!(HST14=8690)!(HST14=8692)!(HST14=8693)!(HST14=8700) S ONCSCMA="00770"
;
;NET AMPULLA OF VATER: C241 H8150-8153,8155-56,8158,8240-8242,8249,8683
I ONCTPCD="C241" D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00302"
;
;NET APPENDIX: C181 H8150-8153,8155-56,8158,8240-8242,8249,8683
I ONCTPCD="C181" D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00320"
;
;NET COLON AND RECTUM: C180,C182-C189,C199,C209 H8150-8153,8155-56,8158
; 8240-8242,8249,8683
I "C180^C182^C183^C184^C185^C186^C187^C188^C189^C199^C209"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00330"
;
;NET DUODENUM: C170 H8150-8153,8155-56,8158,8240-8242,8249,8683
I ONCTPCD="C170" D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00301"
;
;NET JEJUNUM AND ILEUM: C171-C173,C178-C179 H8150-8153,8155-56,8158
; 8240-8242,8249,8683
I "C171^C172^C173^C178^C179"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00310"
;
;NET PANCREAS: C250-C254,C257-C259 H8150-8153,8155-56,8158,8240-8242
; 8249,8683
I "C250^C251^C252^C253^C254^C257^C258^C259"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00340"
;
;NET STOMACH: C160-C166,C168-C169 H8150-8153,8155-56,8158,8240-8242
; 8249,8683
I "C160^C161^C162^C163^C164^C165^C166^C168^C169"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683) S ONCSCMA="00290"
;
;ORBITAL SARCOMA: C690-C694,C696,C698-C699 H8710-8714,8800-8921,8932-34
; 8940-8990,9000-9016,9030-9137,9141-9175,9181-9230,9240-9509,9520-9582
; or C695 H8710-8714,8800-8921,8932-8934,8940,8950-8975,8981,8983-8990
; 9000-9016,9030-9137,9141-9175,9181-9230,9240-9509,9520-9582
; or C723 H8710-8714,8800-8921,8932-8934,8940-8990,9000-9016,9030-9063
; 9065,9071-9073,9081-9083,9086-9091,9101-9137,9141-9175,9181-9230
; 9240-9361,9363-9381,9383-9384,9394,9410,9412-9423,9431-9432,9444
; 9460,9472-9473,9480,9491-9500,9502-9504,9506-9507,9509,9520-9537
; 9539-9582
; (remove 9222 from 00700 schema for NAACCR 2022 p17)
I "C690^C691^C692^C693^C694^C696^C698^C699"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!((HST14>9029)&(HST14<9138)) S ONCSCMA="00700" Q
.I ((HST14>9140)&(HST14<9176))!((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9510))!((HST14>9519)&(HST14<9583)) S ONCSCMA="00700" Q
I ONCTPCD="C695" D I ONCSCMA'=0 Q
.I ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!(HST14=8940)!((HST14>8949)&(HST14<8976))!(HST14=8981)!((HST14>8982)&(HST14<8991))!((HST14>8999)&(HST14<9017)) S ONCSCMA="00700" Q
.I ((HST14>9029)&(HST14<9138))!((HST14>9140)&(HST14<9176))!((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9510))!((HST14>9519)&(HST14<9583)) S ONCSCMA="00700" Q
I ONCTPCD="C723" D I ONCSCMA'=0 Q
.I ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017)) S ONCSCMA="00700" Q
.I ((HST14>9029)&(HST14<9064))!(HST14=9065)!((HST14>9070)&(HST14<9074))!((HST14>9080)&(HST14<9084))!((HST14>9085)&(HST14<9092))!((HST14>9100)&(HST14<9138))!((HST14>9140)&(HST14<9176)) S ONCSCMA="00700" Q
.I ((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9362))!((HST14>9362)&(HST14<9382))!(HST14=9383)!(HST14=9384)!(HST14=9394)!(HST14=9410)!((HST14>9411)&(HST14<9424))!(HST14=9431)!(HST14=9432) S ONCSCMA="00700" Q
.I (HST14=9444)!(HST14=9460)!(HST14=9472)!(HST14=9473)!(HST14=9480)!((HST14>9490)&(HST14<9501))!((HST14>9501)&(HST14<9505))!(HST14=9506)!(HST14=9507)!(HST14=9509)!((HST14>9519)&(HST14<9538))!((HST14>9538)&(HST14<9583)) S ONCSCMA="00700" Q
;
;OROPHARYNX (P16-): C019,C024,C051,C052,C090,C091,C098,C099,C100,C102-C104
; C108,C109 H8000-8700,9700,9701 DISCR2=1,9
; or C111 H8000-8700,9700,9701 DISCR1=2 AND DISCR2=1,9
I "C019^C024^C051^C052^C090^C091^C098^C099^C100^C102^C103^C104^C108^C109"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I ((ONCSDIS2=1)!(ONCSDIS2=9)) S ONCSCMA="00111"
I ONCTPCD="C111" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I (ONCSDIS1=2)&((ONCSDIS2=1)!(ONCSDIS2=9)) S ONCSCMA="00111"
;
;OROPHARYNX HPV-MEDIATED (P16+): C019,C024,C051,C052,C090,C091,C098,C099
; C100,C102-C104,C108,C109 H8000-8700,9700,9701 DISCR2=2
; or C111 H8000-8700,9700,9701 DISCR1=2 AND DISCR2=2
I "C019^C024^C051^C052^C090^C091^C098^C099^C100^C102^C103^C104^C108^C109"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I ONCSDIS2=2 S ONCSCMA="00100"
I ONCTPCD="C111" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I (ONCSDIS1=2)&(ONCSDIS2=2) S ONCSCMA="00100"
;
;OVARY: C569 H8000-8700,8720-8790,8806,8810,8815,8822,8825,8890,8930-
; 8931,8933,8935-8936,8950,8960,8980,9000,9050,9052,9060,9070-9071,
; 9073,9080,9085,9090-9091,9100,9110,9700-9701
I ONCTPCD="C569" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8806)!(HST14=8810)!(HST14=8815)!(HST14=8822)!(HST14=8825)!(HST14=8890)!(HST14=8930)!(HST14=8931)!(HST14=8933)!(HST14=8935)!(HST14=8936) S ONCSCMA="00551"
.I (HST14=8950)!(HST14=8960)!(HST14=8980)!(HST14=9000)!(HST14=9050)!(HST14=9052)!(HST14=9060)!(HST14=9070)!(HST14=9071)!(HST14=9073)!(HST14=9080)!(HST14=9085)!(HST14=9090)!(HST14=9091)!(HST14=9100)!(HST14=9110) S ONCSCMA="00551"
.I (HST14=9700)!(HST14=9701) S ONCSCMA="00551"
;
;PALATE HARD: C050 H8000-8700,8982,9700,9701
I ONCTPCD="C050" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00075"
;
;PANCREAS: C250-C254,C257-C259 H8000-8149,8154,8157,8160-8231,8243-8248,
; 8250-8682,8690-8700,8720-8790,8971,9700,9701
I "C250^C251^C252^C253^C254^C257^C258^C259^"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8150))!(HST14=8154)!(HST14=8157)!((HST14>8159)&(HST14<8232))!((HST14>8242)&(HST14<8249)) S ONCSCMA="00280"
.I ((HST14>8249)&(HST14<8683))!((HST14>8689)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00280"
;
;PARATHYROID: C750 H8000-8700,8720-8790,9700,9701
I ONCTPCD="C750" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00750"
;
;PENIS: C600-C602,C608-C609 H8000-8040,8042-8180,8191-8246,8248-8700
I "C600^C601^C602^C608^C609^"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701)) S ONCSCMA="00570"
;
;PHARYNX OTHER: C140,C142,C148 H8000-8700,9700,9701
I "C140^C141^C148^"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00118"
;
;PLACENTA: C589 H8000-8700,8720-8790,9100-9105,9700,9701
I ONCTPCD="C589" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!((HST14>9099)&(HST14<9106))!(HST14=9700)!(HST14=9701) S ONCSCMA="00560"
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCSCHMC 12468 printed Dec 13, 2024@02:27:59 Page 2
ONCSCHMC ;HINES OIFO/RTK - Schema derivation, related code continued ;04/27/18
+1 ;;2.2;ONCOLOGY;**10,12,15,17,18**;Jul 31, 2013;Build 5
+2 ;
+3 ; go through until hit is found, else return ONCSCMA=0
+4 ;
+5 ;MEDULLABLASTOMA:
+6 ;https://staging.seer.cancer.gov/eod_public/schema/3.0/medulloblastoma_v9_2023/
+7 IF ((ONCT3>699)&(ONCT3<730))
Begin DoDot:1
+8 IF (HST14=9362)!((HST14>9469)&(HST14<9473))!((HST14>9473)&(HST14<9479))!((HST14>9500)&(HST14<9505))!(HST14=9508)
SET ONCSCMA="09724"
End DoDot:1
IF ONCSCMA'=0
QUIT
+9 IF ((ONCT3>699)&(ONCT3<723))!((ONCT3>723)&(ONCT3<730))
Begin DoDot:1
+10 IF (HST14=9473)
SET ONCSCMA="09724"
End DoDot:1
IF ONCSCMA'=0
QUIT
+11 IF ONCTPCD="C753"
Begin DoDot:1
+12 IF (HST14=9362)
SET ONCSCMA="09724"
End DoDot:1
IF ONCSCMA'=0
QUIT
+13 ;
+14 ;MELANOMA CHOROID & CILIARY: C693 H8720-8790
+15 ; or C694 H8720-8790 DISCRIM1=1
+16 IF ONCTPCD="C693"
Begin DoDot:1
+17 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00672"
End DoDot:1
IF ONCSCMA'=0
QUIT
+18 IF ONCTPCD="C694"
Begin DoDot:1
+19 IF ((HST14>8719)&(HST14<8791))
Begin DoDot:2
+20 IF ONCSDIS1=1
SET ONCSCMA="00672"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+21 ;
+22 ;MELANOMA CONJUNCTIVA: C690 H8720-8790
+23 IF ONCTPCD="C690"
Begin DoDot:1
+24 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00660"
End DoDot:1
IF ONCSCMA'=0
QUIT
+25 ;
+26 ;MELANOMA HEAD & NECK: C003-C005,C008-C009,C019,C020-C024,C028-C029,
+27 ; C030-C031,C039,C040-C041,C048-C049,C050-C052,C058-C059,C060-C062,
+28 ; C090-C191,C098-C099,C100-C104,C108-C109,C110-C113,C118-C119,C129,
+29 ; C130-C132,C138-C139,C140,C142,C148,C300-C313,C318-C319,C320-C323,
+30 ; C328-C329 H8720-8790
+31 IF ((ONCT3>2)&(ONCT3<6))!((ONCT3>7)&(ONCT3<10))!(ONCT3="019")!((ONCT3>19)&(ONCT3<25))!((ONCT3>27)&(ONCT3<32))!((ONCT3>38)&(ONCT3<42))!((ONCT3>47)&(ONCT3<53))
Begin DoDot:1
+32 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00140"
End DoDot:1
IF ONCSCMA'=0
QUIT
+33 IF ((ONCT3>57)&(ONCT3<63))!(ONCT3="068")!(ONCT3="069")!(ONCT3="090")!(ONCT3="091")!((ONCT3>97)&(ONCT3<105))!((ONCT3>107)&(ONCT3<114))!(ONCT3=118)!(ONCT3=119)!((ONCT3>128)&(ONCT3<133))
Begin DoDot:1
+34 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00140"
End DoDot:1
IF ONCSCMA'=0
QUIT
+35 IF ((ONCT3>137)&(ONCT3<141))!(ONCT3=142)!(ONCT3=148)!((ONCT3>299)&(ONCT3<314))!(ONCT3=318)!(ONCT3=319)!((ONCT3>319)&(ONCT3<324))!(ONCT3=328)!(ONCT3=329)
Begin DoDot:1
+36 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00140"
End DoDot:1
IF ONCSCMA'=0
QUIT
+37 ;
+38 ;MELANOMA IRIS: C694 H8720-8790
+39 IF ONCTPCD="C694"
Begin DoDot:1
+40 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00671"
End DoDot:1
IF ONCSCMA'=0
QUIT
+41 ;
+42 ;MELANOMA SKIN: C000-C002,C006,C440-C449,C500,C510-C512,C518-C519
+43 ; C600-C602,C608-C609,C632 H8720-8790
+44 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<3))!(ONCT3="006")!((ONCT3>439)&(ONCT3<450))!(ONCT3=500)!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632)
Begin DoDot:1
+45 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00470"
End DoDot:1
IF ONCSCMA'=0
QUIT
+46 ;
+47 ;MERKEL CELL SKIN: C000-C006,C008,C009,C440-C449,C510-C512,C518-C519
+48 ; C600-C602,C608-C609,C632,C809 H8041,8190,8247
+49 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<7))!(ONCT3="008")!((ONCT3>439)&(ONCT3<450))!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632)!(ONCT3=809)
Begin DoDot:1
+50 IF (HST14=8041)!(HST14=8190)!(HST14=8247)
SET ONCSCMA="00460"
End DoDot:1
IF ONCSCMA'=0
QUIT
+51 ;
+52 ;MIDDLE EAR: C301 H8000-8700,9700,9701
+53 IF ONCTPCD="C301"
Begin DoDot:1
+54 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00119"
End DoDot:1
IF ONCSCMA'=0
QUIT
+55 ;
+56 ;MOUTH OTHER: C058-C059,C068-C069 H8000-8700,8982,9700,9701
+57 IF "C058^C059^C068^C069^"[ONCTPCD
Begin DoDot:1
+58 IF ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00077"
End DoDot:1
IF ONCSCMA'=0
QUIT
+59 ;
+60 ;MYCOSIS FUNGOIDES: C000-C002,C006,C440-C449,C510-C512,C518-C519,C600-C602,C608-C609,C632 H9700,9701
+61 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<3))!(ONCT3="006")!((ONCT3>439)&(ONCT3<450))!((ONCT3>509)&(ONCT3<513))!(ONCT3=518)!(ONCT3=519)!((ONCT3>599)&(ONCT3<603))!(ONCT3=608)!(ONCT3=609)!(ONCT3=632)
Begin DoDot:1
+62 IF (HST14=9700)!(HST14=9701)
SET ONCSCMA="00811"
End DoDot:1
IF ONCSCMA'=0
QUIT
+63 ;
+64 ;NASAL CAVITY AND ETHMOID SINUS: C300,C311 H8000-8700,8982,9700,9701
+65 IF "C300^C311"[ONCTPCD
Begin DoDot:1
+66 IF ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00122"
End DoDot:1
IF ONCSCMA'=0
QUIT
+67 ;
+68 ;NASOPHARYNX: C110,C112-C113,C118-C119 H8000-8700,9700,9701
+69 ; or C111 H8000-8700,9700,9701 DISCR1=1
+70 IF "C110^C112^C113^C118^C119"[ONCTPCD
Begin DoDot:1
+71 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00090"
End DoDot:1
IF ONCSCMA'=0
QUIT
+72 IF ONCTPCD="C111"
Begin DoDot:1
+73 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+74 IF ONCSDIS1=1
SET ONCSCMA="00090"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+75 ;
+76 ;NET ADRENAL GLAND: C740,C741,C749,C755 H8680,8690,8692,8693,8700
+77 IF "C740^C741^C749^C755"[ONCTPCD
Begin DoDot:1
+78 IF (HST14=8680)!(HST14=8690)!(HST14=8692)!(HST14=8693)!(HST14=8700)
SET ONCSCMA="00770"
End DoDot:1
IF ONCSCMA'=0
QUIT
+79 ;
+80 ;NET AMPULLA OF VATER: C241 H8150-8153,8155-56,8158,8240-8242,8249,8683
+81 IF ONCTPCD="C241"
Begin DoDot:1
+82 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00302"
End DoDot:1
IF ONCSCMA'=0
QUIT
+83 ;
+84 ;NET APPENDIX: C181 H8150-8153,8155-56,8158,8240-8242,8249,8683
+85 IF ONCTPCD="C181"
Begin DoDot:1
+86 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00320"
End DoDot:1
IF ONCSCMA'=0
QUIT
+87 ;
+88 ;NET COLON AND RECTUM: C180,C182-C189,C199,C209 H8150-8153,8155-56,8158
+89 ; 8240-8242,8249,8683
+90 IF "C180^C182^C183^C184^C185^C186^C187^C188^C189^C199^C209"[ONCTPCD
Begin DoDot:1
+91 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00330"
End DoDot:1
IF ONCSCMA'=0
QUIT
+92 ;
+93 ;NET DUODENUM: C170 H8150-8153,8155-56,8158,8240-8242,8249,8683
+94 IF ONCTPCD="C170"
Begin DoDot:1
+95 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00301"
End DoDot:1
IF ONCSCMA'=0
QUIT
+96 ;
+97 ;NET JEJUNUM AND ILEUM: C171-C173,C178-C179 H8150-8153,8155-56,8158
+98 ; 8240-8242,8249,8683
+99 IF "C171^C172^C173^C178^C179"[ONCTPCD
Begin DoDot:1
+100 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00310"
End DoDot:1
IF ONCSCMA'=0
QUIT
+101 ;
+102 ;NET PANCREAS: C250-C254,C257-C259 H8150-8153,8155-56,8158,8240-8242
+103 ; 8249,8683
+104 IF "C250^C251^C252^C253^C254^C257^C258^C259"[ONCTPCD
Begin DoDot:1
+105 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00340"
End DoDot:1
IF ONCSCMA'=0
QUIT
+106 ;
+107 ;NET STOMACH: C160-C166,C168-C169 H8150-8153,8155-56,8158,8240-8242
+108 ; 8249,8683
+109 IF "C160^C161^C162^C163^C164^C165^C166^C168^C169"[ONCTPCD
Begin DoDot:1
+110 IF ((HST14>8149)&(HST14<8154))!(HST14=8155)!(HST14=8156)!(HST14=8158)!(HST14=8240)!(HST14=8241)!(HST14=8242)!(HST14=8249)!(HST14=8683)
SET ONCSCMA="00290"
End DoDot:1
IF ONCSCMA'=0
QUIT
+111 ;
+112 ;ORBITAL SARCOMA: C690-C694,C696,C698-C699 H8710-8714,8800-8921,8932-34
+113 ; 8940-8990,9000-9016,9030-9137,9141-9175,9181-9230,9240-9509,9520-9582
+114 ; or C695 H8710-8714,8800-8921,8932-8934,8940,8950-8975,8981,8983-8990
+115 ; 9000-9016,9030-9137,9141-9175,9181-9230,9240-9509,9520-9582
+116 ; or C723 H8710-8714,8800-8921,8932-8934,8940-8990,9000-9016,9030-9063
+117 ; 9065,9071-9073,9081-9083,9086-9091,9101-9137,9141-9175,9181-9230
+118 ; 9240-9361,9363-9381,9383-9384,9394,9410,9412-9423,9431-9432,9444
+119 ; 9460,9472-9473,9480,9491-9500,9502-9504,9506-9507,9509,9520-9537
+120 ; 9539-9582
+121 ; (remove 9222 from 00700 schema for NAACCR 2022 p17)
+122 IF "C690^C691^C692^C693^C694^C696^C698^C699"[ONCTPCD
Begin DoDot:1
+123 IF ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!((HST14>9029)&(HST14<9138))
SET ONCSCMA="00700"
QUIT
+124 IF ((HST14>9140)&(HST14<9176))!((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9510))!((HST14>9519)&(HST14<9583))
SET ONCSCMA="00700"
QUIT
End DoDot:1
IF ONCSCMA'=0
QUIT
+125 IF ONCTPCD="C695"
Begin DoDot:1
+126 IF ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!(HST14=8940)!((HST14>8949)&(HST14<8976))!(HST14=8981)!((HST14>8982)&(HST14<8991))!((HST14>8999)&(HST14<9017))
SET ONCSCMA="00700"
QUIT
+127 IF ((HST14>9029)&(HST14<9138))!((HST14>9140)&(HST14<9176))!((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9510))!((HST14>9519)&(HST14<9583))
SET ONCSCMA="00700"
QUIT
End DoDot:1
IF ONCSCMA'=0
QUIT
+128 IF ONCTPCD="C723"
Begin DoDot:1
+129 IF ((HST14>8709)&(HST14<8715))!((HST14>8799)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))
SET ONCSCMA="00700"
QUIT
+130 IF ((HST14>9029)&(HST14<9064))!(HST14=9065)!((HST14>9070)&(HST14<9074))!((HST14>9080)&(HST14<9084))!((HST14>9085)&(HST14<9092))!((HST14>9100)&(HST14<9138))!((HST14>9140)&(HST14<9176))
SET ONCSCMA="00700"
QUIT
+131 IF ((HST14>9180)&(HST14<9222))!((HST14>9222)&(HST14<9231))!((HST14>9239)&(HST14<9362))!((HST14>9362)&(HST14<9382))!(HST14=9383)!(HST14=9384)!(HST14=9394)!(HST14=9410)!((HST14>9411)&(HST14<9424))!(HST14=9431)!(HST14=9432)
SET ONCSCMA="00700"
QUIT
+132 IF (HST14=9444)!(HST14=9460)!(HST14=9472)!(HST14=9473)!(HST14=9480)!((HST14>9490)&(HST14<9501))!((HST14>9501)&(HST14<9505))!(HST14=9506)!(HST14=9507)!(HST14=9509)!((HST14>9519)&(HST14<9538))!((HST14>9538)&(HST14<9583))
SET ONCSCMA="00700"
QUIT
End DoDot:1
IF ONCSCMA'=0
QUIT
+133 ;
+134 ;OROPHARYNX (P16-): C019,C024,C051,C052,C090,C091,C098,C099,C100,C102-C104
+135 ; C108,C109 H8000-8700,9700,9701 DISCR2=1,9
+136 ; or C111 H8000-8700,9700,9701 DISCR1=2 AND DISCR2=1,9
+137 IF "C019^C024^C051^C052^C090^C091^C098^C099^C100^C102^C103^C104^C108^C109"[ONCTPCD
Begin DoDot:1
+138 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+139 IF ((ONCSDIS2=1)!(ONCSDIS2=9))
SET ONCSCMA="00111"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+140 IF ONCTPCD="C111"
Begin DoDot:1
+141 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+142 IF (ONCSDIS1=2)&((ONCSDIS2=1)!(ONCSDIS2=9))
SET ONCSCMA="00111"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+143 ;
+144 ;OROPHARYNX HPV-MEDIATED (P16+): C019,C024,C051,C052,C090,C091,C098,C099
+145 ; C100,C102-C104,C108,C109 H8000-8700,9700,9701 DISCR2=2
+146 ; or C111 H8000-8700,9700,9701 DISCR1=2 AND DISCR2=2
+147 IF "C019^C024^C051^C052^C090^C091^C098^C099^C100^C102^C103^C104^C108^C109"[ONCTPCD
Begin DoDot:1
+148 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+149 IF ONCSDIS2=2
SET ONCSCMA="00100"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+150 IF ONCTPCD="C111"
Begin DoDot:1
+151 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+152 IF (ONCSDIS1=2)&(ONCSDIS2=2)
SET ONCSCMA="00100"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+153 ;
+154 ;OVARY: C569 H8000-8700,8720-8790,8806,8810,8815,8822,8825,8890,8930-
+155 ; 8931,8933,8935-8936,8950,8960,8980,9000,9050,9052,9060,9070-9071,
+156 ; 9073,9080,9085,9090-9091,9100,9110,9700-9701
+157 IF ONCTPCD="C569"
Begin DoDot:1
+158 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8806)!(HST14=8810)!(HST14=8815)!(HST14=8822)!(HST14=8825)!(HST14=8890)!(HST14=8930)!(HST14=8931)!(HST14=8933)!(HST14=8935)!(HST14=8936)
SET ONCSCMA="00551"
+159 IF (HST14=8950)!(HST14=8960)!(HST14=8980)!(HST14=9000)!(HST14=9050)!(HST14=9052)!(HST14=9060)!(HST14=9070)!(HST14=9071)!(HST14=9073)!(HST14=9080)!(HST14=9085)!(HST14=9090)!(HST14=9091)!(HST14=9100)!(HST14=9110)
SET ONCSCMA="00551"
+160 IF (HST14=9700)!(HST14=9701)
SET ONCSCMA="00551"
End DoDot:1
IF ONCSCMA'=0
QUIT
+161 ;
+162 ;PALATE HARD: C050 H8000-8700,8982,9700,9701
+163 IF ONCTPCD="C050"
Begin DoDot:1
+164 IF ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00075"
End DoDot:1
IF ONCSCMA'=0
QUIT
+165 ;
+166 ;PANCREAS: C250-C254,C257-C259 H8000-8149,8154,8157,8160-8231,8243-8248,
+167 ; 8250-8682,8690-8700,8720-8790,8971,9700,9701
+168 IF "C250^C251^C252^C253^C254^C257^C258^C259^"[ONCTPCD
Begin DoDot:1
+169 IF ((HST14>7999)&(HST14<8150))!(HST14=8154)!(HST14=8157)!((HST14>8159)&(HST14<8232))!((HST14>8242)&(HST14<8249))
SET ONCSCMA="00280"
+170 IF ((HST14>8249)&(HST14<8683))!((HST14>8689)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00280"
End DoDot:1
IF ONCSCMA'=0
QUIT
+171 ;
+172 ;PARATHYROID: C750 H8000-8700,8720-8790,9700,9701
+173 IF ONCTPCD="C750"
Begin DoDot:1
+174 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00750"
End DoDot:1
IF ONCSCMA'=0
QUIT
+175 ;
+176 ;PENIS: C600-C602,C608-C609 H8000-8040,8042-8180,8191-8246,8248-8700
+177 IF "C600^C601^C602^C608^C609^"[ONCTPCD
Begin DoDot:1
+178 IF ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))
SET ONCSCMA="00570"
End DoDot:1
IF ONCSCMA'=0
QUIT
+179 ;
+180 ;PHARYNX OTHER: C140,C142,C148 H8000-8700,9700,9701
+181 IF "C140^C141^C148^"[ONCTPCD
Begin DoDot:1
+182 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00118"
End DoDot:1
IF ONCSCMA'=0
QUIT
+183 ;
+184 ;PLACENTA: C589 H8000-8700,8720-8790,9100-9105,9700,9701
+185 IF ONCTPCD="C589"
Begin DoDot:1
+186 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!((HST14>9099)&(HST14<9106))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00560"
End DoDot:1
IF ONCSCMA'=0
QUIT
+187 ;
+188 QUIT