|
24 | 24 | from manage_breast_screening.mammograms.presenters.symptom_presenter import ( |
25 | 25 | SymptomPresenter, |
26 | 26 | ) |
27 | | -from manage_breast_screening.participants.models.symptom import SymptomType |
28 | 27 |
|
29 | 28 | from .appointment_presenters import AppointmentPresenter |
30 | 29 |
|
@@ -79,165 +78,151 @@ def symptom_rows(self): |
79 | 78 | return [symptom.summary_list_row for symptom in self.symptoms] |
80 | 79 |
|
81 | 80 | @property |
82 | | - def add_lump_link(self): |
| 81 | + def symptom_buttons(self): |
| 82 | + return [ |
| 83 | + self.add_lump_button, |
| 84 | + self.add_swelling_or_shape_change_button, |
| 85 | + self.add_skin_change_button, |
| 86 | + self.add_nipple_change_button, |
| 87 | + self.add_other_symptom_button, |
| 88 | + ] |
| 89 | + |
| 90 | + @property |
| 91 | + def medical_history_buttons(self): |
| 92 | + return [ |
| 93 | + self.add_breast_cancer_history_button, |
| 94 | + self.add_implanted_medical_device_history_button, |
| 95 | + self.add_breast_augmentation_history_button, |
| 96 | + self.add_mastectomy_or_lumpectomy_history_button, |
| 97 | + self.add_cyst_history_button, |
| 98 | + self.add_benign_lump_history_button, |
| 99 | + self.add_other_procedure_history_button, |
| 100 | + ] |
| 101 | + |
| 102 | + @property |
| 103 | + def add_lump_button(self): |
83 | 104 | url = reverse("mammograms:add_symptom_lump", kwargs={"pk": self.appointment.pk}) |
84 | 105 |
|
85 | | - return { |
86 | | - "href": url, |
87 | | - "text": ( |
88 | | - "Add another lump" |
89 | | - if SymptomType.LUMP in self.existing_symptom_type_ids |
90 | | - else "Add a lump" |
91 | | - ), |
92 | | - } |
| 106 | + return {"href": url, "text": "Lump"} |
93 | 107 |
|
94 | 108 | @property |
95 | | - def add_swelling_or_shape_change_link(self): |
| 109 | + def add_swelling_or_shape_change_button(self): |
96 | 110 | url = reverse( |
97 | 111 | "mammograms:add_symptom_swelling_or_shape_change", |
98 | 112 | kwargs={"pk": self.appointment.pk}, |
99 | 113 | ) |
100 | 114 |
|
101 | | - return { |
102 | | - "href": url, |
103 | | - "text": ( |
104 | | - "Add another swelling or shape change" |
105 | | - if SymptomType.SWELLING_OR_SHAPE_CHANGE |
106 | | - in self.existing_symptom_type_ids |
107 | | - else "Add a swelling or shape change" |
108 | | - ), |
109 | | - } |
| 115 | + return {"href": url, "text": "Swelling or shape change"} |
110 | 116 |
|
111 | 117 | @property |
112 | | - def add_skin_change_link(self): |
| 118 | + def add_skin_change_button(self): |
113 | 119 | url = reverse( |
114 | 120 | "mammograms:add_symptom_skin_change", |
115 | 121 | kwargs={"pk": self.appointment.pk}, |
116 | 122 | ) |
117 | 123 |
|
118 | | - return { |
119 | | - "href": url, |
120 | | - "text": ( |
121 | | - "Add another skin change" |
122 | | - if SymptomType.SKIN_CHANGE in self.existing_symptom_type_ids |
123 | | - else "Add a skin change" |
124 | | - ), |
125 | | - } |
| 124 | + return {"href": url, "text": "Skin change"} |
126 | 125 |
|
127 | 126 | @property |
128 | | - def add_nipple_change_link(self): |
| 127 | + def add_nipple_change_button(self): |
129 | 128 | url = reverse( |
130 | 129 | "mammograms:add_symptom_nipple_change", |
131 | 130 | kwargs={"pk": self.appointment.pk}, |
132 | 131 | ) |
133 | 132 |
|
134 | | - return { |
135 | | - "href": url, |
136 | | - "text": ( |
137 | | - "Add another nipple change" |
138 | | - if SymptomType.NIPPLE_CHANGE in self.existing_symptom_type_ids |
139 | | - else "Add a nipple change" |
140 | | - ), |
141 | | - } |
| 133 | + return {"href": url, "text": "Nipple change"} |
142 | 134 |
|
143 | 135 | @property |
144 | | - def add_other_symptom_link(self): |
| 136 | + def add_other_symptom_button(self): |
145 | 137 | url = reverse( |
146 | 138 | "mammograms:add_symptom_other", |
147 | 139 | kwargs={"pk": self.appointment.pk}, |
148 | 140 | ) |
149 | 141 |
|
150 | | - return { |
151 | | - "href": url, |
152 | | - "text": ( |
153 | | - "Add another symptom (other symptom)" |
154 | | - if SymptomType.NIPPLE_CHANGE in self.existing_symptom_type_ids |
155 | | - else "Add a symptom (other symptom)" |
156 | | - ), |
157 | | - } |
| 142 | + return {"href": url, "text": "Other"} |
158 | 143 |
|
159 | 144 | @property |
160 | | - def add_breast_cancer_history_link(self): |
| 145 | + def add_breast_cancer_history_button(self): |
161 | 146 | url = reverse( |
162 | 147 | "mammograms:add_breast_cancer_history_item", |
163 | 148 | kwargs={"pk": self.appointment.pk}, |
164 | 149 | ) |
165 | 150 |
|
166 | 151 | return { |
167 | 152 | "href": url, |
168 | | - "text": ("Add breast cancer history"), |
| 153 | + "text": "Breast cancer", |
169 | 154 | } |
170 | 155 |
|
171 | 156 | @property |
172 | | - def add_implanted_medical_device_history_link(self): |
| 157 | + def add_implanted_medical_device_history_button(self): |
173 | 158 | url = reverse( |
174 | 159 | "mammograms:add_implanted_medical_device_history_item", |
175 | 160 | kwargs={"pk": self.appointment.pk}, |
176 | 161 | ) |
177 | 162 |
|
178 | 163 | return { |
179 | 164 | "href": url, |
180 | | - "text": ("Add implanted medical device history"), |
| 165 | + "text": "Implanted medical device", |
181 | 166 | } |
182 | 167 |
|
183 | 168 | @property |
184 | | - def add_cyst_history_link(self): |
| 169 | + def add_cyst_history_button(self): |
185 | 170 | url = reverse( |
186 | 171 | "mammograms:add_cyst_history_item", |
187 | 172 | kwargs={"pk": self.appointment.pk}, |
188 | 173 | ) |
189 | 174 |
|
190 | 175 | return { |
191 | 176 | "href": url, |
192 | | - "text": ("Add cyst history"), |
| 177 | + "text": ("Cysts"), |
193 | 178 | } |
194 | 179 |
|
195 | 180 | @property |
196 | | - def add_breast_augmentation_history_link(self): |
| 181 | + def add_breast_augmentation_history_button(self): |
197 | 182 | url = reverse( |
198 | 183 | "mammograms:add_breast_augmentation_history_item", |
199 | 184 | kwargs={"pk": self.appointment.pk}, |
200 | 185 | ) |
201 | 186 |
|
202 | 187 | return { |
203 | 188 | "href": url, |
204 | | - "text": ("Add breast augmentation history"), |
| 189 | + "text": "Breast implants or augmentation", |
205 | 190 | } |
206 | 191 |
|
207 | 192 | @property |
208 | | - def add_benign_lump_history_link(self): |
| 193 | + def add_benign_lump_history_button(self): |
209 | 194 | url = reverse( |
210 | 195 | "mammograms:add_benign_lump_history_item", |
211 | 196 | kwargs={"pk": self.appointment.pk}, |
212 | 197 | ) |
213 | 198 |
|
214 | 199 | return { |
215 | 200 | "href": url, |
216 | | - "text": "Add benign lump history", |
| 201 | + "text": "Benign lumps", |
217 | 202 | } |
218 | 203 |
|
219 | 204 | @property |
220 | | - def add_mastectomy_or_lumpectomy_history_link(self): |
| 205 | + def add_mastectomy_or_lumpectomy_history_button(self): |
221 | 206 | url = reverse( |
222 | 207 | "mammograms:add_mastectomy_or_lumpectomy_history_item", |
223 | 208 | kwargs={"pk": self.appointment.pk}, |
224 | 209 | ) |
225 | 210 |
|
226 | 211 | return { |
227 | 212 | "href": url, |
228 | | - "text": "Add mastectomy or lumpectomy history", |
| 213 | + "text": "Mastectomy or lumpectomy", |
229 | 214 | } |
230 | 215 |
|
231 | 216 | @property |
232 | | - def add_other_procedure_history_link(self): |
| 217 | + def add_other_procedure_history_button(self): |
233 | 218 | url = reverse( |
234 | 219 | "mammograms:add_other_procedure_history_item", |
235 | 220 | kwargs={"pk": self.appointment.pk}, |
236 | 221 | ) |
237 | 222 |
|
238 | 223 | return { |
239 | 224 | "href": url, |
240 | | - "text": "Add other procedure history", |
| 225 | + "text": "Other procedures", |
241 | 226 | } |
242 | 227 |
|
243 | 228 | def _present_items(self, items, presenter_class): |
|
0 commit comments