ONCSCHMB ;HINES OIFO/RTK - Schema derivation, related code continued ;05/09/18
;;2.2;ONCOLOGY;**10,12,18**;Jul 31, 2013;Build 5
;
; go through until hit is found, else return ONCSCMA=0
;
;EYE OTHER: C691-C694,C696,C698-C699 H8000-8700,9700,9701
; or C691-C692,C695-C696,C698-C699 H8720-8790
I "C691^C692^C693^C694^C696^C698^C699"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00718"
I "C691^C692^C695^C696^C698^C699"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>8719)&(HST14<8791)) S ONCSCMA="00718"
;
;FALLOPIAN TUBE: C570 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="C570" 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>8929)&(HST14<8932))!(HST14=8933)!(HST14=8935)!(HST14=8936) S ONCSCMA="00553"
.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) S ONCSCMA="00553"
.I (HST14=9100)!(HST14=9110)!(HST14=9700)!(HST14=9701) S ONCSCMA="00553"
;
;FLOOR OF MOUTH: C040-C041,C048-C049 H8000-8700,8982,9700,9701
I "C040^C041^C048^C049"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00074"
;
;GALLBLADDER: C239 H8000-8700,8720-8790,9700-9701
I ONCTPCD="C239" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00241"
;
;GENITAL FEMALE OTHER: C577-C579 H8000-8700,8720-8790,9700-9701
I "C577^C578^C579"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00559"
;
;GENITAL MALE OTHER: C630-C631,C637-C639 H8000-8700,8720-8790,9700-9701
; or C632 H8000-8040,8042-8180,8191-8246,8248-8700
I "C630^C631^C637^C638^C639"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00598"
I ONCTPCD="C632" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701)) S ONCSCMA="00598"
;
;GIST: C000-C539,C571-C809 H8935,8936 ;ONCT3 USED FOR WIDE RANGES
I (ONCT3="000")!((ONCT3>0)&(ONCT3<540))!((ONCT3>570)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=8935)!(HST14=8936) S ONCSCMA="00430"
;
;GUM: C030,C031,C039,C062 H8000-8700,8982,9700-9701
I "C030^C031^C039^C062"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00073"
;
;HEART,MEDIASTINUM AND PLEURA: C380-C383,C388 H8000-8803,8810-8921,8932-
; 8934,8940-8990,9000-9016,9030,9040-9043,9045-9137,9141-9230,9240-
; 9580,9582,9700-9701
; or C384 H8000-8803,8810-8921,8932-8934,8940-8990,9000-9016,9030,9040-
; 9043,9045,9054-9137,9141-9230,9240-9580,9582,9700-9701
I "C380^C381^C382^C383^C388"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8804))!((HST14>8809)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!(HST14=9030)!((HST14>9039)&(HST14<9044)) S ONCSCMA="00422"
.I ((HST14>9044)&(HST14<9138))!((HST14>9140)&(HST14<9231))!((HST14>9239)&(HST14<9581))!(HST14=9582)!(HST14=9700)!(HST14=9701) S ONCSCMA="00422"
I ONCTPCD="C384" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8804))!((HST14>8809)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!(HST14=9030)!((HST14>9039)&(HST14<9044)) S ONCSCMA="00422"
.I (HST14=9045)!((HST14>9053)&(HST14<9138))!((HST14>9140)&(HST14<9231))!((HST14>9239)&(HST14<9581))!(HST14=9582)!(HST14=9700)!(HST14=9701) S ONCSCMA="00422"
;
;HEMERETIC: C000-C440,C442-C689,C691-C694,C698-C699,C739-C749
; C750,C754-C759,C760-C809 H9591 DISCR1=1,2
; or C700-C729, C751-C753 H95913 DISCR1=1,2
; or C000-C809 H9724,9727,9740-9742,9762-9809,9811-9820
; 9831-9920,9931-9993
; or C000-C699,C739-C750,C754-C809 H9751,9755-9759
; or C000-C440,C442-C689,C691-C694,C698-C809 H9930
I (ONCT3="000")!((ONCT3>0)&(ONCT3<441))!((ONCT3>441)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=9591) D
..I ((ONCSDIS1=1)!(ONCSDIS1=2)) S ONCSCMA="00830"
.I (HST14=9930) S ONCSCMA="00830"
I ((ONCT3>699)&(ONCT3<730))!((ONCT3>750)&(ONCT3<754)) D I ONCSCMA'=0
.I (ONCHIST=95913) D
..I ((ONCSDIS1=1)!(ONCSDIS1=2)) S ONCSCMA="00830"
.I (HST14=9724)!(HST14=9727)!((HST14>9739)&(HST14<9743))!((HST14>9761)&(HST14<9810))!((HST14>9810)&(HST14<9821))!((HST14>9830)&(HST14<9921))!((HST14>9930)&(HST14<9994)) D
..I $E(ONCHIST,5)=3 S ONCSCMA="00830"
.I (ONCHIST=99303) S ONCSCMA="00830"
I (ONCT3="000")!((ONCT3>0)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=9724)!(HST14=9727)!((HST14>9739)&(HST14<9743))!((HST14>9761)&(HST14<9810))!((HST14>9810)&(HST14<9821))!((HST14>9830)&(HST14<9921))!((HST14>9930)&(HST14<9994)) S ONCSCMA="00830"
.I (HST14=9751)!((HST14>9754)&(HST14<9760)) S ONCSCMA="00830"
;
;HYPOPHARYNX: C129,C130-C132,C138-C139 H8000-8700,9700,9701
I "C129^C130^C131^C132^C138^C139"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00112"
;
;ILL-DEFINED OTHER: C420-C424,C761-C765,C767-C768,C770-C775,C778-C779
; H8000-8700,9700,9701
; or C760 H8000-8700,9700,9701 DISCR1=0,1
; or C809 8000-8180,8191-8246,8248-8700,8720-8790,9700,9701
I "C420^C421^C422^C423^C424^C761^C762^C763^C764^C765^C767^C768^C770^C771^C772^C773^C774^C775^C778^C779"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="99999"
I ONCTPCD="C760" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) D
..I ((ONCSDIS1=0)!(ONCSDIS1=1)) S ONCSCMA="99999"
I ONCTPCD="C809" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="99999"
;
;INTRACRANIAL GLAND: https://staging.seer.cancer.gov/eod_public/schema/3.0/intracranial_gland_v9_2023/?breadcrumbs=(~schema_list~)
D ITC723^ONCSCHMW I ONCSCMA'=0 Q
;
;KAPOSI SARCOMA: C000-C699,C739-C750,C754-C809 H9140
I (ONCT3="000")!((ONCT3>0)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=9140) S ONCSCMA="00458"
;
;KIDNEY PARENCHYMA: C649 H8000-8700,8720-8790,9700,9701
I ONCTPCD="C649" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00600"
;
;KIDNEY RENAL PELVIS: C659,C669 H8000-8700,8720-8790,9700,9701
I ONCTPCD="C659"!(ONCTPCD="C669") D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00610"
;
;LACRIMAL GLAND: C695 H8000-8700,8941,8980,8982,9700,9701
I ONCTPCD="C695" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701) D
..I ONCSDIS1=1 S ONCSCMA="00690"
;
;LACRIMAL SAC: C695 H8000-8700,8941,8980,8982,9700,9701
I ONCTPCD="C695" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701) D
..I ((ONCSDIS1=2)!(ONCSDIS1=9)) S ONCSCMA="00698"
;
;LARYNX GLOTTIC: C320 H8000-8700,9700,9701
I ONCTPCD="C320" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00132"
;
;LARYNX OTHER: C323,C328,C329 H8000-8700,9700,9701
I (ONCTPCD="C323")!(ONCTPCD="C328")!(ONCTPCD="C329") D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00130"
;
;LARYNX SUBGLOTTIC: C322 H8000-8700,9700,9701
I ONCTPCD="C322" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00133"
;
;LARYNX SUPRAGLOTTIC: C101,C321 H8000-8700,9700,9701
I (ONCTPCD="C101")!(ONCTPCD="C321") D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701) S ONCSCMA="00131"
;
;LIP: C003,C004,C005,C008,C009 H8000-8040,8042-8180,8191-8246,8248-8700,
; 8982,9700,9701
I (ONCTPCD="C003")!(ONCTPCD="C004")!(ONCTPCD="C005")!(ONCTPCD="C008")!(ONCTPCD="C009") D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00071"
;
;LIVER: C220 H8000-8700,8720-8790,9700,9701
I ONCTPCD="C220" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701) S ONCSCMA="00220"
;
;LUNG: C340,C341,C342,C343,C348,C349 H8000-8700,8720-8790,8972,8980
; 9700,9701
I (ONCTPCD="C340")!(ONCTPCD="C341")!(ONCTPCD="C342")!(ONCTPCD="C343")!(ONCTPCD="C348")!(ONCTPCD="C349") D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8972)!(HST14=8980)!(HST14=9700)!(HST14=9701) S ONCSCMA="00360"
;
;LYMPHOMA: C000-C424,C470-C509,C511-C608,C619-C631,C637-C689,C691-C694,
; C698-C699,C739-C749,C760-C809 H9590,9596-9663,9673-9699,9702-9719,
; 9725-9726,9735,9737-9738
; or C440,C442-C449,C510,C609,C632 H9590,9596,9650-9663,9673-9679,9687-
; 9699,9702-9705,9714-9717,9725,9735,9737-9738
; or C700-C729,C750-C759 H9590,9596-9663,9673-9679,9687-9698,9716-9719
; 9725-9726,9735,9737-9738 HST5 MUST = 3
; or C000-C440,C442-C689,C691-C694,C698-C699,C700-C729,C739-C749,C750-
; C759,C760-C809 H9591 DISCR1=3,9
; or C700-C729, C751-C753 H95913 DISCR1=3,9
; or C750,C754-C759 H9680,9699,9702-9714
; or C000-C440,C442-C689,C691-C694,C698-C699,C700-C729,C739-C749,C750-
; C759,C760-C809 H9826-9827 HST5 MUST = 3
I (ONCT3="000")!((ONCT3>0)&(ONCT3<425))!((ONCT3>469)&(ONCT3<510))!((ONCT3>510)&(ONCT3<609))!((ONCT3>618)&(ONCT3<632))!((ONCT3>636)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<700)) D I ONCSCMA'=0 Q
.I (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9700))!((HST14>9701)&(HST14<9720))!((HST14>9724)&(HST14<9727))!(HST14=9735)!((HST14>9736)&(HST14<9739)) S ONCSCMA="00790"
.I (HST14=9591) D
..I ((ONCSDIS1=3)!(ONCSDIS1=9)) S ONCSCMA="00790"
.I (HST14=9826)!(HST14=9827) S ONCSCMA="00790"
I ((ONCT3>738)&(ONCT3<750))!((ONCT3>759)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9700))!((HST14>9701)&(HST14<9720))!((HST14>9724)&(HST14<9727))!(HST14=9735)!((HST14>9736)&(HST14<9739)) S ONCSCMA="00790"
.I (HST14=9591) D
..I ((ONCSDIS1=3)!(ONCSDIS1=9)) S ONCSCMA="00790"
.I (HST14=9826)!(HST14=9827) S ONCSCMA="00790"
I "C440^C442^C443^C444^C445^C446^C447^C448^C449^C510^C609^C632"[ONCTPCD D I ONCSCMA'=0 Q
.I (HST14=9590)!(HST14=9596)!((HST14>9649)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9700))!((HST14>9701)&(HST14<9706))!((HST14>9713)&(HST14<9718))!(HST14=9725)!(HST14=9735)!(HST14=9737)!(HST14=9738) S ONCSCMA="00790"
I ((ONCT3>699)&(ONCT3<730))!((ONCT3>750)&(ONCT3<754)) D I ONCSCMA'=0
.I (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9699))!((HST14>9715)&(HST14<9720))!(HST14=9725)!(HST14=9726)!(HST14=9735)!((HST14>9736)&(HST14<9739)) D
..I $E(ONCHIST,5)=3 S ONCSCMA="00790"
.I (ONCHIST=95913) D
..I ((ONCSDIS1=3)!(ONCSDIS1=9)) S ONCSCMA="00790"
.I (ONCHIST=98263)!(ONCHIST=98273) S ONCSCMA="00790"
I "C750^C754^C755^C756^C757^C758^C759"[ONCTPCD D I ONCSCMA'=0 Q
.I (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9699))!((HST14>9715)&(HST14<9720))!(HST14=9725)!(HST14=9726)!(HST14=9735)!((HST14>9736)&(HST14<9739)) S ONCSCMA="00790"
.I (HST14=9680)!(HST14=9699)!((HST14>9701)&(HST14<9715)) S ONCSCMA="00790"
;
;LYMPHOMA OCULAR ADNEXA: C441,C690,C695-C696 H9590-9699,9702-9719,9725-
; 9726,9734-9738,9823,9826-9827,9930
I "C441^C690^C695^C696"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>9589)&(HST14<9700))!((HST14>9701)&(HST14<9720))!(HST14=9725)!(HST14=9726)!((HST14>9733)&(HST14<9739))!(HST14=9823)!(HST14=9826)!(HST14=9827)!(HST14=9930) S ONCSCMA="00710"
;
;LYMPHOMA-CLL/SLL: C000-C440,C442-C689,C691-C694,C698-C809 H9823
I (ONCT3="000")!((ONCT3>0)&(ONCT3<441))!((ONCT3>441)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<810)) D I ONCSCMA'=0 Q
.I (HST14=9823) S ONCSCMA="00795"
;
;MAJOR SALIVARY GLANDS: C079,C080,C081,C088,C089 H8000-8700,8720-8790,
; 8941,8974,8980,8982,9700,9701
I "C079^C080^C081^C088^C089"[ONCTPCD D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8941)!(HST14=8974)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00080"
;
;MAXILLARY SINUS: C310 H8000-8700,8941,8982,9700,9701
I ONCTPCD="C310" D I ONCSCMA'=0 Q
.I ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8982)!(HST14=9700)!(HST14=9701) S ONCSCMA="00121"
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCSCHMB 13239 printed Dec 13, 2024@02:27:58 Page 2
ONCSCHMB ;HINES OIFO/RTK - Schema derivation, related code continued ;05/09/18
+1 ;;2.2;ONCOLOGY;**10,12,18**;Jul 31, 2013;Build 5
+2 ;
+3 ; go through until hit is found, else return ONCSCMA=0
+4 ;
+5 ;EYE OTHER: C691-C694,C696,C698-C699 H8000-8700,9700,9701
+6 ; or C691-C692,C695-C696,C698-C699 H8720-8790
+7 IF "C691^C692^C693^C694^C696^C698^C699"[ONCTPCD
Begin DoDot:1
+8 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00718"
End DoDot:1
IF ONCSCMA'=0
QUIT
+9 IF "C691^C692^C695^C696^C698^C699"[ONCTPCD
Begin DoDot:1
+10 IF ((HST14>8719)&(HST14<8791))
SET ONCSCMA="00718"
End DoDot:1
IF ONCSCMA'=0
QUIT
+11 ;
+12 ;FALLOPIAN TUBE: C570 H8000-8700,8720-8790,8806,8810,8815,8822,8825,8890
+13 ; 8930-8931,8933,8935-8936,8950,8960,8980,9000,9050,9052,9060,9070-9071
+14 ; 9073,9080,9085,9090-9091,9100,9110,9700,9701
+15 IF ONCTPCD="C570"
Begin DoDot:1
+16 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8806)!(HST14=8810)!(HST14=8815)!(HST14=8822)!(HST14=8825)!(HST14=8890)!((HST14>8929)&(HST14<8932))!(HST14=8933)!(HST14=8935)!(HST14=8936)
SET ONCSCMA="00553"
+17 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)
SET ONCSCMA="00553"
+18 IF (HST14=9100)!(HST14=9110)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00553"
End DoDot:1
IF ONCSCMA'=0
QUIT
+19 ;
+20 ;FLOOR OF MOUTH: C040-C041,C048-C049 H8000-8700,8982,9700,9701
+21 IF "C040^C041^C048^C049"[ONCTPCD
Begin DoDot:1
+22 IF ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00074"
End DoDot:1
IF ONCSCMA'=0
QUIT
+23 ;
+24 ;GALLBLADDER: C239 H8000-8700,8720-8790,9700-9701
+25 IF ONCTPCD="C239"
Begin DoDot:1
+26 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00241"
End DoDot:1
IF ONCSCMA'=0
QUIT
+27 ;
+28 ;GENITAL FEMALE OTHER: C577-C579 H8000-8700,8720-8790,9700-9701
+29 IF "C577^C578^C579"[ONCTPCD
Begin DoDot:1
+30 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00559"
End DoDot:1
IF ONCSCMA'=0
QUIT
+31 ;
+32 ;GENITAL MALE OTHER: C630-C631,C637-C639 H8000-8700,8720-8790,9700-9701
+33 ; or C632 H8000-8040,8042-8180,8191-8246,8248-8700
+34 IF "C630^C631^C637^C638^C639"[ONCTPCD
Begin DoDot:1
+35 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00598"
End DoDot:1
IF ONCSCMA'=0
QUIT
+36 IF ONCTPCD="C632"
Begin DoDot:1
+37 IF ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))
SET ONCSCMA="00598"
End DoDot:1
IF ONCSCMA'=0
QUIT
+38 ;
+39 ;GIST: C000-C539,C571-C809 H8935,8936 ;ONCT3 USED FOR WIDE RANGES
+40 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<540))!((ONCT3>570)&(ONCT3<810))
Begin DoDot:1
+41 IF (HST14=8935)!(HST14=8936)
SET ONCSCMA="00430"
End DoDot:1
IF ONCSCMA'=0
QUIT
+42 ;
+43 ;GUM: C030,C031,C039,C062 H8000-8700,8982,9700-9701
+44 IF "C030^C031^C039^C062"[ONCTPCD
Begin DoDot:1
+45 IF ((HST14>7999)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00073"
End DoDot:1
IF ONCSCMA'=0
QUIT
+46 ;
+47 ;HEART,MEDIASTINUM AND PLEURA: C380-C383,C388 H8000-8803,8810-8921,8932-
+48 ; 8934,8940-8990,9000-9016,9030,9040-9043,9045-9137,9141-9230,9240-
+49 ; 9580,9582,9700-9701
+50 ; or C384 H8000-8803,8810-8921,8932-8934,8940-8990,9000-9016,9030,9040-
+51 ; 9043,9045,9054-9137,9141-9230,9240-9580,9582,9700-9701
+52 IF "C380^C381^C382^C383^C388"[ONCTPCD
Begin DoDot:1
+53 IF ((HST14>7999)&(HST14<8804))!((HST14>8809)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!(HST14=9030)!((HST14>9039)&(HST14<9044))
SET ONCSCMA="00422"
+54 IF ((HST14>9044)&(HST14<9138))!((HST14>9140)&(HST14<9231))!((HST14>9239)&(HST14<9581))!(HST14=9582)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00422"
End DoDot:1
IF ONCSCMA'=0
QUIT
+55 IF ONCTPCD="C384"
Begin DoDot:1
+56 IF ((HST14>7999)&(HST14<8804))!((HST14>8809)&(HST14<8922))!((HST14>8931)&(HST14<8935))!((HST14>8939)&(HST14<8991))!((HST14>8999)&(HST14<9017))!(HST14=9030)!((HST14>9039)&(HST14<9044))
SET ONCSCMA="00422"
+57 IF (HST14=9045)!((HST14>9053)&(HST14<9138))!((HST14>9140)&(HST14<9231))!((HST14>9239)&(HST14<9581))!(HST14=9582)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00422"
End DoDot:1
IF ONCSCMA'=0
QUIT
+58 ;
+59 ;HEMERETIC: C000-C440,C442-C689,C691-C694,C698-C699,C739-C749
+60 ; C750,C754-C759,C760-C809 H9591 DISCR1=1,2
+61 ; or C700-C729, C751-C753 H95913 DISCR1=1,2
+62 ; or C000-C809 H9724,9727,9740-9742,9762-9809,9811-9820
+63 ; 9831-9920,9931-9993
+64 ; or C000-C699,C739-C750,C754-C809 H9751,9755-9759
+65 ; or C000-C440,C442-C689,C691-C694,C698-C809 H9930
+66 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<441))!((ONCT3>441)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810))
Begin DoDot:1
+67 IF (HST14=9591)
Begin DoDot:2
+68 IF ((ONCSDIS1=1)!(ONCSDIS1=2))
SET ONCSCMA="00830"
End DoDot:2
+69 IF (HST14=9930)
SET ONCSCMA="00830"
End DoDot:1
IF ONCSCMA'=0
QUIT
+70 IF ((ONCT3>699)&(ONCT3<730))!((ONCT3>750)&(ONCT3<754))
Begin DoDot:1
+71 IF (ONCHIST=95913)
Begin DoDot:2
+72 IF ((ONCSDIS1=1)!(ONCSDIS1=2))
SET ONCSCMA="00830"
End DoDot:2
+73 IF (HST14=9724)!(HST14=9727)!((HST14>9739)&(HST14<9743))!((HST14>9761)&(HST14<9810))!((HST14>9810)&(HST14<9821))!((HST14>9830)&(HST14<9921))!((HST14>9930)&(HST14<9994))
Begin DoDot:2
+74 IF $EXTRACT(ONCHIST,5)=3
SET ONCSCMA="00830"
End DoDot:2
+75 IF (ONCHIST=99303)
SET ONCSCMA="00830"
End DoDot:1
IF ONCSCMA'=0
+76 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810))
Begin DoDot:1
+77 IF (HST14=9724)!(HST14=9727)!((HST14>9739)&(HST14<9743))!((HST14>9761)&(HST14<9810))!((HST14>9810)&(HST14<9821))!((HST14>9830)&(HST14<9921))!((HST14>9930)&(HST14<9994))
SET ONCSCMA="00830"
+78 IF (HST14=9751)!((HST14>9754)&(HST14<9760))
SET ONCSCMA="00830"
End DoDot:1
IF ONCSCMA'=0
QUIT
+79 ;
+80 ;HYPOPHARYNX: C129,C130-C132,C138-C139 H8000-8700,9700,9701
+81 IF "C129^C130^C131^C132^C138^C139"[ONCTPCD
Begin DoDot:1
+82 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00112"
End DoDot:1
IF ONCSCMA'=0
QUIT
+83 ;
+84 ;ILL-DEFINED OTHER: C420-C424,C761-C765,C767-C768,C770-C775,C778-C779
+85 ; H8000-8700,9700,9701
+86 ; or C760 H8000-8700,9700,9701 DISCR1=0,1
+87 ; or C809 8000-8180,8191-8246,8248-8700,8720-8790,9700,9701
+88 IF "C420^C421^C422^C423^C424^C761^C762^C763^C764^C765^C767^C768^C770^C771^C772^C773^C774^C775^C778^C779"[ONCTPCD
Begin DoDot:1
+89 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="99999"
End DoDot:1
IF ONCSCMA'=0
QUIT
+90 IF ONCTPCD="C760"
Begin DoDot:1
+91 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+92 IF ((ONCSDIS1=0)!(ONCSDIS1=1))
SET ONCSCMA="99999"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+93 IF ONCTPCD="C809"
Begin DoDot:1
+94 IF ((HST14>7999)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="99999"
End DoDot:1
IF ONCSCMA'=0
QUIT
+95 ;
+96 ;INTRACRANIAL GLAND: https://staging.seer.cancer.gov/eod_public/schema/3.0/intracranial_gland_v9_2023/?breadcrumbs=(~schema_list~)
+97 DO ITC723^ONCSCHMW
IF ONCSCMA'=0
QUIT
+98 ;
+99 ;KAPOSI SARCOMA: C000-C699,C739-C750,C754-C809 H9140
+100 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<700))!((ONCT3>738)&(ONCT3<751))!((ONCT3>753)&(ONCT3<810))
Begin DoDot:1
+101 IF (HST14=9140)
SET ONCSCMA="00458"
End DoDot:1
IF ONCSCMA'=0
QUIT
+102 ;
+103 ;KIDNEY PARENCHYMA: C649 H8000-8700,8720-8790,9700,9701
+104 IF ONCTPCD="C649"
Begin DoDot:1
+105 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00600"
End DoDot:1
IF ONCSCMA'=0
QUIT
+106 ;
+107 ;KIDNEY RENAL PELVIS: C659,C669 H8000-8700,8720-8790,9700,9701
+108 IF ONCTPCD="C659"!(ONCTPCD="C669")
Begin DoDot:1
+109 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00610"
End DoDot:1
IF ONCSCMA'=0
QUIT
+110 ;
+111 ;LACRIMAL GLAND: C695 H8000-8700,8941,8980,8982,9700,9701
+112 IF ONCTPCD="C695"
Begin DoDot:1
+113 IF ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+114 IF ONCSDIS1=1
SET ONCSCMA="00690"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+115 ;
+116 ;LACRIMAL SAC: C695 H8000-8700,8941,8980,8982,9700,9701
+117 IF ONCTPCD="C695"
Begin DoDot:1
+118 IF ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701)
Begin DoDot:2
+119 IF ((ONCSDIS1=2)!(ONCSDIS1=9))
SET ONCSCMA="00698"
End DoDot:2
End DoDot:1
IF ONCSCMA'=0
QUIT
+120 ;
+121 ;LARYNX GLOTTIC: C320 H8000-8700,9700,9701
+122 IF ONCTPCD="C320"
Begin DoDot:1
+123 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00132"
End DoDot:1
IF ONCSCMA'=0
QUIT
+124 ;
+125 ;LARYNX OTHER: C323,C328,C329 H8000-8700,9700,9701
+126 IF (ONCTPCD="C323")!(ONCTPCD="C328")!(ONCTPCD="C329")
Begin DoDot:1
+127 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00130"
End DoDot:1
IF ONCSCMA'=0
QUIT
+128 ;
+129 ;LARYNX SUBGLOTTIC: C322 H8000-8700,9700,9701
+130 IF ONCTPCD="C322"
Begin DoDot:1
+131 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00133"
End DoDot:1
IF ONCSCMA'=0
QUIT
+132 ;
+133 ;LARYNX SUPRAGLOTTIC: C101,C321 H8000-8700,9700,9701
+134 IF (ONCTPCD="C101")!(ONCTPCD="C321")
Begin DoDot:1
+135 IF ((HST14>7999)&(HST14<8701))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00131"
End DoDot:1
IF ONCSCMA'=0
QUIT
+136 ;
+137 ;LIP: C003,C004,C005,C008,C009 H8000-8040,8042-8180,8191-8246,8248-8700,
+138 ; 8982,9700,9701
+139 IF (ONCTPCD="C003")!(ONCTPCD="C004")!(ONCTPCD="C005")!(ONCTPCD="C008")!(ONCTPCD="C009")
Begin DoDot:1
+140 IF ((HST14>7999)&(HST14<8041))!((HST14>8041)&(HST14<8181))!((HST14>8190)&(HST14<8247))!((HST14>8247)&(HST14<8701))!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00071"
End DoDot:1
IF ONCSCMA'=0
QUIT
+141 ;
+142 ;LIVER: C220 H8000-8700,8720-8790,9700,9701
+143 IF ONCTPCD="C220"
Begin DoDot:1
+144 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00220"
End DoDot:1
IF ONCSCMA'=0
QUIT
+145 ;
+146 ;LUNG: C340,C341,C342,C343,C348,C349 H8000-8700,8720-8790,8972,8980
+147 ; 9700,9701
+148 IF (ONCTPCD="C340")!(ONCTPCD="C341")!(ONCTPCD="C342")!(ONCTPCD="C343")!(ONCTPCD="C348")!(ONCTPCD="C349")
Begin DoDot:1
+149 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8972)!(HST14=8980)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00360"
End DoDot:1
IF ONCSCMA'=0
QUIT
+150 ;
+151 ;LYMPHOMA: C000-C424,C470-C509,C511-C608,C619-C631,C637-C689,C691-C694,
+152 ; C698-C699,C739-C749,C760-C809 H9590,9596-9663,9673-9699,9702-9719,
+153 ; 9725-9726,9735,9737-9738
+154 ; or C440,C442-C449,C510,C609,C632 H9590,9596,9650-9663,9673-9679,9687-
+155 ; 9699,9702-9705,9714-9717,9725,9735,9737-9738
+156 ; or C700-C729,C750-C759 H9590,9596-9663,9673-9679,9687-9698,9716-9719
+157 ; 9725-9726,9735,9737-9738 HST5 MUST = 3
+158 ; or C000-C440,C442-C689,C691-C694,C698-C699,C700-C729,C739-C749,C750-
+159 ; C759,C760-C809 H9591 DISCR1=3,9
+160 ; or C700-C729, C751-C753 H95913 DISCR1=3,9
+161 ; or C750,C754-C759 H9680,9699,9702-9714
+162 ; or C000-C440,C442-C689,C691-C694,C698-C699,C700-C729,C739-C749,C750-
+163 ; C759,C760-C809 H9826-9827 HST5 MUST = 3
+164 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<425))!((ONCT3>469)&(ONCT3<510))!((ONCT3>510)&(ONCT3<609))!((ONCT3>618)&(ONCT3<632))!((ONCT3>636)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<700))
Begin DoDot:1
+165 IF (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9700))!((HST14>9701)&(HST14<9720))!((HST14>9724)&(HST14<9727))!(HST14=9735)!((HST14>9736)&(HST14<9739))
SET ONCSCMA="00790"
+166 IF (HST14=9591)
Begin DoDot:2
+167 IF ((ONCSDIS1=3)!(ONCSDIS1=9))
SET ONCSCMA="00790"
End DoDot:2
+168 IF (HST14=9826)!(HST14=9827)
SET ONCSCMA="00790"
End DoDot:1
IF ONCSCMA'=0
QUIT
+169 IF ((ONCT3>738)&(ONCT3<750))!((ONCT3>759)&(ONCT3<810))
Begin DoDot:1
+170 IF (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9700))!((HST14>9701)&(HST14<9720))!((HST14>9724)&(HST14<9727))!(HST14=9735)!((HST14>9736)&(HST14<9739))
SET ONCSCMA="00790"
+171 IF (HST14=9591)
Begin DoDot:2
+172 IF ((ONCSDIS1=3)!(ONCSDIS1=9))
SET ONCSCMA="00790"
End DoDot:2
+173 IF (HST14=9826)!(HST14=9827)
SET ONCSCMA="00790"
End DoDot:1
IF ONCSCMA'=0
QUIT
+174 IF "C440^C442^C443^C444^C445^C446^C447^C448^C449^C510^C609^C632"[ONCTPCD
Begin DoDot:1
+175 IF (HST14=9590)!(HST14=9596)!((HST14>9649)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9700))!((HST14>9701)&(HST14<9706))!((HST14>9713)&(HST14<9718))!(HST14=9725)!(HST14=9735)!(HST14=9737)!(HST14=9738)
SET ONCSCMA="00790"
End DoDot:1
IF ONCSCMA'=0
QUIT
+176 IF ((ONCT3>699)&(ONCT3<730))!((ONCT3>750)&(ONCT3<754))
Begin DoDot:1
+177 IF (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9699))!((HST14>9715)&(HST14<9720))!(HST14=9725)!(HST14=9726)!(HST14=9735)!((HST14>9736)&(HST14<9739))
Begin DoDot:2
+178 IF $EXTRACT(ONCHIST,5)=3
SET ONCSCMA="00790"
End DoDot:2
+179 IF (ONCHIST=95913)
Begin DoDot:2
+180 IF ((ONCSDIS1=3)!(ONCSDIS1=9))
SET ONCSCMA="00790"
End DoDot:2
+181 IF (ONCHIST=98263)!(ONCHIST=98273)
SET ONCSCMA="00790"
End DoDot:1
IF ONCSCMA'=0
+182 IF "C750^C754^C755^C756^C757^C758^C759"[ONCTPCD
Begin DoDot:1
+183 IF (HST14=9590)!((HST14>9595)&(HST14<9664))!((HST14>9672)&(HST14<9680))!((HST14>9686)&(HST14<9699))!((HST14>9715)&(HST14<9720))!(HST14=9725)!(HST14=9726)!(HST14=9735)!((HST14>9736)&(HST14<9739))
SET ONCSCMA="00790"
+184 IF (HST14=9680)!(HST14=9699)!((HST14>9701)&(HST14<9715))
SET ONCSCMA="00790"
End DoDot:1
IF ONCSCMA'=0
QUIT
+185 ;
+186 ;LYMPHOMA OCULAR ADNEXA: C441,C690,C695-C696 H9590-9699,9702-9719,9725-
+187 ; 9726,9734-9738,9823,9826-9827,9930
+188 IF "C441^C690^C695^C696"[ONCTPCD
Begin DoDot:1
+189 IF ((HST14>9589)&(HST14<9700))!((HST14>9701)&(HST14<9720))!(HST14=9725)!(HST14=9726)!((HST14>9733)&(HST14<9739))!(HST14=9823)!(HST14=9826)!(HST14=9827)!(HST14=9930)
SET ONCSCMA="00710"
End DoDot:1
IF ONCSCMA'=0
QUIT
+190 ;
+191 ;LYMPHOMA-CLL/SLL: C000-C440,C442-C689,C691-C694,C698-C809 H9823
+192 IF (ONCT3="000")!((ONCT3>0)&(ONCT3<441))!((ONCT3>441)&(ONCT3<690))!((ONCT3>690)&(ONCT3<695))!((ONCT3>697)&(ONCT3<810))
Begin DoDot:1
+193 IF (HST14=9823)
SET ONCSCMA="00795"
End DoDot:1
IF ONCSCMA'=0
QUIT
+194 ;
+195 ;MAJOR SALIVARY GLANDS: C079,C080,C081,C088,C089 H8000-8700,8720-8790,
+196 ; 8941,8974,8980,8982,9700,9701
+197 IF "C079^C080^C081^C088^C089"[ONCTPCD
Begin DoDot:1
+198 IF ((HST14>7999)&(HST14<8701))!((HST14>8719)&(HST14<8791))!(HST14=8941)!(HST14=8974)!(HST14=8980)!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00080"
End DoDot:1
IF ONCSCMA'=0
QUIT
+199 ;
+200 ;MAXILLARY SINUS: C310 H8000-8700,8941,8982,9700,9701
+201 IF ONCTPCD="C310"
Begin DoDot:1
+202 IF ((HST14>7999)&(HST14<8701))!(HST14=8941)!(HST14=8982)!(HST14=9700)!(HST14=9701)
SET ONCSCMA="00121"
End DoDot:1
IF ONCSCMA'=0
QUIT
+203 ;
+204 QUIT