Skip to content

Commit 3b8db93

Browse files
authored
Merge pull request #820 from NHSDigital/DTOSS-11781-cleanup-2
Medical history - more cleanup
2 parents 07ce75e + 275c174 commit 3b8db93

21 files changed

+213
-62
lines changed

manage_breast_screening/mammograms/jinja2/mammograms/record_medical_information.jinja

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,6 @@
190190
"items": []
191191
}
192192
},
193-
{
194-
"key": {
195-
"text": "Non-cancerous lump diagnosis"
196-
},
197-
"value": {
198-
"html": non_cancerous_lump_diagnosis_link
199-
},
200-
"actions": {
201-
"items": []
202-
}
203-
},
204193
{
205194
"key": {
206195
"text": "Mastectomy or lumpectomy history"
@@ -211,17 +200,6 @@
211200
"actions": {
212201
"items": []
213202
}
214-
},
215-
{
216-
"key": {
217-
"text": "Other breast or chest procedures"
218-
},
219-
"value": {
220-
"html": chest_procedures_link
221-
},
222-
"actions": {
223-
"items": []
224-
}
225203
}
226204
]
227205
}) }}

manage_breast_screening/mammograms/presenters/appointment_presenters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def current_status(self):
9393
colour = status_colour(current_status.state)
9494

9595
return {
96-
"classes": f"nhsuk-tag--{colour} app-u-nowrap"
97-
if colour
98-
else "app-u-nowrap",
96+
"classes": (
97+
f"nhsuk-tag--{colour} app-u-nowrap" if colour else "app-u-nowrap"
98+
),
9999
"text": current_status.get_state_display(),
100100
"key": current_status.state,
101101
"is_confirmed": current_status.state == AppointmentStatus.CONFIRMED,

manage_breast_screening/mammograms/presenters/medical_history/__init__.py

Whitespace-only changes.

manage_breast_screening/mammograms/presenters/benign_lump_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/benign_lump_history_item_presenter.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88

99
class BenignLumpHistoryItemPresenter:
10-
def __init__(self, benign_lump_history_item):
10+
def __init__(self, benign_lump_history_item, counter=None):
1111
self._item = benign_lump_history_item
12+
self.counter = counter
1213
self.right_breast_procedures = self._format_multiple_choices(
1314
self._item.right_breast_procedures, BenignLumpHistoryItem.Procedure
1415
)
@@ -63,6 +64,11 @@ def change_link(self):
6364
},
6465
),
6566
"text": "Change",
67+
"visually_hidden_text": (
68+
f" benign lump item {self.counter}"
69+
if self.counter
70+
else " benign lump item"
71+
),
6672
}
6773

6874
def _format_multiple_choices(self, choices, ChoiceClass):

manage_breast_screening/mammograms/presenters/breast_augmentation_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/breast_augmentation_history_item_presenter.py

File renamed without changes.

manage_breast_screening/mammograms/presenters/breast_cancer_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/breast_cancer_history_item_presenter.py

File renamed without changes.

manage_breast_screening/mammograms/presenters/cyst_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/cyst_history_item_presenter.py

File renamed without changes.

manage_breast_screening/mammograms/presenters/implanted_medical_device_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/implanted_medical_device_history_item_presenter.py

File renamed without changes.

manage_breast_screening/mammograms/presenters/mastectomy_or_lumpectomy_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/mastectomy_or_lumpectomy_history_item_presenter.py

File renamed without changes.

manage_breast_screening/mammograms/presenters/other_procedure_history_item_presenter.py renamed to manage_breast_screening/mammograms/presenters/medical_history/other_procedure_history_item_presenter.py

File renamed without changes.

0 commit comments

Comments
 (0)