Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach NHS number to consent form when matching #2475

Merged
merged 2 commits into from
Nov 17, 2024
Merged

Conversation

tvararu
Copy link
Member

@tvararu tvararu commented Nov 17, 2024

If we find a PDS patient with an NHS number that doesn't exist in our database, and no patients match with the consent form, we should update the consent form with the PDS NHS number. This will allow nurses to create a patient record from this consent form at a later stage.

This PR also adds the nhs_number optional field to a consent form for this purpose.

This is a prerequisite to #2454.

Copy link

sonarcloud bot commented Nov 17, 2024

Copy link
Contributor

@thomasleese thomasleese left a comment

Choose a reason for hiding this comment

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

It might be worth adding the normalisation we've got on patients:

normalizes :nhs_number, with: -> { _1.blank? ? nil : _1.gsub(/\s/, "") }

Perhaps in a concern for both this and patients?

This will be populated if the PDS lookup finds a matching patient which
doesn't exist in our database.
If we find a PDS patient with an NHS number that doesn't exist in our
database, and no patients match with the consent form, we should update
the consent form with the PDS NHS number. This will allow nurses to
create a patient record form this consent form at a later stage.
@tvararu tvararu temporarily deployed to mavis-pr-2475 November 17, 2024 19:13 Inactive
@tvararu
Copy link
Member Author

tvararu commented Nov 17, 2024

@thomasleese good idea, I've added the call but holding back on making it a concern since it's only used in 2 places

Copy link

sonarcloud bot commented Nov 17, 2024

@tvararu tvararu merged commit 3af3d52 into main Nov 17, 2024
12 checks passed
@tvararu tvararu deleted the nhs-number-consent-form branch November 17, 2024 19:26
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