Skip to content

Conversation

@MatMoore
Copy link
Contributor

@MatMoore MatMoore commented Nov 24, 2025

Description

This extends the cyst history item form to allow for editing.

Edit cyst details form

The display of these items is just a placeholder at the moment - we will have another ticket to sort out this page. For now I've just added the change links above each summary list.
Cyst details on the medical information page. This does not match the design yet.

Jira link

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

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@MatMoore MatMoore force-pushed the DTOSS-11525-update-history-of-cysts branch 2 times, most recently from eb20c10 to 7cb5280 Compare November 24, 2025 13:40
@MatMoore MatMoore marked this pull request as ready for review November 24, 2025 13:46
@MatMoore MatMoore requested a review from a team November 24, 2025 13:46
@MatMoore MatMoore changed the title update history of cysts medical history - update history of cysts Nov 24, 2025
@MatMoore MatMoore force-pushed the DTOSS-11525-update-history-of-cysts branch from 7cb5280 to 223e68e Compare November 24, 2025 13:55
@malcolmbaig malcolmbaig changed the title medical history - update history of cysts Medical history - update history of cysts Nov 25, 2025
)
except CystHistoryItem.DoesNotExist:
logger.exception("History item does not exist for kwargs=%s", self.kwargs)
return redirect(self.get_success_url())
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it okay to return a HttpResponseRedirect here?

When I alter the URL to contain a UUID that is not in the database then I see the "History item does not exist for" log message but then get a django error page for a TypeError and message "manage_breast_screening.mammograms.forms.cyst_history_form.CystHistoryUpdateForm() argument after ** must be a mapping, not HttpResponseRedirect"

Does get_form_kwargs() need to always return a dict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, this was a bug 🤦🏻 I've just pushed a fix for this.


class ChangeCystHistoryView(BaseCystHistoryView):
form_class = CystHistoryUpdateForm
template_name = (
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to include template_name here? Can we use the one from BaseCystHistoryView instead?

this HTML is temporary until we implement the proper design for the
record medical information page.
This is visually hidden, and ensures that we don't have multiple links
close together that are hard to distinguish by users of assistive tech
This is now moved to the AppointmentMixin
@MatMoore MatMoore force-pushed the DTOSS-11525-update-history-of-cysts branch from a108e58 to c960cf7 Compare November 25, 2025 14:07
@MatMoore
Copy link
Contributor Author

@swebberuk I've just addressed the above comments and rebased the branch - could you give it another look?

Copy link
Contributor

@swebberuk swebberuk 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. 👍

@MatMoore MatMoore merged commit adb4703 into main Nov 25, 2025
13 checks passed
@MatMoore MatMoore deleted the DTOSS-11525-update-history-of-cysts branch November 25, 2025 14:49
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