Skip to content

Conversation

@swebberuk
Copy link
Contributor

@swebberuk swebberuk commented Nov 24, 2025

Description

On the "Add details of implanted medical device" page make "Year removed" optional for "Removed implants"/"Implanted device has been removed".

This is to make it consistent with "Removed devices"/"Implants have been removed" on the "Add details of breast implants or augmentation" page.

Making this change in preparation for DTOSS-11528 (update implanted medical device history).

Jira link

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

screenshot-1

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@swebberuk swebberuk changed the title make 'Year removed' optional for 'Implanted device has been removed' [wip] make 'Year removed' optional for 'Implanted device has been removed' Nov 24, 2025
@swebberuk swebberuk force-pushed the DTOSS-11720-year-removed-optional branch 3 times, most recently from 21ed1a2 to c037265 Compare November 24, 2025 15:41
@swebberuk swebberuk changed the title [wip] make 'Year removed' optional for 'Implanted device has been removed' make 'Year removed' optional for 'Implanted device has been removed' Nov 24, 2025
)


class TestYearField:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added TestYearField. This will be provided by #739 once it has been merged to main and this branch rebased.

@swebberuk swebberuk marked this pull request as ready for review November 24, 2025 16:17
@swebberuk swebberuk requested a review from a team November 24, 2025 16:17
@swebberuk swebberuk force-pushed the DTOSS-11720-year-removed-optional branch from c037265 to 2891f9c Compare November 24, 2025 16:23
return implanted_medical_device_history

def full_clean(self):
# if a removal_year is provided then remove it if device_has_been_removed is False
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if FormWithConditionalFields should have a way of handling this use case too (i.e. declaring that a field should only be parsed in a certain case, even if it is not required to pass a value) 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree that could be useful. Should I create a ticket in the backlog to investigate that? I don't want it to be a requirement of merging this PR, as these changes are required for DTOSS-11528 (updating implanted medical device history).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that would be great, don't let it block this work 👍🏻

@swebberuk swebberuk force-pushed the DTOSS-11720-year-removed-optional branch from b55e90a to 1fc4158 Compare November 25, 2025 09:07
@malcolmbaig malcolmbaig changed the title make 'Year removed' optional for 'Implanted device has been removed' Make 'Year removed' optional for 'Implanted device has been removed' Nov 25, 2025
@swebberuk swebberuk force-pushed the DTOSS-11720-year-removed-optional branch from 1fc4158 to 93033e4 Compare November 25, 2025 11:06
@swebberuk swebberuk force-pushed the DTOSS-11720-year-removed-optional branch from 93033e4 to 559353e Compare November 25, 2025 11:18
@swebberuk swebberuk requested a review from MatMoore November 25, 2025 13:18
@swebberuk swebberuk merged commit 2ae0b6e into main Nov 25, 2025
34 of 36 checks passed
@swebberuk swebberuk deleted the DTOSS-11720-year-removed-optional branch November 25, 2025 13:59
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