Skip to content

Conversation

@swebberuk
Copy link
Contributor

@swebberuk swebberuk commented Nov 21, 2025

work in progress, not yet ready for review

Added "Add details of mastectomy or lumpectomy" page which can be accessed from the "Record medical information" page.

Description

image

Jira link

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-11452

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@swebberuk swebberuk requested a review from a team November 21, 2025 13:15
@swebberuk swebberuk force-pushed the DTOSS-11452-mastectomy-and-lumpectomy branch 2 times, most recently from bd63fb1 to c657e2a Compare November 21, 2025 13:29
@swebberuk swebberuk marked this pull request as draft November 21, 2025 13:46
@swebberuk swebberuk force-pushed the DTOSS-11452-mastectomy-and-lumpectomy branch 4 times, most recently from b2d3bdc to 441eb64 Compare November 24, 2025 15:06
classes="nhsuk-input--width-4",
min_value=datetime.date.today().year - 80,
max_value=datetime.date.today().year,
error_messages={
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will replace this with YearField once #739 has been merged, so won't need to specify error messages.

@swebberuk swebberuk force-pushed the DTOSS-11452-mastectomy-and-lumpectomy branch from 441eb64 to ee4eeb9 Compare November 24, 2025 15:56
{% block form %}
<p>
This is designed to capture information on prophylactic or elective surgery.
<a href="../breast-cancer-history/" class="nhsuk-link">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if href="../breast-cancer-history/" is the best way to refer to the "Add details of breast cancer" page? Should I be using medical_information_presenter.py add_breast_cancer_history_link instead?

Copy link
Contributor

@MatMoore MatMoore Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think that would be better. The method is already implemented, and looking up all the routes via reverse means the tests will check that the links are actually going somewhere.

@swebberuk swebberuk changed the title [wip] Add mastectomy or lumpectomy history form Add mastectomy or lumpectomy history form Nov 24, 2025
@swebberuk swebberuk marked this pull request as ready for review November 24, 2025 16:01
@swebberuk swebberuk force-pushed the DTOSS-11452-mastectomy-and-lumpectomy branch from ee4eeb9 to 64f1894 Compare November 24, 2025 16:29
Copy link
Contributor

@MatMoore MatMoore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just a couple of minor things


assert form.is_valid()

existing_log_count = AuditLog.objects.count()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test is doing quite a lot of verification... I'm wondering if it's worth doing quite so much querying of the database state in our tests as it's going to slow down the runtime of the test suite.

I previously added a similar test to this audit log bit for something else, but we decided in review to drop it, and spoke about adding some kind of static analysis check instead. I haven't had a go at that yet but think we should probably leave it out here as well.

self.when_i_click_on_add_mastectomy_or_lumpectomy()
self.then_i_see_the_add_mastectomy_or_lumpectomy_form()

self.and_i_click_save()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very minor, but the "and" here breaks the pattern slightly. Could we add in an alias for the step so it reads more naturally?

Added "Add details of mastectomy or lumpectomy" page which can be
accessed from the "Record medical information" page.
@swebberuk swebberuk force-pushed the DTOSS-11452-mastectomy-and-lumpectomy branch from ff504df to 8eaef2c Compare November 25, 2025 08:54
@swebberuk swebberuk merged commit f064d17 into main Nov 25, 2025
23 of 24 checks passed
@swebberuk swebberuk deleted the DTOSS-11452-mastectomy-and-lumpectomy branch November 25, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants