ONCOXA3 ; GENERATED FROM 'ONCOXA3' PRINT TEMPLATE (#829) ; 03/11/05 ; (FILE 165.5, MARGIN=80)
G BEGIN
N W !
T W:$X ! I '$D(DIOT(2)),DN,$D(IOSL),$S('$D(DIWF):1,$P(DIWF,"B",2):$P(DIWF,"B",2),1:1)+$Y'<IOSL,$D(^UTILITY($J,1))#2,^(1)?1U1P1E.E X ^(1)
S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
Q
DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
I Y W $P("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$E(Y,4,5))_" " W:Y#100 $J(Y#100\1,2)_"," W Y\10000+1700 W:Y#1 " "_$E(Y_0,9,10)_":"_$E(Y_"000",11,12) Q
W Y Q
M D @DIXX
Q
BEGIN ;
S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
I $D(DXS)<9 M DXS=^DIPT(829,"DXS")
S I(0)="^ONCO(165.5,",J(0)=165.5
D N:$X>2 Q:'DN W ?2 W "Diagnostic confirmation: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,6) W:Y]"" $S($D(DXS(1,Y)):DXS(1,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Tumor size: "
S Y=$P(X,U,9) S Y(0)=Y D STOT^ONCOOT W $J(Y,7)
D N:$X>2 Q:'DN W ?2 W "Extension: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,10) S Y(0)=Y S ONCOX="E",ONCFLD=30 D OT^ONCODEL W $J(Y,2)
D N:$X>2 Q:'DN W ?2 W "Regional lymph nodes positive: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,12) S Y(0)=Y D RNP^ONCOOT W $J(Y,3)
D N:$X>2 Q:'DN W ?2 W "Regional lymph nodes examined: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,13) S Y(0)=Y D RNE^ONCOOT W $J(Y,3)
D N:$X>2 Q:'DN W ?2 W "Lymph nodes: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,11) S Y(0)=Y S ONCOX="L" D OT^ONCODEL W $J(Y,2)
D N:$X>2 Q:'DN W ?2 W "SEER Summary Stage 2000: "
S X=$G(^ONCO(165.5,D0,2)) S Y=$P(X,U,17) W:Y]"" $S($D(DXS(2,Y)):DXS(2,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Sites of metastases: "
D N:$X>23 Q:'DN W ?23 S Y=$P(X,U,14) W:Y]"" $S($D(DXS(3,Y)):DXS(3,Y),1:Y)
D N:$X>43 Q:'DN W ?43 S Y=$P(X,U,15) W:Y]"" $S($D(DXS(4,Y)):DXS(4,Y),1:Y)
D N:$X>63 Q:'DN W ?63 S Y=$P(X,U,16) W:Y]"" $S($D(DXS(5,Y)):DXS(5,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Clinical TNM: "
D N:$X>20 Q:'DN W ?20 S STGIND="C",X=$$TNMOUT^ONCOTNO(D0) W $E(X,1,12) K Y(165.5,37)
D N:$X>39 Q:'DN W ?39 W "Pathologic TNM: "
D N:$X>59 Q:'DN W ?59 S STGIND="P",X=$$TNMOUT^ONCOTNO(D0) W $E(X,1,12) K Y(165.5,89.1)
D N:$X>2 Q:'DN W ?2 W "AJCC Stage (Clin): "
S X=$G(^ONCO(165.5,D0,2)) D N:$X>23 Q:'DN W ?23 S Y=$P(X,U,20) S Y(0)=Y S X="" D OT^ONCOTNS W $E(Y,1,30)
D N:$X>39 Q:'DN W ?39 W "AJCC Stage (Path): "
S X=$G(^ONCO(165.5,D0,2.1)) D N:$X>59 Q:'DN W ?59 S Y=$P(X,U,4) S Y(0)=Y S X="" D OT^ONCOTNS W $E(Y,1,30)
D N:$X>29 Q:'DN W ?29 W " " K DIP K:DN Y
D N:$X>2 Q:'DN W ?2 W "FIRST COURSE OF TREATMENT SUMMARY:"
D N:$X>2 Q:'DN W ?2 W "Dx/Staging/Palliative Proc: "
S X=$G(^ONCO(165.5,D0,3)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,27) S Y(0)=Y D NCDSOT^ONCODSR W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Date First Surgical Procedure: "
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,38) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Surgery of primary site (F): "
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,29) S Y(0)=Y S FIELD=58.6 D SPSOT^ONCOSUR W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Surgical Margins: "
S X=$G(^ONCO(165.5,D0,3)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,28) S Y(0)=Y S FILNUM=165.5,FLDNUM=59 D SOC^ONCOOT W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Reason for no surgery: "
S X=$G(^ONCO(165.5,D0,3)) D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,26) W:Y]"" $S($D(DXS(6,Y)):DXS(6,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Radiation: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,6) W:Y]"" $S($D(DXS(7,Y)):DXS(7,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Radiation Sequence: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,7) W:Y]"" $S($D(DXS(8,Y)):DXS(8,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Reason for no radiation: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,35) W:Y]"" $S($D(DXS(9,Y)):DXS(9,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Chemotherapy: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,13) W:Y]"" $S($D(DXS(10,Y)):DXS(10,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Hormone Therapy: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,16) W:Y]"" $S($D(DXS(11,Y)):DXS(11,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Immunotherapy: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,19) W:Y]"" $S($D(DXS(12,Y)):DXS(12,Y),1:Y)
D N:$X>2 Q:'DN W ?2 W "Other treatment: "
D N:$X>33 Q:'DN W ?33 S Y=$P(X,U,25) W:Y]"" $S($D(DXS(13,Y)):DXS(13,Y),1:Y)
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOXA3 4347 printed Oct 16, 2024@18:27:09 Page 2
ONCOXA3 ; GENERATED FROM 'ONCOXA3' PRINT TEMPLATE (#829) ; 03/11/05 ; (FILE 165.5, MARGIN=80)
+1 GOTO BEGIN
N WRITE !
T if $X
WRITE !
IF '$DATA(DIOT(2))
IF DN
IF $DATA(IOSL)
IF $SELECT('$DATA(DIWF):1,$PIECE(DIWF,"B",2):$PIECE(DIWF,"B",2),1:1)+$Y'<IOSL
IF $DATA(^UTILITY($JOB,1))#2
IF ^(1)?1U1P1E.E
XECUTE ^(1)
+1 SET DISTP=DISTP+1
SET DILCT=DILCT+1
if '(DISTP#100)
DO CSTP^DIO2
+2 QUIT
DT IF $GET(DUZ("LANG"))>1
IF Y
WRITE $$OUT^DIALOGU(Y,"DD")
QUIT
+1 IF Y
WRITE $PIECE("JAN^FEB^MAR^APR^MAY^JUN^JUL^AUG^SEP^OCT^NOV^DEC",U,$EXTRACT(Y,4,5))_" "
if Y#100
WRITE $JUSTIFY(Y#100\1,2)_","
WRITE Y\10000+1700
if Y#1
WRITE " "_$EXTRACT(Y_0,9,10)_":"_$EXTRACT(Y_"000",11,12)
QUIT
+2 WRITE Y
QUIT
M DO @DIXX
+1 QUIT
BEGIN ;
+1 if '$DATA(DN)
SET DN=1
SET DISTP=$GET(DISTP)
SET DILCT=$GET(DILCT)
+2 IF $DATA(DXS)<9
MERGE DXS=^DIPT(829,"DXS")
+3 SET I(0)="^ONCO(165.5,"
SET J(0)=165.5
+4 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Diagnostic confirmation: "
+5 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,6)
if Y]""
WRITE $SELECT($DATA(DXS(1,Y)):DXS(1,Y),1:Y)
+6 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Tumor size: "
+7 SET Y=$PIECE(X,U,9)
SET Y(0)=Y
DO STOT^ONCOOT
WRITE $JUSTIFY(Y,7)
+8 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Extension: "
+9 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,10)
SET Y(0)=Y
SET ONCOX="E"
SET ONCFLD=30
DO OT^ONCODEL
WRITE $JUSTIFY(Y,2)
+10 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Regional lymph nodes positive: "
+11 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,12)
SET Y(0)=Y
DO RNP^ONCOOT
WRITE $JUSTIFY(Y,3)
+12 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Regional lymph nodes examined: "
+13 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,13)
SET Y(0)=Y
DO RNE^ONCOOT
WRITE $JUSTIFY(Y,3)
+14 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Lymph nodes: "
+15 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,11)
SET Y(0)=Y
SET ONCOX="L"
DO OT^ONCODEL
WRITE $JUSTIFY(Y,2)
+16 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "SEER Summary Stage 2000: "
+17 SET X=$GET(^ONCO(165.5,D0,2))
SET Y=$PIECE(X,U,17)
if Y]""
WRITE $SELECT($DATA(DXS(2,Y)):DXS(2,Y),1:Y)
+18 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Sites of metastases: "
+19 if $X>23
DO N
if 'DN
QUIT
WRITE ?23
SET Y=$PIECE(X,U,14)
if Y]""
WRITE $SELECT($DATA(DXS(3,Y)):DXS(3,Y),1:Y)
+20 if $X>43
DO N
if 'DN
QUIT
WRITE ?43
SET Y=$PIECE(X,U,15)
if Y]""
WRITE $SELECT($DATA(DXS(4,Y)):DXS(4,Y),1:Y)
+21 if $X>63
DO N
if 'DN
QUIT
WRITE ?63
SET Y=$PIECE(X,U,16)
if Y]""
WRITE $SELECT($DATA(DXS(5,Y)):DXS(5,Y),1:Y)
+22 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Clinical TNM: "
+23 if $X>20
DO N
if 'DN
QUIT
WRITE ?20
SET STGIND="C"
SET X=$$TNMOUT^ONCOTNO(D0)
WRITE $EXTRACT(X,1,12)
KILL Y(165.5,37)
+24 if $X>39
DO N
if 'DN
QUIT
WRITE ?39
WRITE "Pathologic TNM: "
+25 if $X>59
DO N
if 'DN
QUIT
WRITE ?59
SET STGIND="P"
SET X=$$TNMOUT^ONCOTNO(D0)
WRITE $EXTRACT(X,1,12)
KILL Y(165.5,89.1)
+26 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "AJCC Stage (Clin): "
+27 SET X=$GET(^ONCO(165.5,D0,2))
if $X>23
DO N
if 'DN
QUIT
WRITE ?23
SET Y=$PIECE(X,U,20)
SET Y(0)=Y
SET X=""
DO OT^ONCOTNS
WRITE $EXTRACT(Y,1,30)
+28 if $X>39
DO N
if 'DN
QUIT
WRITE ?39
WRITE "AJCC Stage (Path): "
+29 SET X=$GET(^ONCO(165.5,D0,2.1))
if $X>59
DO N
if 'DN
QUIT
WRITE ?59
SET Y=$PIECE(X,U,4)
SET Y(0)=Y
SET X=""
DO OT^ONCOTNS
WRITE $EXTRACT(Y,1,30)
+30 if $X>29
DO N
if 'DN
QUIT
WRITE ?29
WRITE " "
KILL DIP
if DN
KILL Y
+31 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "FIRST COURSE OF TREATMENT SUMMARY:"
+32 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Dx/Staging/Palliative Proc: "
+33 SET X=$GET(^ONCO(165.5,D0,3))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,27)
SET Y(0)=Y
DO NCDSOT^ONCODSR
WRITE $EXTRACT(Y,1,30)
+34 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Date First Surgical Procedure: "
+35 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,38)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+36 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Surgery of primary site (F): "
+37 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,29)
SET Y(0)=Y
SET FIELD=58.6
DO SPSOT^ONCOSUR
WRITE $EXTRACT(Y,1,30)
+38 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Surgical Margins: "
+39 SET X=$GET(^ONCO(165.5,D0,3))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,28)
SET Y(0)=Y
SET FILNUM=165.5
SET FLDNUM=59
DO SOC^ONCOOT
WRITE $EXTRACT(Y,1,30)
+40 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Reason for no surgery: "
+41 SET X=$GET(^ONCO(165.5,D0,3))
if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,26)
if Y]""
WRITE $SELECT($DATA(DXS(6,Y)):DXS(6,Y),1:Y)
+42 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation: "
+43 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,6)
if Y]""
WRITE $SELECT($DATA(DXS(7,Y)):DXS(7,Y),1:Y)
+44 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation Sequence: "
+45 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,7)
if Y]""
WRITE $SELECT($DATA(DXS(8,Y)):DXS(8,Y),1:Y)
+46 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Reason for no radiation: "
+47 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,35)
if Y]""
WRITE $SELECT($DATA(DXS(9,Y)):DXS(9,Y),1:Y)
+48 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Chemotherapy: "
+49 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,13)
if Y]""
WRITE $SELECT($DATA(DXS(10,Y)):DXS(10,Y),1:Y)
+50 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Hormone Therapy: "
+51 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,16)
if Y]""
WRITE $SELECT($DATA(DXS(11,Y)):DXS(11,Y),1:Y)
+52 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Immunotherapy: "
+53 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,19)
if Y]""
WRITE $SELECT($DATA(DXS(12,Y)):DXS(12,Y),1:Y)
+54 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Other treatment: "
+55 if $X>33
DO N
if 'DN
QUIT
WRITE ?33
SET Y=$PIECE(X,U,25)
if Y]""
WRITE $SELECT($DATA(DXS(13,Y)):DXS(13,Y),1:Y)
+56 KILL Y
+57 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!