ONCSG4A ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;07/15/02
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;
;GYNECOLOGICAL SITES (continued)
;
OVA345 ;Ovary - 3rd, 4th and 5th editions
I M S SG=4
E I $E(M)=0,$E(N)=0,$L(T)=2,"123"[$E(T),"ABC"[$E(T,2) S SG=T
E I $E(N)=1,$E(M)=0 S SG="3C"
E S SG=99
Q
;
OVA6 ;Ovary - 6th edition
S TNM=T_N_M D K TNM Q
.I TNM=100 S SG=1 Q ;I T1 N0 M0
.I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
.I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
.I TNM="1C00" S SG="1C" Q ;IC T1c N0 M0
.I TNM=200 S SG=2 Q ;II T2 N0 M0
.I TNM="2A00" S SG="2A" Q ;IIA T2a N0 M0
.I TNM="2B00" S SG="2B" Q ;IIB T2b N0 M0
.I TNM="2C00" S SG="2C" Q ;IIC T2c N0 M0
.I TNM=300 S SG=3 Q ;III T3 N0 M0
.I TNM="3A00" S SG="3A" Q ;IIIA T3a N0 M0
.I TNM="3B00" S SG="3B" Q ;IIIB T3b N0 M0
.I TNM="3C00" S SG="3C" Q ;IIIC T3c N0 M0
.I N=1,M=0 S SG="3C" Q ; Any T N1 M0
.I M=1 S SG=4 Q ;IV Any T Any N M1
;
FT5 ;Fallopian Tube - 5th edition
S TNM=T_N_M D K TNM Q
.I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
.I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
.I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
.I TNM="1C00" S SG="1C" Q ;IC T1c N0 M0
.I TNM="2A00" S SG="2A" Q ;IIA T2a N0 M0
.I TNM="2B00" S SG="2B" Q ;IIB T2b N0 M0
.I TNM="2C00" S SG="2C" Q ;IIC T2c N0 M0
.I TNM="3A00" S SG="3A" Q ;IIIA T3a N0 M0
.I TNM="3B00" S SG="3B" Q ;IIIB T3b N0 M0
.I TNM="3C00" S SG="3C" Q ;IIIC T3c N0 M0
.I N=1,M=0 S SG="3C" Q ; Any T N1 M0
.I M=1 S SG=4 Q ;IV Any T Any N M1
;
FT6 ;Fallopian Tube - 6th edition
S TNM=T_N_M D K TNM Q
.I TNM="IS00" S SG=0 Q ;0 Tis N0 M0
.I TNM=100 S SG=1 Q ;I T1 N0 M0
.I TNM="1A00" S SG="1A" Q ;IA T1a N0 M0
.I TNM="1B00" S SG="1B" Q ;IB T1b N0 M0
.I TNM="1C00" S SG="1C" Q ;IC T1c N0 M0
.I TNM=200 S SG=2 Q ;II T2 N0 M0
.I TNM="2A00" S SG="2A" Q ;IIA T2a N0 M0
.I TNM="2B00" S SG="2B" Q ;IIB T2b N0 M0
.I TNM="2C00" S SG="2C" Q ;IIC T2c N0 M0
.I TNM=300 S SG=3 Q ;III T3 N0 M0
.I TNM="3A00" S SG="3A" Q ;IIIA T3a N0 M0
.I TNM="3B00" S SG="3B" Q ;IIIB T3b N0 M0
.I TNM="3C00" S SG="3C" Q ;IIIC T3c N0 M0
.I N=1,M=0 S SG="3C" Q ; Any T N1 M0
.I M=1 S SG=4 Q ;IV Any T Any N M1
;
GTT5 ;Gestational Trophoblastic Tumors - 5th edition
S:$G(STGIND)="C" RF=$P($G(^ONCO(165.5,D0,2.1)),U,12)
S:$G(STGIND)="P" RF=$P($G(^ONCO(165.5,D0,2.1)),U,13)
S TNM=T_M_RF D K TNM,RF Q ; T M Risk Factors
.I TNM="100" S SG="1A" Q ;IA T1 M0 w/o
.I TNM="101" S SG="1B" Q ;IB T1 M0 1
.I TNM="102" S SG="1B" Q ; T1 M0 1
.I TNM="103" S SG="1C" Q ;IC T1 M0 2
.I TNM="200" S SG="2A" Q ;IIA T2 M0 w/o
.I TNM="201" S SG="2B" Q ;IIB T2 M0 1
.I TNM="202" S SG="2B" Q ; T2 M0 1
.I TNM="203" S SG="2C" Q ;IIC T2 M0 2
.I M="1A",RF=0 S SG="3A" Q ;IIIA Any T M1a w/o
.I M="1A",RF=1 S SG="3B" Q ;IIIB Any T M1a 1
.I M="1A",RF=2 S SG="3B" Q ; Any T M1a 1
.I M="1A",RF=3 S SG="3C" Q ;IIIC Any T M1a 2
.I M="1B",RF=0 S SG="4A" Q ;IVA Any T M1b w/o
.I M="1B",RF=1 S SG="4B" Q ;IVB Any T M1b 1
.I M="1B",RF=2 S SG="4B" Q ; Any T M1b 1
.I M="1B",RF=3 S SG="4C" Q ;IVC Any T M1b 2
;
GTT6 ;Gestational Trophoblastic Tumors - 6th edition
S:$G(STGIND)="C" RF=$P($G(^ONCO(165.5,D0,2.1)),U,12)
S:$G(STGIND)="P" RF=$P($G(^ONCO(165.5,D0,2.1)),U,13)
S TNM=T_M_RF D K TNM,RF Q ; T M Risk Factors
.I TNM="10U" S SG=1 Q ;I T1 M0 Unknown
.I TNM="10L" S SG="1A" Q ;IA T1 M0 Low risk
.I TNM="10H" S SG="1b" Q ;IB T1 M0 High risk
.I TNM="20U" S SG=2 Q ;II T2 M0 Unknown
.I TNM="20L" S SG="2A" Q ;IIA T1 M0 Low risk
.I TNM="20H" S SG="2B" Q ;IIB T1 M0 High risk
.I M="1A",RF="U" S SG=3 Q ;III Any T M1a Unknown
.I M="1A",RF="L" S SG="3A" Q ;IIIA Any T M1a Low risk
.I M="1A",RF="H" S SG="3B" Q ;IIIB Any T M1a High risk
.I M="1B",RF="U" S SG=4 Q ;IV Any T M1b Unknown
.I M="1B",RF="L" S SG="4A" Q ;IVA Any T M1b Low risk
.I M="1B",RF="H" S SG="4B" Q ;IVB Any T M1b High risk
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCSG4A 4591 printed Dec 13, 2024@02:28:25 Page 2
ONCSG4A ;Hines OIFO/GWB - AUTOMATIC STAGING TABLES ;07/15/02
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;
+3 ;GYNECOLOGICAL SITES (continued)
+4 ;
OVA345 ;Ovary - 3rd, 4th and 5th editions
+1 IF M
SET SG=4
+2 IF '$TEST
IF $EXTRACT(M)=0
IF $EXTRACT(N)=0
IF $LENGTH(T)=2
IF "123"[$EXTRACT(T)
IF "ABC"[$EXTRACT(T,2)
SET SG=T
+3 IF '$TEST
IF $EXTRACT(N)=1
IF $EXTRACT(M)=0
SET SG="3C"
+4 IF '$TEST
SET SG=99
+5 QUIT
+6 ;
OVA6 ;Ovary - 6th edition
+1 SET TNM=T_N_M
Begin DoDot:1
+2 ;I T1 N0 M0
IF TNM=100
SET SG=1
QUIT
+3 ;IA T1a N0 M0
IF TNM="1A00"
SET SG="1A"
QUIT
+4 ;IB T1b N0 M0
IF TNM="1B00"
SET SG="1B"
QUIT
+5 ;IC T1c N0 M0
IF TNM="1C00"
SET SG="1C"
QUIT
+6 ;II T2 N0 M0
IF TNM=200
SET SG=2
QUIT
+7 ;IIA T2a N0 M0
IF TNM="2A00"
SET SG="2A"
QUIT
+8 ;IIB T2b N0 M0
IF TNM="2B00"
SET SG="2B"
QUIT
+9 ;IIC T2c N0 M0
IF TNM="2C00"
SET SG="2C"
QUIT
+10 ;III T3 N0 M0
IF TNM=300
SET SG=3
QUIT
+11 ;IIIA T3a N0 M0
IF TNM="3A00"
SET SG="3A"
QUIT
+12 ;IIIB T3b N0 M0
IF TNM="3B00"
SET SG="3B"
QUIT
+13 ;IIIC T3c N0 M0
IF TNM="3C00"
SET SG="3C"
QUIT
+14 ; Any T N1 M0
IF N=1
IF M=0
SET SG="3C"
QUIT
+15 ;IV Any T Any N M1
IF M=1
SET SG=4
QUIT
End DoDot:1
KILL TNM
QUIT
+16 ;
FT5 ;Fallopian Tube - 5th edition
+1 SET TNM=T_N_M
Begin DoDot:1
+2 ;0 Tis N0 M0
IF TNM="IS00"
SET SG=0
QUIT
+3 ;IA T1a N0 M0
IF TNM="1A00"
SET SG="1A"
QUIT
+4 ;IB T1b N0 M0
IF TNM="1B00"
SET SG="1B"
QUIT
+5 ;IC T1c N0 M0
IF TNM="1C00"
SET SG="1C"
QUIT
+6 ;IIA T2a N0 M0
IF TNM="2A00"
SET SG="2A"
QUIT
+7 ;IIB T2b N0 M0
IF TNM="2B00"
SET SG="2B"
QUIT
+8 ;IIC T2c N0 M0
IF TNM="2C00"
SET SG="2C"
QUIT
+9 ;IIIA T3a N0 M0
IF TNM="3A00"
SET SG="3A"
QUIT
+10 ;IIIB T3b N0 M0
IF TNM="3B00"
SET SG="3B"
QUIT
+11 ;IIIC T3c N0 M0
IF TNM="3C00"
SET SG="3C"
QUIT
+12 ; Any T N1 M0
IF N=1
IF M=0
SET SG="3C"
QUIT
+13 ;IV Any T Any N M1
IF M=1
SET SG=4
QUIT
End DoDot:1
KILL TNM
QUIT
+14 ;
FT6 ;Fallopian Tube - 6th edition
+1 SET TNM=T_N_M
Begin DoDot:1
+2 ;0 Tis N0 M0
IF TNM="IS00"
SET SG=0
QUIT
+3 ;I T1 N0 M0
IF TNM=100
SET SG=1
QUIT
+4 ;IA T1a N0 M0
IF TNM="1A00"
SET SG="1A"
QUIT
+5 ;IB T1b N0 M0
IF TNM="1B00"
SET SG="1B"
QUIT
+6 ;IC T1c N0 M0
IF TNM="1C00"
SET SG="1C"
QUIT
+7 ;II T2 N0 M0
IF TNM=200
SET SG=2
QUIT
+8 ;IIA T2a N0 M0
IF TNM="2A00"
SET SG="2A"
QUIT
+9 ;IIB T2b N0 M0
IF TNM="2B00"
SET SG="2B"
QUIT
+10 ;IIC T2c N0 M0
IF TNM="2C00"
SET SG="2C"
QUIT
+11 ;III T3 N0 M0
IF TNM=300
SET SG=3
QUIT
+12 ;IIIA T3a N0 M0
IF TNM="3A00"
SET SG="3A"
QUIT
+13 ;IIIB T3b N0 M0
IF TNM="3B00"
SET SG="3B"
QUIT
+14 ;IIIC T3c N0 M0
IF TNM="3C00"
SET SG="3C"
QUIT
+15 ; Any T N1 M0
IF N=1
IF M=0
SET SG="3C"
QUIT
+16 ;IV Any T Any N M1
IF M=1
SET SG=4
QUIT
End DoDot:1
KILL TNM
QUIT
+17 ;
GTT5 ;Gestational Trophoblastic Tumors - 5th edition
+1 if $GET(STGIND)="C"
SET RF=$PIECE($GET(^ONCO(165.5,D0,2.1)),U,12)
+2 if $GET(STGIND)="P"
SET RF=$PIECE($GET(^ONCO(165.5,D0,2.1)),U,13)
+3 ; T M Risk Factors
SET TNM=T_M_RF
Begin DoDot:1
+4 ;IA T1 M0 w/o
IF TNM="100"
SET SG="1A"
QUIT
+5 ;IB T1 M0 1
IF TNM="101"
SET SG="1B"
QUIT
+6 ; T1 M0 1
IF TNM="102"
SET SG="1B"
QUIT
+7 ;IC T1 M0 2
IF TNM="103"
SET SG="1C"
QUIT
+8 ;IIA T2 M0 w/o
IF TNM="200"
SET SG="2A"
QUIT
+9 ;IIB T2 M0 1
IF TNM="201"
SET SG="2B"
QUIT
+10 ; T2 M0 1
IF TNM="202"
SET SG="2B"
QUIT
+11 ;IIC T2 M0 2
IF TNM="203"
SET SG="2C"
QUIT
+12 ;IIIA Any T M1a w/o
IF M="1A"
IF RF=0
SET SG="3A"
QUIT
+13 ;IIIB Any T M1a 1
IF M="1A"
IF RF=1
SET SG="3B"
QUIT
+14 ; Any T M1a 1
IF M="1A"
IF RF=2
SET SG="3B"
QUIT
+15 ;IIIC Any T M1a 2
IF M="1A"
IF RF=3
SET SG="3C"
QUIT
+16 ;IVA Any T M1b w/o
IF M="1B"
IF RF=0
SET SG="4A"
QUIT
+17 ;IVB Any T M1b 1
IF M="1B"
IF RF=1
SET SG="4B"
QUIT
+18 ; Any T M1b 1
IF M="1B"
IF RF=2
SET SG="4B"
QUIT
+19 ;IVC Any T M1b 2
IF M="1B"
IF RF=3
SET SG="4C"
QUIT
End DoDot:1
KILL TNM,RF
QUIT
+20 ;
GTT6 ;Gestational Trophoblastic Tumors - 6th edition
+1 if $GET(STGIND)="C"
SET RF=$PIECE($GET(^ONCO(165.5,D0,2.1)),U,12)
+2 if $GET(STGIND)="P"
SET RF=$PIECE($GET(^ONCO(165.5,D0,2.1)),U,13)
+3 ; T M Risk Factors
SET TNM=T_M_RF
Begin DoDot:1
+4 ;I T1 M0 Unknown
IF TNM="10U"
SET SG=1
QUIT
+5 ;IA T1 M0 Low risk
IF TNM="10L"
SET SG="1A"
QUIT
+6 ;IB T1 M0 High risk
IF TNM="10H"
SET SG="1b"
QUIT
+7 ;II T2 M0 Unknown
IF TNM="20U"
SET SG=2
QUIT
+8 ;IIA T1 M0 Low risk
IF TNM="20L"
SET SG="2A"
QUIT
+9 ;IIB T1 M0 High risk
IF TNM="20H"
SET SG="2B"
QUIT
+10 ;III Any T M1a Unknown
IF M="1A"
IF RF="U"
SET SG=3
QUIT
+11 ;IIIA Any T M1a Low risk
IF M="1A"
IF RF="L"
SET SG="3A"
QUIT
+12 ;IIIB Any T M1a High risk
IF M="1A"
IF RF="H"
SET SG="3B"
QUIT
+13 ;IV Any T M1b Unknown
IF M="1B"
IF RF="U"
SET SG=4
QUIT
+14 ;IVA Any T M1b Low risk
IF M="1B"
IF RF="L"
SET SG="4A"
QUIT
+15 ;IVB Any T M1b High risk
IF M="1B"
IF RF="H"
SET SG="4B"
QUIT
End DoDot:1
KILL TNM,RF
QUIT
+16 ;