ONCPSD ;HINES OIFO/GWB - STAGE OF DISEASE AT DIAGNOSIS PRINT ;10/05/11
;;2.2;ONCOLOGY;**1,6,9,10,12,13**;Jul 31, 2013;Build 7
;
PRT N DIC,DR,DA,DIQ,I,LEN,LOS,NOP,ONC,TXT,TXT1,TXT2,X
S DIC="^ONCO(165.5,"
S DR="34:35;37;89.1;38;88;19;89;39;149;151;29;29.3;29.4;29.5;30;31;32;33;65;66;25;44;241;242;280;1764"
S DA=D0,DIQ="ONC" D EN^DIQ1
F I=34,34.1,34.2,34.31,34.32,34.33,34.34,34.35,34.36,35,38,88,19,89,39,149,151,29,29.3,29.4,29.5,30,31,32,33,280,1764 S X=ONC(165.5,D0,I) D UCASE S ONC(165.5,D0,I)=X
I $P($G(^ONCO(165.5,D0,0)),U,16)<3160000 W !," Tumor Size...................: ",ONC(165.5,D0,29)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 D
.W !," Tumor Size Clinical..........: ",$E(ONC(165.5,D0,29.4),1,48)
.W !," Tumor Size Pathologic........: ",$E(ONC(165.5,D0,29.5),1,48)
.W !," Tumor Size Summary...........: ",$E(ONC(165.5,D0,29.3),1,48)
.Q
S TXT=ONC(165.5,D0,30),LEN=46 D TXT
I $P($G(^ONCO(165.5,D0,0)),U,16)<3180000 W !," Extension....................: ",TXT1 W:TXT2'="" !,?32,TXT2
I $P($G(^ONCO(165.5,D0,0)),U,16)<3180000 W !," Lymph Nodes..................: ",ONC(165.5,D0,31)
W !," Regional Lymph Nodes Examined: ",ONC(165.5,D0,33)
W !," Regional Lymph Nodes Positive: ",ONC(165.5,D0,32)
I $P($G(^ONCO(165.5,D0,0)),U,16)<3180000 W !," SEER Summary Stage 2000......: ",ONC(165.5,D0,35)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3171231 W !," SEER Summary Stage 2018......: ",ONC(165.5,D0,1764)
I $P($G(^ONCO(165.5,D0,0)),U,16)<3160000 W !," Site of Distant Metastasis #1: ",ONC(165.5,D0,34)
I $P($G(^ONCO(165.5,D0,0)),U,16)<3160000 W !," Site of Distant Metastasis #2: ",ONC(165.5,D0,34.1)
I $P($G(^ONCO(165.5,D0,0)),U,16)<3160000 W !," Site of Distant Metastasis #3: ",ONC(165.5,D0,34.2)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-BONE......: ",ONC(165.5,D0,34.31)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-BRAIN.....: ",ONC(165.5,D0,34.32)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-LIVER.....: ",ONC(165.5,D0,34.33)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-LUNG......: ",ONC(165.5,D0,34.34)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-DISTANT LN: ",ONC(165.5,D0,34.35)
I $P($G(^ONCO(165.5,D0,0)),U,16)>3151231 W !," METS AT DX-OTHER.....: ",ONC(165.5,D0,34.36)
W !," Clinical Stage Discussion....: ",ONC(165.5,D0,280)
W !
I $P($G(^ONCO(165.5,D0,0)),"^",16)>3171231 D
.W !," Extent of Disease (EOD) Data",!," ----------------------------"
.W !?1,"Primary Tumor: ",$P($G(^ONCO(165.5,D0,"EOD")),"^",1),?22,"Regional Nodes: ",$P($G(^ONCO(165.5,D0,"EOD")),"^",2),?44,"METS: ",$P($G(^ONCO(165.5,D0,"EOD")),"^",3),!
W !," Clinical Staging",?22,"TNM edition: ",$$TNMED^ONCOU55(D0),?41,"Pathologic Staging"
W !," ----------------"
I $P($G(^ONCO(165.5,D0,0)),"^",16)>3171231 D GTAJIEN^ONCSCHMG W ?22,"AJCC ID: ",$P($G(^ONCO(165.5,D0,"AJCC8")),"^",1)
W ?41,"------------------"
;
I $P($G(^ONCO(165.5,D0,0)),"^",16)<3180101 D
.W !," TNM........: ",ONC(165.5,D0,37)," ",$P($G(^ONCO(165.5,D0,24)),U,5),?41,"TNM........: ",ONC(165.5,D0,89.1)," ",$P($G(^ONCO(165.5,D0,24)),U,5)
.W !," Stage Group: ",ONC(165.5,D0,38)," ",$E($P(ONC(165.5,D0,241),"(",1),1,19),?41,"Stage Group: ",ONC(165.5,D0,88)," ",$E($P(ONC(165.5,D0,242),"(",1),1,19)
;
I $P($G(^ONCO(165.5,D0,0)),"^",16)>3171231 D
.N IEN S IEN=D0
.W !," TNM........: " S STGIND="C" D TNMDSP^ONCSGA8U W ?41,"TNM........: " S STGIND="P" D TNMDSP^ONCSGA8U
.W !," Stage Group: ",$P($G(^ONCO(165.5,D0,"AJCC8")),"^",5),?41,"Stage Group: ",$P($G(^ONCO(165.5,D0,"AJCC8")),"^",9)
.W !!," Post-Therapy Staging (yc)",?41,"Post-Therapy Staging (yp)"
.W !," --------------------------",?41,"--------------------------"
.W !," TNM........: " S STGIND="Y" D TNMDSP^ONCSGA8U W ?41,"TNM........: " S STGIND="T" D TNMDSP^ONCSGA8U
.W !?41,"Stage Group: ",$P($G(^ONCO(165.5,D0,"AJCC8")),"^",13),!
.Q
;
W !," Staged By..: ",$E(ONC(165.5,D0,19),1,25),?41,"Staged By..: ",$E(ONC(165.5,D0,89),1,25)
W !
W !," Other Staging System: ",ONC(165.5,D0,39),?41,"TNM Form Assigned..: ",ONC(165.5,D0,25)
W !," Physician's Stage...: ",ONC(165.5,D0,65),?41,"TNM Form Completed.: ",ONC(165.5,D0,44)
W !,DASHES
Q
TXT S (TXT1,TXT2)="",LOS=$L(TXT) I LOS<LEN S TXT1=TXT Q
S NOP=$L($E(TXT,1,LEN)," ")
S TXT1=$P(TXT," ",1,NOP-1),TXT2=$P(TXT," ",NOP,999)
Q
;
UCASE S X=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
Q
;
CLEANUP ;Cleanup
K D0,DASHES
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCPSD 4479 printed Oct 16, 2024@18:28:09 Page 2
ONCPSD ;HINES OIFO/GWB - STAGE OF DISEASE AT DIAGNOSIS PRINT ;10/05/11
+1 ;;2.2;ONCOLOGY;**1,6,9,10,12,13**;Jul 31, 2013;Build 7
+2 ;
PRT NEW DIC,DR,DA,DIQ,I,LEN,LOS,NOP,ONC,TXT,TXT1,TXT2,X
+1 SET DIC="^ONCO(165.5,"
+2 SET DR="34:35;37;89.1;38;88;19;89;39;149;151;29;29.3;29.4;29.5;30;31;32;33;65;66;25;44;241;242;280;1764"
+3 SET DA=D0
SET DIQ="ONC"
DO EN^DIQ1
+4 FOR I=34,34.1,34.2,34.31,34.32,34.33,34.34,34.35,34.36,35,38,88,19,89,39,149,151,29,29.3,29.4,29.5,30,31,32,33,280,1764
SET X=ONC(165.5,D0,I)
DO UCASE
SET ONC(165.5,D0,I)=X
+5 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3160000
WRITE !," Tumor Size...................: ",ONC(165.5,D0,29)
+6 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
Begin DoDot:1
+7 WRITE !," Tumor Size Clinical..........: ",$EXTRACT(ONC(165.5,D0,29.4),1,48)
+8 WRITE !," Tumor Size Pathologic........: ",$EXTRACT(ONC(165.5,D0,29.5),1,48)
+9 WRITE !," Tumor Size Summary...........: ",$EXTRACT(ONC(165.5,D0,29.3),1,48)
+10 QUIT
End DoDot:1
+11 SET TXT=ONC(165.5,D0,30)
SET LEN=46
DO TXT
+12 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3180000
WRITE !," Extension....................: ",TXT1
if TXT2'=""
WRITE !,?32,TXT2
+13 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3180000
WRITE !," Lymph Nodes..................: ",ONC(165.5,D0,31)
+14 WRITE !," Regional Lymph Nodes Examined: ",ONC(165.5,D0,33)
+15 WRITE !," Regional Lymph Nodes Positive: ",ONC(165.5,D0,32)
+16 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3180000
WRITE !," SEER Summary Stage 2000......: ",ONC(165.5,D0,35)
+17 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3171231
WRITE !," SEER Summary Stage 2018......: ",ONC(165.5,D0,1764)
+18 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3160000
WRITE !," Site of Distant Metastasis #1: ",ONC(165.5,D0,34)
+19 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3160000
WRITE !," Site of Distant Metastasis #2: ",ONC(165.5,D0,34.1)
+20 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)<3160000
WRITE !," Site of Distant Metastasis #3: ",ONC(165.5,D0,34.2)
+21 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-BONE......: ",ONC(165.5,D0,34.31)
+22 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-BRAIN.....: ",ONC(165.5,D0,34.32)
+23 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-LIVER.....: ",ONC(165.5,D0,34.33)
+24 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-LUNG......: ",ONC(165.5,D0,34.34)
+25 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-DISTANT LN: ",ONC(165.5,D0,34.35)
+26 IF $PIECE($GET(^ONCO(165.5,D0,0)),U,16)>3151231
WRITE !," METS AT DX-OTHER.....: ",ONC(165.5,D0,34.36)
+27 WRITE !," Clinical Stage Discussion....: ",ONC(165.5,D0,280)
+28 WRITE !
+29 IF $PIECE($GET(^ONCO(165.5,D0,0)),"^",16)>3171231
Begin DoDot:1
+30 WRITE !," Extent of Disease (EOD) Data",!," ----------------------------"
+31 WRITE !?1,"Primary Tumor: ",$PIECE($GET(^ONCO(165.5,D0,"EOD")),"^",1),?22,"Regional Nodes: ",$PIECE($GET(^ONCO(165.5,D0,"EOD")),"^",2),?44,"METS: ",$PIECE($GET(^ONCO(165.5,D0,"EOD")),"^",3),!
End DoDot:1
+32 WRITE !," Clinical Staging",?22,"TNM edition: ",$$TNMED^ONCOU55(D0),?41,"Pathologic Staging"
+33 WRITE !," ----------------"
+34 IF $PIECE($GET(^ONCO(165.5,D0,0)),"^",16)>3171231
DO GTAJIEN^ONCSCHMG
WRITE ?22,"AJCC ID: ",$PIECE($GET(^ONCO(165.5,D0,"AJCC8")),"^",1)
+35 WRITE ?41,"------------------"
+36 ;
+37 IF $PIECE($GET(^ONCO(165.5,D0,0)),"^",16)<3180101
Begin DoDot:1
+38 WRITE !," TNM........: ",ONC(165.5,D0,37)," ",$PIECE($GET(^ONCO(165.5,D0,24)),U,5),?41,"TNM........: ",ONC(165.5,D0,89.1)," ",$PIECE($GET(^ONCO(165.5,D0,24)),U,5)
+39 WRITE !," Stage Group: ",ONC(165.5,D0,38)," ",$EXTRACT($PIECE(ONC(165.5,D0,241),"(",1),1,19),?41,"Stage Group: ",ONC(165.5,D0,88)," ",$EXTRACT($PIECE(ONC(165.5,D0,242),"(",1),1,19)
End DoDot:1
+40 ;
+41 IF $PIECE($GET(^ONCO(165.5,D0,0)),"^",16)>3171231
Begin DoDot:1
+42 NEW IEN
SET IEN=D0
+43 WRITE !," TNM........: "
SET STGIND="C"
DO TNMDSP^ONCSGA8U
WRITE ?41,"TNM........: "
SET STGIND="P"
DO TNMDSP^ONCSGA8U
+44 WRITE !," Stage Group: ",$PIECE($GET(^ONCO(165.5,D0,"AJCC8")),"^",5),?41,"Stage Group: ",$PIECE($GET(^ONCO(165.5,D0,"AJCC8")),"^",9)
+45 WRITE !!," Post-Therapy Staging (yc)",?41,"Post-Therapy Staging (yp)"
+46 WRITE !," --------------------------",?41,"--------------------------"
+47 WRITE !," TNM........: "
SET STGIND="Y"
DO TNMDSP^ONCSGA8U
WRITE ?41,"TNM........: "
SET STGIND="T"
DO TNMDSP^ONCSGA8U
+48 WRITE !?41,"Stage Group: ",$PIECE($GET(^ONCO(165.5,D0,"AJCC8")),"^",13),!
+49 QUIT
End DoDot:1
+50 ;
+51 WRITE !," Staged By..: ",$EXTRACT(ONC(165.5,D0,19),1,25),?41,"Staged By..: ",$EXTRACT(ONC(165.5,D0,89),1,25)
+52 WRITE !
+53 WRITE !," Other Staging System: ",ONC(165.5,D0,39),?41,"TNM Form Assigned..: ",ONC(165.5,D0,25)
+54 WRITE !," Physician's Stage...: ",ONC(165.5,D0,65),?41,"TNM Form Completed.: ",ONC(165.5,D0,44)
+55 WRITE !,DASHES
+56 QUIT
TXT SET (TXT1,TXT2)=""
SET LOS=$LENGTH(TXT)
IF LOS<LEN
SET TXT1=TXT
QUIT
+1 SET NOP=$LENGTH($EXTRACT(TXT,1,LEN)," ")
+2 SET TXT1=$PIECE(TXT," ",1,NOP-1)
SET TXT2=$PIECE(TXT," ",NOP,999)
+3 QUIT
+4 ;
UCASE SET X=$TRANSLATE(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+1 QUIT
+2 ;
CLEANUP ;Cleanup
+1 KILL D0,DASHES