source: WorldVistAEHR/trunk/r/ONCOLOGY-ONC/ONCHPC4.m@ 862

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

initial load of WorldVistAEHR

File size: 8.4 KB
RevLine 
[613]1ONCHPC4 ;Hines OIFO/GWB - 2000 Hepatocellular Cancers PCE Study ;01/10/00
2 ;;2.11;ONCOLOGY;**26**;Mar 07, 1995
3 ;First Course of Treatment
4 K TABLE,HTABLE
5 S TABLE("29. DATE OF FIRST COURSE OF TREATMENT")="DFCT^ONCHPC4"
6 S TABLE("30. DATE OF INPATIENT ADMISSION")="DIA^ONCHPC4"
7 S TABLE("31. DATE OF INPATIENT DISCHARGE")="DID^ONCHPC4"
8 S TABLE("SURGERY")="S^ONCHPC4"
9 S TABLE("32. DATE OF NON CANCER-DIRECTED SURGERY")="DNCDS^ONCHPC4"
10 S TABLE("33. NON CANCER-DIRECTED SURGERY")="NCDS^ONCHPC4"
11 S TABLE("34. DATE OF CANCER-DIRECTED SURGERY")="DCDS^ONCHPC4"
12 S TABLE("35. SURGICAL APPROACH")="SA^ONCHPC4"
13 S TABLE("36. SURGERY OF PRIMARY SITE")="SPS^ONCHPC4"
14 S TABLE("37. RADIO-FREQUENCY DESTRUCTION OF TUMOR")="RFDT^ONCHPC4"
15 S TABLE("38. ABLATION & RESECTION")="AR^ONCHPC4"
16 S TABLE("39. SURGICAL MARGINS")="SM^ONCHPC4"
17 S TABLE("40. DISTANCE OF TUMOR TO CLOSEST MARGIN")="DTCM^ONCHPC4"
18 S TABLE("41. SURGERY OF REGIONAL SITE(S), DISTANT SITE(S), OR DISTANT LYMPH NODE(S)")="SORS^ONCHPC4"
19 S TABLE("42. SURGICAL TREATMENT OF RESIDUAL PRIMARY TUMOR")="STRPT^ONCHPC4"
20 S TABLE("43. RECONSTRUCTION/RESTORATION-FIRST COURSE")="RR^ONCHPC4"
21 S TABLE("RADIATION THERAPY")="R^ONCHPC4A"
22 S TABLE("44. DATE RADIATION STARTED")="DRS^ONCHPC4A"
23 S TABLE("45. RADIATION THERAPY")="RT^ONCHPC4A"
24 S TABLE("CHEMOTHERAPY")="C^ONCHPC4A"
25 S TABLE("46. DATE CHEMOTHERAPY STARTED")="DCS^ONCHPC4A"
26 S TABLE("47. CHEMOTHERAPY")="CT^ONCHPC4A"
27 S TABLE("48. TYPE OF CHEMOTHERAPEUTIC AGENTS ADMINISTERED")="TCAA^ONCHPC4A"
28 S TABLE("49. ROUTE CHEMOTHERAPY ADMINISTERED")="RCA^ONCHPC4A"
29 S TABLE("50. CHEMOTHERAPY/SURGERY SEQUENCE")="CSS^ONCHPC4A"
30 S TABLE("OTHER THERAPY")="O^ONCHPC4A"
31 S TABLE("51. DATE OTHER TREATMENT STARTED")="DOTS^ONCHPC4A"
32 S TABLE("52. OTHER TREATMENT")="OT^ONCHPC4A"
33 S TABLE("53. ARTERIAL EMBOLIZATION")="AE^ONCHPC4A"
34 S TABLE("54. DEATH WITHIN30 DAYS OF START OF INTIIAL COURSE OF THERAPY")="DWTD^ONCHPC4A"
35 S HTABLE(1)="29. DATE OF FIRST COURSE OF TREATMENT"
36 S HTABLE(2)="30. DATE OF INPATIENT ADMISSION"
37 S HTABLE(3)="31. DATE OF INPATIENT DISCHARGE"
38 S HTABLE(4)=""
39 S HTABLE(5)="SURGERY"
40 S HTABLE(6)=""
41 S HTABLE(7)="32. DATE OF NON CANCER-DIRECTED SURGERY"
42 S HTABLE(8)="33. NON CANCER-DIRECTED SURGERY"
43 S HTABLE(9)="34. DATE OF CANCER-DIRECTED SURGERY"
44 S HTABLE(10)="35. SURGICAL APPROACH"
45 S HTABLE(11)="36. SURGERY OF PRIMARY SITE"
46 S HTABLE(12)="37. RADIO-FREQUENCY DESTRUCTION OF TUMOR"
47 S HTABLE(13)="38. ABLATION & RESECTION"
48 S HTABLE(14)="39. SURGICAL MARGINS"
49 S HTABLE(15)="40. DISTANCE OF TUMOR TO CLOSEST MARGIN"
50 S HTABLE(16)="41. SURGERY OF REGIONAL SITE(S), DISTANT SITE(S), OR DISTANT LYMPH NODE(S)"
51 S HTABLE(17)="42. SURGICAL TREATMENT OF RESIDUAL PRIMARY TUMOR"
52 S HTABLE(18)="43. RECONSTRUCTION/RESTORATION-FIRST COURSE"
53 S HTABLE(19)=""
54 S HTABLE(20)="RADIATION THERAPY"
55 S HTABLE(21)=""
56 S HTABLE(22)="44. DATE RADIATION STARTED"
57 S HTABLE(23)="45. RADIATION THERAPY"
58 S HTABLE(24)=""
59 S HTABLE(25)="CHEMOTHERAPY"
60 S HTABLE(26)=""
61 S HTABLE(27)="46. DATE CHEMOTHERAPY STARTED"
62 S HTABLE(28)="47. CHEMOTHERAPY"
63 S HTABLE(29)="48. TYPE OF CHEMOTHERAPEUTIC AGENTS ADMINISTERED"
64 S HTABLE(30)="49. ROUTE CHEMOTHERAPY ADMINISTERED"
65 S HTABLE(31)="50. CHEMOTHERAPY/SURGERY SEQUENCE"
66 S HTABLE(32)=""
67 S HTABLE(33)="OTHER THERAPY"
68 S HTABLE(34)=""
69 S HTABLE(35)="51. DATE OTHER TREATMENT STARTED"
70 S HTABLE(36)="52. OTHER TREATMENT"
71 S HTABLE(37)="53. ARTERIAL EMBOLIZATION"
72 S HTABLE(38)="54. DEATH WITHIN30 DAYS OF START OF INTIIAL COURSE OF THERAPY"
73 S CHOICES=38
74 S IE=ONCONUM
75 W @IOF D HEAD^ONCHPC0
76 W !," FIRST COURSE OF TREATMENT"
77 W !," -------------------------"
78 S DIE="^ONCO(165.5,",DA=ONCONUM
79 S CDS=$$GET1^DIQ(165.5,IE,58.2)
80 S RAD=$$GET1^DIQ(165.5,IE,51.2,"I")
81 S CHE=$$GET1^DIQ(165.5,IE,53.2,"I")
82DFCT W !," 29. DATE OF FIRST COURSE OF"
83 W !," TREATMENT....................: ",$$GET1^DIQ(165.5,IE,49)
84DIA S DR="1 30. DATE OF INPATIENT ADMISSION..." D ^DIE G:$D(Y) JUMP
85DID S DR="1.1 31. DATE OF INPATIENT DISCHARGE..." D ^DIE G:$D(Y) JUMP
86S W @IOF D HEAD^ONCHPC0
87 W !," SURGERY",!
88 W " -------"
89DNCDS W !," 32. DATE OF NON CANCER-DIRECTED"
90 W !," SURGERY......................: ",$$GET1^DIQ(165.5,IE,58.3)
91NCDS S NCDS=$$GET1^DIQ(165.5,IE,58.1)
92 S (NCDS1,NCDS2)="",LOS=$L(NCDS) I LOS<43 S NCDS1=NCDS G NCDS1
93 S NOP=$L($E(NCDS,1,43)," ")
94 S NCDS1=$P(NCDS," ",1,NOP-1),NCDS2=$P(NCDS," ",NOP,999)
95NCDS1 W !," 33. NON CANCER-DIRECTED SURGERY...: ",NCDS1 W:NCDS2'="" !,?37,NCDS2
96DCDS W !," 34. DATE OF CANCER-DIRECTED"
97 W !," SURGERY......................: ",$$GET1^DIQ(165.5,IE,50)
98SA S SA=$$GET1^DIQ(165.5,IE,74)
99 S (SA1,SA2)="",LOS=$L(SA) I LOS<43 S SA1=SA G SA1
100 S NOP=$L($E(SA,1,43)," "),SA1=$P(SA," ",1,NOP-1),SA2=$P(SA," ",NOP,999)
101SA1 W !," 35. SURGICAL APPROACH.............: ",SA1 W:SA2'="" !,?37,SA2
102SPS S (CDS1,CDS2)="",LOS=$L(CDS) I LOS<43 S CDS1=CDS G SPS1
103 S NOP=$L($E(CDS,1,43)," "),CDS1=$P(CDS," ",1,NOP-1),CDS2=$P(CDS," ",NOP,999)
104SPS1 W !," 36. SURGERY OF PRIMARY SITE.......: ",CDS1 W:CDS2'="" !,?37,CDS2
105RFDT I $E(CDS,1,2)=99 D G AR
106 .S $P(^ONCO(165.5,D0,"HEP1"),U,57)=9
107 .W !," 37. RADIO-FREQUENCY DESTRUCTION OF"
108 .W !," TUMOR........................: Unknown"
109 I $E(CDS,1,2)'=17 D G AR
110 .S $P(^ONCO(165.5,D0,"HEP1"),U,57)=8
111 .W !," 37. RADIO-FREQUENCY DESTRUCTION OF"
112 .W !," TUMOR........................: NA"
113 S DR="1056 37. RADIO-FREQUENCY DESTRUCTION OF TUMOR........................" D ^DIE G:$D(Y) JUMP
114AR I ($E(CDS,1,2)="00")!($E(CDS,1,2)=99) D G SM
115 .S $P(^ONCO(165.5,D0,"HEP1"),U,58)=88
116 .W !," 38. ABLATION & RESECTION..........: NA"
117 I $E(CDS,1,2)<18 D G SM
118 .S $P(^ONCO(165.5,D0,"HEP1"),U,58)="00"
119 .W !," 38. ABLATION & RESECTION..........: Ablation & resection not administered"
120 S DR="1057 38. ABLATION & RESECTION.........." D ^DIE G:$D(Y) JUMP
121SM S SM=$$GET1^DIQ(165.5,IE,59)
122 S (SM1,SM2)="",LOS=$L(SM) I LOS<43 S SM1=SM G SM1
123 S NOP=$L($E(SM,1,43)," "),SM1=$P(SM," ",1,NOP-1),SM2=$P(SM," ",NOP,999)
124SM1 W !," 39. SURGICAL MARGINS..............: ",SM1 W:SM2'="" !,?37,SM2
125 I ($E(CDS,1,2)=99)!($E(CDS,1,2)<17) K DIR S DIR(0)="E" D ^DIR G:$D(DIRUT) EXIT W @IOF D HEAD^ONCHPC0
126DTCM I ($E(CDS,1,2)<18) D G SORS
127 .S $P(^ONCO(165.5,D0,"HEP1"),U,59)=8
128 .W !," 40. DISTANCE OF TUMOR TO CLOSEST"
129 .W !," MARGIN.......................: NA"
130 I $E(CDS,1,2)=99 D G SORS
131 .S $P(^ONCO(165.5,D0,"HEP1"),U,59)=9
132 .W !," 40. DISTANCE OF TUMOR TO CLOSEST"
133 .W !," MARGIN.......................: Unknown"
134 S DR="1058 40. DISTANCE OF TUMOR TO CLOSEST MARGIN......................." D ^DIE G:$D(Y) JUMP
135SORS S SORS=$$GET1^DIQ(165.5,IE,139)
136 S (SORS1,SORS2)="",LOS=$L(SORS) I LOS<43 S SORS1=SORS G SORS1
137 S NOP=$L($E(SORS,1,43)," ")
138 S SORS1=$P(SORS," ",1,NOP-1),SORS2=$P(SORS," ",NOP,999)
139SORS1 W !," 41. SURGERY OF OTHER REGIONAL"
140 W !," SITE(S), DISTANT SITE(S),"
141 W !," OR DISTANT LYMPH NODE(S).....: ",SORS1 W:SORS2'="" !,?37,SORS2
142STRPT W !!," 42. SURGICAL TREATMENT OF RESIDUAL PRIMARY TUMOR:"
143 I $E(CDS,1,2)="00" D G RR
144 .S $P(^ONCO(165.5,D0,"HEP1"),U,60)=8
145 .S $P(^ONCO(165.5,D0,"HEP1"),U,61)=8
146 .W !," ABLATION.....................: NA"
147 .W !," RESECTION....................: NA"
148 I $E(CDS,1,2)=99 D G RR
149 .S $P(^ONCO(165.5,D0,"HEP1"),U,60)=9
150 .S $P(^ONCO(165.5,D0,"HEP1"),U,61)=9
151 .W !," ABLATION.....................: Unknown"
152 .W !," RESECTION....................: Unknown"
153 S DR="1059 ABLATION....................." D ^DIE G:$D(Y) JUMP
154 S DR="1060 RESECTION...................." D ^DIE G:$D(Y) JUMP
155RR S RR=$$GET1^DIQ(165.5,IE,23)
156 S (RR1,RR2)="",LOS=$L(RR) I LOS<43 S RR1=RR G RR1
157 S NOP=$L($E(RR,1,43)," "),RR1=$P(RR," ",1,NOP-1),RR2=$P(RR," ",NOP,999)
158RR1 W !!," 43. RECONSTRUCTION/RESTORATION-"
159 W !," FIRST COURSE.................: ",RR1 W:RR2'="" !,?37,RR2
160PRTC W ! K DIR S DIR(0)="E" D ^DIR G:$D(DIRUT) EXIT
161 G R^ONCHPC4A
162JUMP ;Jump to prompts
163 S XX="" R !!," GO TO ITEM: ",X:DTIME I (X="")!(X[U) S OUT="Y" G EXIT
164 I X["?" D G:$D(DIRUT) EXIT G JUMP
165 .W @IOF,!," CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I) I I=18 W ! K DIR S DIR(0)="E" D ^DIR Q:$D(DIRUT) W @IOF,!," CHOOSE FROM:"
166 I '$D(TABLE(X)) S:X?1.2N X=X_"." S XX=X,X=$O(TABLE(X)) I ($P(X,XX,1)'="")!(X="") W *7,"??" D G JUMP
167 .W !," CHOOSE FROM:" F I=1:1:CHOICES W !,?5,HTABLE(I) I I=18 W ! K DIR S DIR(0)="E" D ^DIR Q:$D(DIRUT) W @IOF,!," CHOOSE FROM:"
168 S X=TABLE(X)
169 G @X
170EXIT S:$D(DIRUT) OUT="Y"
171 K CHOICES,PIECE,HTABLE,TABLE
172 K CDS,CHE,IE,LOS,NCDS,NOP,RAD,SA,SA1,SA2,SM,SM1,SM2
173 K DA,DIE,DIR,DIROUT,DIRUT,DR,DTOUT,DUOUT,X,XX,Y
174 Q
Note: See TracBrowser for help on using the repository browser.