ONC2PS1A ;Hines OIFO/RVD - Collaborative Staging v0205 conversion ;01/22/14
;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
;
N DISCRIM,EXT,HIST,HIST14,LN,LNE,METS,PSITE,SCHNAME,SITE,ONC6DE,ONC6SG
N SSF1,SSF2,SSF3,SSF5,ON10,ONC2960,ONC3010,ONC3020,ONC35
N SSF10,SSF12,SSF13,SSF19,SSF25
S SITE=$P($G(^ONCO(165.5,IEN,2)),U,1)
Q:SITE=""
S HIST=$$HIST^ONCFUNC(IEN)
S HIST14=$E(HIST,1,4)
S PSITE=$TR($$GET1^DIQ(164,SITE,1,"I"),".","")
S EXT=$P($G(^ONCO(165.5,IEN,"CS")),U,11)
S LN=$P($G(^ONCO(165.5,IEN,"CS")),U,12)
S LNE=$P($G(^ONCO(165.5,IEN,"CS")),U,2)
S METS=$P($G(^ONCO(165.5,IEN,"CS")),U,3)
S ONC2940=$P($G(^ONCO(165.5,IEN,"CS1")),U,1)
S ONC2960=$P($G(^ONCO(165.5,IEN,"CS1")),U,3)
S ONC2980=$P($G(^ONCO(165.5,IEN,"CS1")),U,5)
S ONC35=$P($G(^ONCO(165.5,IEN,"CS1")),U,12)
S DISCRIM=$$GET1^DIQ(165.5,IEN,240)
S ONC6DE=$$GET1^DIQ(165.5,IEN,162)
S ONC6SG=$$GET1^DIQ(165.5,IEN,166)
S ONC3010=$$GET1^DIQ(165.5,IEN,167)
S ONC3020=$$GET1^DIQ(165.5,IEN,168)
S SCHEMA=+$$SCHEMA^ONCSAPIS(.ONCSAPI,PSITE,HIST14,DISCRIM)
Q:SCHEMA<0
S SCHEMA=SCHNAME
S SSF1=$P($G(^ONCO(165.5,IEN,"CS")),U,5)
S SSF2=$P($G(^ONCO(165.5,IEN,"CS")),U,6)
S SSF3=$P($G(^ONCO(165.5,IEN,"CS")),U,7)
S SSF5=$P($G(^ONCO(165.5,IEN,"CS")),U,9)
S ON10=$P($G(^ONCO(165.5,IEN,"CS")),U,10)
S SSF10=$P($G(^ONCO(165.5,IEN,"CS2")),U,4)
S SSF12=$P($G(^ONCO(165.5,IEN,"CS2")),U,6)
S SSF13=$P($G(^ONCO(165.5,IEN,"CS2")),U,7)
S SSF19=$P($G(^ONCO(165.5,IEN,"CS2")),U,13)
S SSF25=$P($G(^ONCO(165.5,IEN,"CS2")),U,19)
;schema list for 3a AJCC 6/7 H&N
S ONCSC3A("BuccalMucosa")="",ONCSC3A("EpiglottisAnterior")="",ONCSC3A("GumLower")="",ONCSC3A("GumOther")=""
S ONCSC3A("GumUpper")="",ONCSC3A("Hypopharynx")="",ONCSC3A("LarynxGlottic")="",ONCSC3A("LarynxOther")=""
S ONCSC3A("LarynxSubglottic")="",ONCSC3A("LarynxSupraglottic")="",ONCSC3A("LipLower")="",ONCSCH3A("LipOther")=""
S ONCSC3A("LipUpper")="",ONCSC3A("Nasopharynx")="",ONCSC3A("Oropharynx")="",ONCSC3A("PalateHard")=""
S ONCSC3A("PalateSoft")="",ONCSC3A("ParotidGland")="",ONCSC3A("PharayngealTonsil")="",ONCSC3A("SubmandibularGland")=""
S ONCAC3A("TongueBase")=""
;
;schema list for 3b AJCC 6 Blank Tis
;S ONCSC3B("Appendix")="",ONCSC3B("CarcinoidAppendix")="",ONCSC3B("NETColon")="",ONCSC3B("NETRectum")=""
;S ONCSC3B("Colon")="",ONCSC3B("Rectum")="",ONCSC3B("Breast")="",ONCSC3B("Bladder")=""
;
;CS version list 2935
S ONC35DAT("000937")="",ONC35DAT("010000")="",ONC35DAT("010002")="",ONC35DAT("010003")="",ONC35DAT("010004")=""
S ONC35DAT("010005")="",ONC35DAT("010100")="",ONC35DAT("010200")="",ONC35DAT("010300")="",ONC35DAT("010400")=""
S ONC35DAT("010401")="",ONC35DAT("020001")="",ONC35DAT("020100")="",ONC35DAT("020200")="",ONC35DAT("020302")=""
S ONC35DAT("020440")=""
;
;if dt dx is > 12/31/13
I DATEDX>3131231 S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1,$P(^ONCO(165.5,IEN,"CS3"),U,3)="1 2014 DX" Q
;
I ($G(SCHEMA)="Nasopharynx"),(LN=130!LN=430!LN=530) D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1,$P(^ONCO(165.5,IEN,"CS3"),U,3)="2a Nasopharynx Nodes"
;
I $G(SCHEMA)="BileDuctsIntraHepat",(SSF10=000!SSF10=999) D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="2b BileDuctsIntraHepat SSF10"
;
I $G(SCHEMA)="Bladder",(LN=400!LN=450) D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="2c Bladder Nodes"
;
;code for 3a AJCC 6 H&N
I $D(ONCSC3A(SCHEMA)),DATEDX<310000,SSF1=988,ONC6DE="",ONC6SG="" D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3a AJCC 6 Blank H&N"
;
;code for 3b AJCC 6 Blank Tis
I SCHEMA="Appendix"!SCHEMA="CarcinoidAppendix"!SCHEMA="NETColon"!SCHEMA="NETRectum" D Q
.I (ON10="000"!ON10="050"),(LN'="000"!LN'="999"),(METS'="00"!METS'="99"),ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
I (SCHEMA="Colon"!SCHEMA="Rectum"),(ON10="000"!ON10="050"!ON10="100"!ON10="110"!ON10="120") D Q
.I (LN'="000"!LN'="999"),(METS'="00"!METS="99"),ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
I (SCHEMA="Breast"),(ON10="000"!ON10="050"!ON10="070") D Q
.I (LN'="000"!LN'="999"),(METS'="00"!METS'="99"),ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
I (SCHEMA="Bladder"),(ON10="010"!ON10="030"!ON10="060"!ON10="100") D Q
.I (LN'="000"!LN'="999"),(METS'="00"!METS'="99"),ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
;
;for 3c AJCC 6 Blank GI Nodes
I (SCHEMA="Esophagus"!SCHEMA="EsophagusGEJunction"!SCHEMA="Stomach"),DATEDX<3100000 D Q
.I ((LN>99)&(LN<501)),(LNE=0!LNE=1!LNE=5!LNE=9),(SSF2="000"!SSF2="988"),ON2960="",ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
I (SCHEMA="Appendix"!SCHEMA="Colon"!SCHEMA="Rectum"),DATEDX<3100000 D Q
.I ((LN>99)&(LN<301)),(LNE=0!LNE=1!LNE=5!LNE=9),SSF2="000",ON2960="",ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
;
;code for 3d AJCC 6 Blank Invalid CS Version"
I $G(ONC35),'$D(ONC35DAT(ONC35)),(ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="") D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3d AJCC 6 Blank Invalid CS Version"
;
;code for "3e AJCC 6 Blank Other"
I $G(ONC35),$D(ONC35DAT(ONC35)),(ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="") D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3e AJCC 6 Blank Other"
;
;code for 3a AJCC 7 H&N
I $D(ONCSC3A(SCHEMA)),DATEDX>310000,SSF1=988,ONC6DE="",ONC6SG="" D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3a AJCC 7 Blank H&N"
;
;code for 3c AJCC 7 Blank GI Nodes
I (SCHEMA="Esophagus"!SCHEMA="EsophagusGEJunction"!SCHEMA="Stomach"),DATEDX>3100000 D Q
.I ((LN>99)&(LN<501)),(LNE=0!LNE=1!LNE=5!LNE=9),(SSF2="000"!SSF2="988"),ON2960="",ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
I (SCHEMA="Appendix"!SCHEMA="Colon"!SCHEMA="Rectum"),DATEDX>3100000 D Q
.I ((LN>99)&(LN<301)),(LNE=0!LNE=1!LNE=5!LNE=9),SSF2="000",ON2960="",ONC6SG="" D
..S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
..S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 7 Blank GI Nodes"
;
;code for 3e AJCC 7 Blank Other
I $G(ONC35),'$D(ONC35DAT(ONC35)),DATEDX>3100000,(ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="") D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3e AJCC 7 Blank Other"
;
;code for 3d SS1977 Blank Invalid CS Version"
I $G(ONC35),'$D(ONC35DAT(ONC35)),ONC3010="" D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3d SS1977 Blank Invalid CS Version"
;
;code for 3e SS1977 Blank Other
I $G(ONC35),$D(ONC35DAT(ONC35)),ONC3010="" D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3e SS1977 Blank Other"
;
;code for 3d SS2000 Blank Invalid CS Version
I $G(ONC35),'$D(ONC35DAT(ONC35)),ONC3020="" D Q
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3d SS2000 Blank Invalid CS Version"
;
;code for 3e SS2000 Blank Other
I $G(ONC35),$D(ONC35DAT(ONC35)),ONC3020="" D
.S $P(^ONCO(165.5,IEN,"CS3"),U,2)=1
.S $P(^ONCO(165.5,IEN,"CS3"),U,3)="3e SS2000 Blank Other"
Q
;
CLEANUP ;Cleanup
K EXT,IEN,LN,METS,ONCSAPI,SCHEMA,SITE
K SSF1,SSF2,SSF3,SSF5,SSF12,SSF13,SSF25
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONC2PS1A 7595 printed Dec 13, 2024@02:21:56 Page 2
ONC2PS1A ;Hines OIFO/RVD - Collaborative Staging v0205 conversion ;01/22/14
+1 ;;2.2;ONCOLOGY;**1**;Jul 31, 2013;Build 8
+2 ;
+3 NEW DISCRIM,EXT,HIST,HIST14,LN,LNE,METS,PSITE,SCHNAME,SITE,ONC6DE,ONC6SG
+4 NEW SSF1,SSF2,SSF3,SSF5,ON10,ONC2960,ONC3010,ONC3020,ONC35
+5 NEW SSF10,SSF12,SSF13,SSF19,SSF25
+6 SET SITE=$PIECE($GET(^ONCO(165.5,IEN,2)),U,1)
+7 if SITE=""
QUIT
+8 SET HIST=$$HIST^ONCFUNC(IEN)
+9 SET HIST14=$EXTRACT(HIST,1,4)
+10 SET PSITE=$TRANSLATE($$GET1^DIQ(164,SITE,1,"I"),".","")
+11 SET EXT=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,11)
+12 SET LN=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,12)
+13 SET LNE=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,2)
+14 SET METS=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,3)
+15 SET ONC2940=$PIECE($GET(^ONCO(165.5,IEN,"CS1")),U,1)
+16 SET ONC2960=$PIECE($GET(^ONCO(165.5,IEN,"CS1")),U,3)
+17 SET ONC2980=$PIECE($GET(^ONCO(165.5,IEN,"CS1")),U,5)
+18 SET ONC35=$PIECE($GET(^ONCO(165.5,IEN,"CS1")),U,12)
+19 SET DISCRIM=$$GET1^DIQ(165.5,IEN,240)
+20 SET ONC6DE=$$GET1^DIQ(165.5,IEN,162)
+21 SET ONC6SG=$$GET1^DIQ(165.5,IEN,166)
+22 SET ONC3010=$$GET1^DIQ(165.5,IEN,167)
+23 SET ONC3020=$$GET1^DIQ(165.5,IEN,168)
+24 SET SCHEMA=+$$SCHEMA^ONCSAPIS(.ONCSAPI,PSITE,HIST14,DISCRIM)
+25 if SCHEMA<0
QUIT
+26 SET SCHEMA=SCHNAME
+27 SET SSF1=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,5)
+28 SET SSF2=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,6)
+29 SET SSF3=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,7)
+30 SET SSF5=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,9)
+31 SET ON10=$PIECE($GET(^ONCO(165.5,IEN,"CS")),U,10)
+32 SET SSF10=$PIECE($GET(^ONCO(165.5,IEN,"CS2")),U,4)
+33 SET SSF12=$PIECE($GET(^ONCO(165.5,IEN,"CS2")),U,6)
+34 SET SSF13=$PIECE($GET(^ONCO(165.5,IEN,"CS2")),U,7)
+35 SET SSF19=$PIECE($GET(^ONCO(165.5,IEN,"CS2")),U,13)
+36 SET SSF25=$PIECE($GET(^ONCO(165.5,IEN,"CS2")),U,19)
+37 ;schema list for 3a AJCC 6/7 H&N
+38 SET ONCSC3A("BuccalMucosa")=""
SET ONCSC3A("EpiglottisAnterior")=""
SET ONCSC3A("GumLower")=""
SET ONCSC3A("GumOther")=""
+39 SET ONCSC3A("GumUpper")=""
SET ONCSC3A("Hypopharynx")=""
SET ONCSC3A("LarynxGlottic")=""
SET ONCSC3A("LarynxOther")=""
+40 SET ONCSC3A("LarynxSubglottic")=""
SET ONCSC3A("LarynxSupraglottic")=""
SET ONCSC3A("LipLower")=""
SET ONCSCH3A("LipOther")=""
+41 SET ONCSC3A("LipUpper")=""
SET ONCSC3A("Nasopharynx")=""
SET ONCSC3A("Oropharynx")=""
SET ONCSC3A("PalateHard")=""
+42 SET ONCSC3A("PalateSoft")=""
SET ONCSC3A("ParotidGland")=""
SET ONCSC3A("PharayngealTonsil")=""
SET ONCSC3A("SubmandibularGland")=""
+43 SET ONCAC3A("TongueBase")=""
+44 ;
+45 ;schema list for 3b AJCC 6 Blank Tis
+46 ;S ONCSC3B("Appendix")="",ONCSC3B("CarcinoidAppendix")="",ONCSC3B("NETColon")="",ONCSC3B("NETRectum")=""
+47 ;S ONCSC3B("Colon")="",ONCSC3B("Rectum")="",ONCSC3B("Breast")="",ONCSC3B("Bladder")=""
+48 ;
+49 ;CS version list 2935
+50 SET ONC35DAT("000937")=""
SET ONC35DAT("010000")=""
SET ONC35DAT("010002")=""
SET ONC35DAT("010003")=""
SET ONC35DAT("010004")=""
+51 SET ONC35DAT("010005")=""
SET ONC35DAT("010100")=""
SET ONC35DAT("010200")=""
SET ONC35DAT("010300")=""
SET ONC35DAT("010400")=""
+52 SET ONC35DAT("010401")=""
SET ONC35DAT("020001")=""
SET ONC35DAT("020100")=""
SET ONC35DAT("020200")=""
SET ONC35DAT("020302")=""
+53 SET ONC35DAT("020440")=""
+54 ;
+55 ;if dt dx is > 12/31/13
+56 IF DATEDX>3131231
SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="1 2014 DX"
QUIT
+57 ;
+58 IF ($GET(SCHEMA)="Nasopharynx")
IF (LN=130!LN=430!LN=530)
Begin DoDot:1
+59 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="2a Nasopharynx Nodes"
End DoDot:1
QUIT
+60 ;
+61 IF $GET(SCHEMA)="BileDuctsIntraHepat"
IF (SSF10=000!SSF10=999)
Begin DoDot:1
+62 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+63 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="2b BileDuctsIntraHepat SSF10"
End DoDot:1
QUIT
+64 ;
+65 IF $GET(SCHEMA)="Bladder"
IF (LN=400!LN=450)
Begin DoDot:1
+66 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+67 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="2c Bladder Nodes"
End DoDot:1
QUIT
+68 ;
+69 ;code for 3a AJCC 6 H&N
+70 IF $DATA(ONCSC3A(SCHEMA))
IF DATEDX<310000
IF SSF1=988
IF ONC6DE=""
IF ONC6SG=""
Begin DoDot:1
+71 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+72 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3a AJCC 6 Blank H&N"
End DoDot:1
QUIT
+73 ;
+74 ;code for 3b AJCC 6 Blank Tis
+75 IF SCHEMA="Appendix"!SCHEMA="CarcinoidAppendix"!SCHEMA="NETColon"!SCHEMA="NETRectum"
Begin DoDot:1
+76 IF (ON10="000"!ON10="050")
IF (LN'="000"!LN'="999")
IF (METS'="00"!METS'="99")
IF ONC6SG=""
Begin DoDot:2
+77 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+78 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
End DoDot:2
End DoDot:1
QUIT
+79 IF (SCHEMA="Colon"!SCHEMA="Rectum")
IF (ON10="000"!ON10="050"!ON10="100"!ON10="110"!ON10="120")
Begin DoDot:1
+80 IF (LN'="000"!LN'="999")
IF (METS'="00"!METS="99")
IF ONC6SG=""
Begin DoDot:2
+81 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+82 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
End DoDot:2
End DoDot:1
QUIT
+83 IF (SCHEMA="Breast")
IF (ON10="000"!ON10="050"!ON10="070")
Begin DoDot:1
+84 IF (LN'="000"!LN'="999")
IF (METS'="00"!METS'="99")
IF ONC6SG=""
Begin DoDot:2
+85 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+86 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
End DoDot:2
End DoDot:1
QUIT
+87 IF (SCHEMA="Bladder")
IF (ON10="010"!ON10="030"!ON10="060"!ON10="100")
Begin DoDot:1
+88 IF (LN'="000"!LN'="999")
IF (METS'="00"!METS'="99")
IF ONC6SG=""
Begin DoDot:2
+89 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+90 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3b AJCC 6 Blank Tis"
End DoDot:2
End DoDot:1
QUIT
+91 ;
+92 ;for 3c AJCC 6 Blank GI Nodes
+93 IF (SCHEMA="Esophagus"!SCHEMA="EsophagusGEJunction"!SCHEMA="Stomach")
IF DATEDX<3100000
Begin DoDot:1
+94 IF ((LN>99)&(LN<501))
IF (LNE=0!LNE=1!LNE=5!LNE=9)
IF (SSF2="000"!SSF2="988")
IF ON2960=""
IF ONC6SG=""
Begin DoDot:2
+95 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+96 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
End DoDot:2
End DoDot:1
QUIT
+97 IF (SCHEMA="Appendix"!SCHEMA="Colon"!SCHEMA="Rectum")
IF DATEDX<3100000
Begin DoDot:1
+98 IF ((LN>99)&(LN<301))
IF (LNE=0!LNE=1!LNE=5!LNE=9)
IF SSF2="000"
IF ON2960=""
IF ONC6SG=""
Begin DoDot:2
+99 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+100 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
End DoDot:2
End DoDot:1
QUIT
+101 ;
+102 ;code for 3d AJCC 6 Blank Invalid CS Version"
+103 IF $GET(ONC35)
IF '$DATA(ONC35DAT(ONC35))
IF (ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="")
Begin DoDot:1
+104 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+105 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3d AJCC 6 Blank Invalid CS Version"
End DoDot:1
QUIT
+106 ;
+107 ;code for "3e AJCC 6 Blank Other"
+108 IF $GET(ONC35)
IF $DATA(ONC35DAT(ONC35))
IF (ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="")
Begin DoDot:1
+109 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+110 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3e AJCC 6 Blank Other"
End DoDot:1
QUIT
+111 ;
+112 ;code for 3a AJCC 7 H&N
+113 IF $DATA(ONCSC3A(SCHEMA))
IF DATEDX>310000
IF SSF1=988
IF ONC6DE=""
IF ONC6SG=""
Begin DoDot:1
+114 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+115 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3a AJCC 7 Blank H&N"
End DoDot:1
QUIT
+116 ;
+117 ;code for 3c AJCC 7 Blank GI Nodes
+118 IF (SCHEMA="Esophagus"!SCHEMA="EsophagusGEJunction"!SCHEMA="Stomach")
IF DATEDX>3100000
Begin DoDot:1
+119 IF ((LN>99)&(LN<501))
IF (LNE=0!LNE=1!LNE=5!LNE=9)
IF (SSF2="000"!SSF2="988")
IF ON2960=""
IF ONC6SG=""
Begin DoDot:2
+120 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+121 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 6 Blank GI Nodes"
End DoDot:2
End DoDot:1
QUIT
+122 IF (SCHEMA="Appendix"!SCHEMA="Colon"!SCHEMA="Rectum")
IF DATEDX>3100000
Begin DoDot:1
+123 IF ((LN>99)&(LN<301))
IF (LNE=0!LNE=1!LNE=5!LNE=9)
IF SSF2="000"
IF ON2960=""
IF ONC6SG=""
Begin DoDot:2
+124 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+125 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3c AJCC 7 Blank GI Nodes"
End DoDot:2
End DoDot:1
QUIT
+126 ;
+127 ;code for 3e AJCC 7 Blank Other
+128 IF $GET(ONC35)
IF '$DATA(ONC35DAT(ONC35))
IF DATEDX>3100000
IF (ONC2940=""!ONC2960=""!ONC2980=""!ONC6SG="")
Begin DoDot:1
+129 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+130 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3e AJCC 7 Blank Other"
End DoDot:1
QUIT
+131 ;
+132 ;code for 3d SS1977 Blank Invalid CS Version"
+133 IF $GET(ONC35)
IF '$DATA(ONC35DAT(ONC35))
IF ONC3010=""
Begin DoDot:1
+134 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+135 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3d SS1977 Blank Invalid CS Version"
End DoDot:1
QUIT
+136 ;
+137 ;code for 3e SS1977 Blank Other
+138 IF $GET(ONC35)
IF $DATA(ONC35DAT(ONC35))
IF ONC3010=""
Begin DoDot:1
+139 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+140 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3e SS1977 Blank Other"
End DoDot:1
QUIT
+141 ;
+142 ;code for 3d SS2000 Blank Invalid CS Version
+143 IF $GET(ONC35)
IF '$DATA(ONC35DAT(ONC35))
IF ONC3020=""
Begin DoDot:1
+144 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+145 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3d SS2000 Blank Invalid CS Version"
End DoDot:1
QUIT
+146 ;
+147 ;code for 3e SS2000 Blank Other
+148 IF $GET(ONC35)
IF $DATA(ONC35DAT(ONC35))
IF ONC3020=""
Begin DoDot:1
+149 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,2)=1
+150 SET $PIECE(^ONCO(165.5,IEN,"CS3"),U,3)="3e SS2000 Blank Other"
End DoDot:1
+151 QUIT
+152 ;
CLEANUP ;Cleanup
+1 KILL EXT,IEN,LN,METS,ONCSAPI,SCHEMA,SITE
+2 KILL SSF1,SSF2,SSF3,SSF5,SSF12,SSF13,SSF25