source: FOIAVistA/trunk/r/ONCOLOGY-ONC/ONCOX7.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 6.1 KB
Line 
1ONCOX7 ; GENERATED FROM 'ONCOX7' PRINT TEMPLATE (#848) ; 03/11/05 ; (FILE 165.5, MARGIN=132)
2 G BEGIN
3N W !
4T 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)
5 S DISTP=DISTP+1,DILCT=DILCT+1 D:'(DISTP#100) CSTP^DIO2
6 Q
7DT I $G(DUZ("LANG"))>1,Y W $$OUT^DIALOGU(Y,"DD") Q
8 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
9 W Y Q
10M D @DIXX
11 Q
12BEGIN ;
13 S:'$D(DN) DN=1 S DISTP=$G(DISTP),DILCT=$G(DILCT)
14 I $D(DXS)<9 M DXS=^DIPT(848,"DXS")
15 S I(0)="^ONCO(165.5,",J(0)=165.5
16 D T Q:'DN D N W ?0 X DXS(1,9) K DIP K:DN Y W X
17 D T Q:'DN D N D N:$X>1 Q:'DN W ?1 W "Dx/Stging/Palliative Proc: "
18 S X=$G(^ONCO(165.5,D0,3)) S Y=$P(X,U,31) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
19 S X=$G(^ONCO(165.5,D0,3)) D N:$X>59 Q:'DN W ?59 S Y=$P(X,U,27) S Y(0)=Y D NCDSOT^ONCODSR W $E(Y,1,30)
20 D N:$X>1 Q:'DN W ?1 W "Surgery of Primary Site Date: "
21 S X=$G(^ONCO(165.5,D0,3)) S Y=$P(X,U,1) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
22 D N:$X>59 Q:'DN W ?59 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
23 D N:$X>59 Q:'DN W ?59 X DXS(3,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
24 D N:$X>1 Q:'DN W ?1 W "Surgical Approach: "
25 X DXS(4,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
26 D N:$X>1 Q:'DN W ?1 W "Reconstruction/Restoration: "
27 X DXS(5,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
28 D N:$X>6 Q:'DN W ?6 W "- Text Rx-Surgery/No Surgery: "
29 S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(1)=14,J(1)=165.5108 F D1=0:0 Q:$O(^ONCO(165.5,D0,14,D1))'>0 S D1=$O(^(D1)) D:$X>39 T Q:'DN D A1
30 G A1R
31A1 ;
32 S X=$G(^ONCO(165.5,D0,14,D1,0)) S DIWL=40,DIWR=130 D ^DIWP
33 Q
34A1R ;
35 D 0^DIWW
36 D ^DIWW
37 D N:$X>6 Q:'DN W ?6 W "- Text Rx-Other Cancer Directed Surgery: "
38 S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(1)=21,J(1)=165.5115 F D1=0:0 Q:$O(^ONCO(165.5,D0,21,D1))'>0 S D1=$O(^(D1)) D:$X>50 T Q:'DN D B1
39 G B1R
40B1 ;
41 S X=$G(^ONCO(165.5,D0,21,D1,0)) S DIWL=51,DIWR=130 D ^DIWP
42 Q
43B1R ;
44 D 0^DIWW
45 D ^DIWW
46 D N:$X>1 Q:'DN W ?1 W "Surgical Margins: "
47 S X=$G(^ONCO(165.5,D0,3)) S Y=$P(X,U,28) S Y(0)=Y S FILNUM=165.5,FLDNUM=59 D SOC^ONCOOT W $E(Y,1,30)
48 D N:$X>59 Q:'DN W ?59 W "Reason for No Surgery: "
49 X DXS(6,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
50 D T Q:'DN D N D N:$X>1 Q:'DN W ?1 W "Radiation Date: "
51 S X=$G(^ONCO(165.5,D0,3)) S Y=$P(X,U,4) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
52 D N:$X>39 Q:'DN W ?39 X DXS(7,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
53 S X=$G(^ONCO(165.5,D0,3)) D N:$X>59 Q:'DN W ?59 S Y=$P(X,U,6) W:Y]"" $S($D(DXS(14,Y)):DXS(14,Y),1:Y)
54 D N:$X>1 Q:'DN W ?1 W "Regional Dose: "
55 S X=$G(^ONCO(165.5,D0,"THY1")) S Y=$P(X,U,43) S Y(0)=Y S Y=$S(Y="00000":"Radiation tx not administered",Y=88888:"NA, brachytherapy/radioisotopes administered",Y=99999:"Dose unknown/unknown if administered",1:Y) W $E(Y,1,12)
56 D N:$X>31 Q:'DN W ?31 W "Regional Treatment Modality: "
57 S X=$G(^ONCO(165.5,D0,"BLA2")) S Y=$P(X,U,18) S Y(0)=Y S Y=$P($G(^ONCO(166.13,+Y,0)),U,2) W $E(Y,1,50)
58 D N:$X>1 Q:'DN W ?1 W "Reason for No Radiation: "
59 X DXS(8,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
60 D N:$X>7 Q:'DN W ?7 W "Sequence: "
61 X DXS(9,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
62 S I(1)=6,J(1)=165.52 F D1=0:0 Q:$O(^ONCO(165.5,D0,6,D1))'>0 X:$D(DSC(165.52)) DSC(165.52) S D1=$O(^(D1)) Q:D1'>0 D:$X>20 T Q:'DN D C1
63 G C1R
64C1 ;
65 D N:$X>14 Q:'DN W ?14 W "Radiation Treatment - (either radiation or prophylactic) "
66 D N:$X>16 Q:'DN W ?16 W "Target Place: "
67 X DXS(10,9) K DIP K:DN Y W X
68 W " Target Site: "
69 X DXS(11,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
70 W " Radiation Source: "
71 X DXS(12,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
72 D N:$X>16 Q:'DN W ?16 W "Total due to target: "
73 S X=$G(^ONCO(165.5,D0,6,D1,0)) S Y=$P(X,U,4) W:Y]"" $J(Y,3,0)
74 W " # Fractions: "
75 S Y=$P(X,U,5) W:Y]"" $J(Y,3,0)
76 W " Predominant FXN size: "
77 S Y=$P(X,U,6) W:Y]"" $J(Y,5,0)
78 D N:$X>16 Q:'DN W ?16 W "# Days: "
79 S Y=$P(X,U,7) W:Y]"" $J(Y,4,0)
80 W " Start Date: "
81 S Y=$P(X,U,8) D DT
82 W " Stop Date: "
83 S Y=$P(X,U,9) D DT
84 S I(2)=1,J(2)=165.529 F D2=0:0 Q:$O(^ONCO(165.5,D0,6,D1,1,D2))'>0 S D2=$O(^(D2)) D:$X>27 T Q:'DN D A2
85 G A2R
86A2 ;
87 S X=$G(^ONCO(165.5,D0,6,D1,1,D2,0)) S DIWL=28,DIWR=130 D ^DIWP
88 Q
89A2R ;
90 D 0^DIWW
91 D ^DIWW
92 D T Q:'DN D N D N:$X>1 Q:'DN W ?1 W " "
93 Q
94C1R ;
95 D N:$X>6 Q:'DN W ?6 W "- Text Rx-Rad (BEAM): "
96 S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(1)=15,J(1)=165.5109 F D1=0:0 Q:$O(^ONCO(165.5,D0,15,D1))'>0 S D1=$O(^(D1)) D:$X>31 T Q:'DN D D1
97 G D1R
98D1 ;
99 S X=$G(^ONCO(165.5,D0,15,D1,0)) S DIWL=32,DIWR=130 D ^DIWP
100 Q
101D1R ;
102 D 0^DIWW
103 D ^DIWW
104 D N:$X>6 Q:'DN W ?6 W "- Text Rx-Rad-Other: "
105 S:'$D(DIWF) DIWF="" S:DIWF'["N" DIWF=DIWF_"N" S X="" S I(1)=16,J(1)=165.53 F D1=0:0 Q:$O(^ONCO(165.5,D0,16,D1))'>0 S D1=$O(^(D1)) D:$X>30 T Q:'DN D E1
106 G E1R
107E1 ;
108 S X=$G(^ONCO(165.5,D0,16,D1,0)) S DIWL=31,DIWR=130 D ^DIWP
109 Q
110E1R ;
111 D 0^DIWW
112 D ^DIWW
113 D T Q:'DN W ?2 W "Radiation Therapy to CNS DAte: "
114 S X=$G(^ONCO(165.5,D0,3)) S Y=$P(X,U,8) S Y(0)=Y S X=Y D DATEOT^ONCOES W $E(Y,1,30)
115 D N:$X>39 Q:'DN W ?39 X DXS(13,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
116 S X=$G(^ONCO(165.5,D0,3)) D N:$X>59 Q:'DN W ?59 S Y=$P(X,U,10) W:Y]"" $S($D(DXS(15,Y)):DXS(15,Y),1:Y)
117 K Y K DIWF
118 Q
119HEAD ;
120 W !,"------------------------------------------------------------------------------------------------------------------------------------",!!
Note: See TracBrowser for help on using the repository browser.