ONCOY54 ; GENERATED FROM 'ONCOY54' PRINT TEMPLATE (#812) ; 10/17/24 ; (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
X ^DD("DD")
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(812,"DXS")
S I(0)="^ONCO(165.5,",J(0)=165.5
D T Q:'DN D N W ?0 W "* FIRST COURSE OF TREATMENT *"
D T Q:'DN D N D N:$X>2 Q:'DN W ?2 W "Neoadjuvant Therapy...........:"
S X=$G(^ONCO(165.5,D0,"EOD")) D N:$X>35 Q:'DN W ?35 S Y=$P(X,U,5) W:Y]"" $E($$SET^DIQ(165.5,245.1,Y),1,40)
D N:$X>2 Q:'DN W ?2 W "Neoadjuvant Therapy-Clin Resp.:"
D N:$X>35 Q:'DN W ?35 S Y=$P(X,U,6) W:Y]"" $E($$SET^DIQ(165.5,245.2,Y),1,40)
D N:$X>2 Q:'DN W ?2 W "Neoadjuvant Therapy-TX Effect.:"
D N:$X>35 Q:'DN W ?35,$E($P(X,U,7),1,40)
D T Q:'DN D N D N:$X>2 Q:'DN W ?2 W "First Course of Treatment Date:"
D N:$X>34 Q:'DN W ?34 S X="" D DFC^ONCOCOM W $E(X,1,10) K Y(165.5,49)
D N:$X>2 Q:'DN W ?2 W "Date of No Treatment..........:"
S X=$G(^ONCO(165.5,D0,2.1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,11) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
D T Q:'DN D N 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>34 Q:'DN W ?34 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 "RX Summ--Surg Primsite 03-2022:"
S X=$G(^ONCO(165.5,D0,3)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,1) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,29) S Y(0)=Y S FIELD=58.6 D SPSOT^ONCOSUR W $E(Y,1,34)
D N:$X>2 Q:'DN W ?2 W "RX Hosp--Surg Primsite 03-2022:"
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,8) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,30) S Y(0)=Y S FIELD=58.7 D SPSOT^ONCOSUR W $E(Y,1,34)
D N:$X>2 Q:'DN W ?2 W "RX Summ--Surg Prim Site 2023..:"
S X=$G(^ONCO(165.5,D0,3)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,1) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.2)) D N:$X>45 Q:'DN W ?45,$E($P(X,U,9),1,34)
D N:$X>2 Q:'DN W ?2 W "RX Hosp--Surg Prim Site 2023..:"
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,8) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.2)) D N:$X>45 Q:'DN W ?45,$E($P(X,U,8),1,34)
D N:$X>2 Q:'DN W ?2 W "Surgical Margins..............:"
S X=$G(^ONCO(165.5,D0,3)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,28) W:Y]"" $E($$SET^DIQ(165.5,59,Y),1,26)
D N:$X>2 Q:'DN W ?2 W "Scope of LN Surgery...........:"
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,22) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,31) W:Y]"" $E($$SET^DIQ(165.5,138.4,Y),1,34)
D N:$X>2 Q:'DN W ?2 W "Scope of LN Surgery @Fac......:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,23) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,32) W:Y]"" $E($$SET^DIQ(165.5,138.5,Y),1,34)
D N:$X>2 Q:'DN W ?2 W "Surg Proc/Other Site..........:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,24) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,33) W:Y]"" $E($$SET^DIQ(165.5,139.4,Y),1,34)
D N:$X>2 Q:'DN W ?2 W "Surg Proc/Other Site @Fac.....:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,25) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,34) W:Y]"" $E($$SET^DIQ(165.5,139.5,Y),1,34)
D N:$X>2 Q:'DN W ?2 W "Reason No Surgery of Primary..:"
D N:$X>34 Q:'DN W ?34 X DXS(1,9.2) X "F %=2:1:$L(X) I $E(X,%)?1U,$E(X,%-1)?1A S X=$E(X,0,%-1)_$C($A(X,%)+32)_$E(X,%+1,999)" K DIP K:DN Y W X
D T Q:'DN D N D N:$X>2 Q:'DN W ?2 W "Radiation.....................:"
S X=$G(^ONCO(165.5,D0,3)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,4) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,6) W:Y]"" $E($$SET^DIQ(165.5,51.2,Y),1,32)
D N:$X>2 Q:'DN W ?2 W "Phase I rad treatment volume..:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,4) S Y(0)=Y S Y=$P($G(^ONCO(164.82,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase I rad to draining LN....:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,5) S Y(0)=Y S Y=$P($G(^ONCO(164.83,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase I treatment modality....:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,6) S Y(0)=Y S Y=$P($G(^ONCO(164.84,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase I external beam planning:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,2) S Y(0)=Y S Y=$P($G(^ONCO(164.81,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase I dose per fraction.....:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34,$E($P(X,U,1),1,5)
D N:$X>2 Q:'DN W ?2 W "Phase I number of fractions...:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,3),1,3)
D N:$X>2 Q:'DN W ?2 W "Phase I total dose............:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,7),1,6)
D N:$X>2 Q:'DN W ?2 W "Phase II rad treatment volume.:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,11) S Y(0)=Y S Y=$P($G(^ONCO(164.82,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase II rad to draining LN...:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,12) S Y(0)=Y S Y=$P($G(^ONCO(164.83,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase II treatment modality...:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,13) S Y(0)=Y S Y=$P($G(^ONCO(164.84,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase II ext beam planning....:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,9) S Y(0)=Y S Y=$P($G(^ONCO(164.81,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase II dose per fraction....:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34,$E($P(X,U,8),1,5)
D N:$X>2 Q:'DN W ?2 W "Phase II number of fractions..:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,10),1,3)
D N:$X>2 Q:'DN W ?2 W "Phase II total dose...........:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,14),1,6)
D N:$X>2 Q:'DN W ?2 W "Phase III rad treatment volume:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,18) S Y(0)=Y S Y=$P($G(^ONCO(164.82,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase III rad to draining LN..:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,19) S Y(0)=Y S Y=$P($G(^ONCO(164.83,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase III treatment modality..:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,20) S Y(0)=Y S Y=$P($G(^ONCO(164.84,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase III rad ext beam plan...:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,16) S Y(0)=Y S Y=$P($G(^ONCO(164.81,+Y,0)),U,2) W $E(Y,1,30)
D N:$X>2 Q:'DN W ?2 W "Phase III dose per fraction...:"
S X=$G(^ONCO(165.5,D0,"RAD18")) D N:$X>34 Q:'DN W ?34,$E($P(X,U,15),1,5)
D N:$X>2 Q:'DN W ?2 W "Phase III number of fraction..:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,17),1,3)
D N:$X>2 Q:'DN W ?2 W "Phase III total dose..........:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,21),1,6)
D N:$X>2 Q:'DN W ?2 W "Number of phases rad TX.......:"
S X=$G(^ONCO(165.5,D0,"NCR18B")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,1) W:Y]"" $E($$SET^DIQ(165.5,7024,Y),1,24)
D N:$X>2 Q:'DN W ?2 W "Rad TX discontinued early.....:"
D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,2) W:Y]"" $E($$SET^DIQ(165.5,7025,Y),1,23)
D N:$X>2 Q:'DN W ?2 W "Total dose....................:"
D N:$X>34 Q:'DN W ?34,$E($P(X,U,3),1,6)
D N:$X>2 Q:'DN W ?2 W "Radiation @Fac................:"
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,13) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
S X=$G(^ONCO(165.5,D0,3.1)) D N:$X>45 Q:'DN W ?45 S Y=$P(X,U,12) W:Y]"" $E($$SET^DIQ(165.5,51.4,Y),1,34)
D N:$X>2 Q:'DN W ?2 W "Radiation/Surgery Sequence....:"
D N:$X>34 Q:'DN W ?34 X DXS(2,9.2) X "F %=2:1:$L(X) I $E(X,%)?1U,$E(X,%-1)?1A S X=$E(X,0,%-1)_$C($A(X,%)+32)_$E(X,%+1,999)" K DIP K:DN Y W X
D N:$X>2 Q:'DN W ?2 W "Radiation End Date............:"
S X=$G(^ONCO(165.5,D0,"BLA2")) D N:$X>34 Q:'DN W ?34 S Y=$P(X,U,16) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
K Y
Q
HEAD ;
W !,"--------------------------------------------------------------------------------",!!
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HONCOY54 8649 printed Dec 13, 2024@02:26:45 Page 2
ONCOY54 ; GENERATED FROM 'ONCOY54' PRINT TEMPLATE (#812) ; 10/17/24 ; (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 XECUTE ^DD("DD")
+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(812,"DXS")
+3 SET I(0)="^ONCO(165.5,"
SET J(0)=165.5
+4 DO T
if 'DN
QUIT
DO N
WRITE ?0
WRITE "* FIRST COURSE OF TREATMENT *"
+5 DO T
if 'DN
QUIT
DO N
if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Neoadjuvant Therapy...........:"
+6 SET X=$GET(^ONCO(165.5,D0,"EOD"))
if $X>35
DO N
if 'DN
QUIT
WRITE ?35
SET Y=$PIECE(X,U,5)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,245.1,Y),1,40)
+7 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Neoadjuvant Therapy-Clin Resp.:"
+8 if $X>35
DO N
if 'DN
QUIT
WRITE ?35
SET Y=$PIECE(X,U,6)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,245.2,Y),1,40)
+9 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Neoadjuvant Therapy-TX Effect.:"
+10 if $X>35
DO N
if 'DN
QUIT
WRITE ?35,$EXTRACT($PIECE(X,U,7),1,40)
+11 DO T
if 'DN
QUIT
DO N
if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "First Course of Treatment Date:"
+12 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET X=""
DO DFC^ONCOCOM
WRITE $EXTRACT(X,1,10)
KILL Y(165.5,49)
+13 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Date of No Treatment..........:"
+14 SET X=$GET(^ONCO(165.5,D0,2.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,11)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+15 DO T
if 'DN
QUIT
DO N
if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Date First Surgical Procedure.:"
+16 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,38)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+17 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "RX Summ--Surg Primsite 03-2022:"
+18 SET X=$GET(^ONCO(165.5,D0,3))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,1)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+19 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,29)
SET Y(0)=Y
SET FIELD=58.6
DO SPSOT^ONCOSUR
WRITE $EXTRACT(Y,1,34)
+20 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "RX Hosp--Surg Primsite 03-2022:"
+21 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,8)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+22 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,30)
SET Y(0)=Y
SET FIELD=58.7
DO SPSOT^ONCOSUR
WRITE $EXTRACT(Y,1,34)
+23 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "RX Summ--Surg Prim Site 2023..:"
+24 SET X=$GET(^ONCO(165.5,D0,3))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,1)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+25 SET X=$GET(^ONCO(165.5,D0,3.2))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45,$EXTRACT($PIECE(X,U,9),1,34)
+26 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "RX Hosp--Surg Prim Site 2023..:"
+27 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,8)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+28 SET X=$GET(^ONCO(165.5,D0,3.2))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45,$EXTRACT($PIECE(X,U,8),1,34)
+29 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Surgical Margins..............:"
+30 SET X=$GET(^ONCO(165.5,D0,3))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,28)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,59,Y),1,26)
+31 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Scope of LN Surgery...........:"
+32 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,22)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+33 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,31)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,138.4,Y),1,34)
+34 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Scope of LN Surgery @Fac......:"
+35 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,23)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+36 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,32)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,138.5,Y),1,34)
+37 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Surg Proc/Other Site..........:"
+38 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,24)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+39 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,33)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,139.4,Y),1,34)
+40 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Surg Proc/Other Site @Fac.....:"
+41 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,25)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+42 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,34)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,139.5,Y),1,34)
+43 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Reason No Surgery of Primary..:"
+44 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
XECUTE DXS(1,9.2)
XECUTE "F %=2:1:$L(X) I $E(X,%)?1U,$E(X,%-1)?1A S X=$E(X,0,%-1)_$C($A(X,%)+32)_$E(X,%+1,999)"
KILL DIP
if DN
KILL Y
WRITE X
+45 DO T
if 'DN
QUIT
DO N
if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation.....................:"
+46 SET X=$GET(^ONCO(165.5,D0,3))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,4)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+47 SET X=$GET(^ONCO(165.5,D0,3))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,6)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,51.2,Y),1,32)
+48 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I rad treatment volume..:"
+49 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,4)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.82,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+50 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I rad to draining LN....:"
+51 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,5)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.83,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+52 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I treatment modality....:"
+53 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,6)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.84,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+54 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I external beam planning:"
+55 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,2)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.81,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+56 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I dose per fraction.....:"
+57 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,1),1,5)
+58 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I number of fractions...:"
+59 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,3),1,3)
+60 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase I total dose............:"
+61 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,7),1,6)
+62 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II rad treatment volume.:"
+63 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,11)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.82,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+64 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II rad to draining LN...:"
+65 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,12)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.83,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+66 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II treatment modality...:"
+67 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,13)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.84,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+68 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II ext beam planning....:"
+69 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,9)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.81,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+70 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II dose per fraction....:"
+71 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,8),1,5)
+72 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II number of fractions..:"
+73 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,10),1,3)
+74 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase II total dose...........:"
+75 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,14),1,6)
+76 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III rad treatment volume:"
+77 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,18)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.82,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+78 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III rad to draining LN..:"
+79 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,19)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.83,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+80 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III treatment modality..:"
+81 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,20)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.84,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+82 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III rad ext beam plan...:"
+83 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,16)
SET Y(0)=Y
SET Y=$PIECE($GET(^ONCO(164.81,+Y,0)),U,2)
WRITE $EXTRACT(Y,1,30)
+84 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III dose per fraction...:"
+85 SET X=$GET(^ONCO(165.5,D0,"RAD18"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,15),1,5)
+86 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III number of fraction..:"
+87 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,17),1,3)
+88 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Phase III total dose..........:"
+89 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,21),1,6)
+90 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Number of phases rad TX.......:"
+91 SET X=$GET(^ONCO(165.5,D0,"NCR18B"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,1)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,7024,Y),1,24)
+92 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Rad TX discontinued early.....:"
+93 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,2)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,7025,Y),1,23)
+94 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Total dose....................:"
+95 if $X>34
DO N
if 'DN
QUIT
WRITE ?34,$EXTRACT($PIECE(X,U,3),1,6)
+96 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation @Fac................:"
+97 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,13)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+98 SET X=$GET(^ONCO(165.5,D0,3.1))
if $X>45
DO N
if 'DN
QUIT
WRITE ?45
SET Y=$PIECE(X,U,12)
if Y]""
WRITE $EXTRACT($$SET^DIQ(165.5,51.4,Y),1,34)
+99 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation/Surgery Sequence....:"
+100 if $X>34
DO N
if 'DN
QUIT
WRITE ?34
XECUTE DXS(2,9.2)
XECUTE "F %=2:1:$L(X) I $E(X,%)?1U,$E(X,%-1)?1A S X=$E(X,0,%-1)_$C($A(X,%)+32)_$E(X,%+1,999)"
KILL DIP
if DN
KILL Y
WRITE X
+101 if $X>2
DO N
if 'DN
QUIT
WRITE ?2
WRITE "Radiation End Date............:"
+102 SET X=$GET(^ONCO(165.5,D0,"BLA2"))
if $X>34
DO N
if 'DN
QUIT
WRITE ?34
SET Y=$PIECE(X,U,16)
SET Y(0)=Y
SET X=Y
DO DATEOT^ONCOES
WRITE $EXTRACT(Y,1,30)
+103 KILL Y
+104 QUIT
HEAD ;
+1 WRITE !,"--------------------------------------------------------------------------------",!!