-
Notifications
You must be signed in to change notification settings - Fork 9
Multiple PDS searches during import #4303
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thomasleese
reviewed
Aug 18, 2025
2df858b
to
a53bc57
Compare
f2dc512
to
931294d
Compare
a53bc57
to
86498f3
Compare
a00670d
to
29d1159
Compare
86498f3
to
d10fd9b
Compare
d10fd9b
to
5ba56ae
Compare
thomasleese
reviewed
Aug 19, 2025
42a5744
to
4507bee
Compare
thomasleese
approved these changes
Aug 19, 2025
misaka
reviewed
Aug 20, 2025
misaka
reviewed
Aug 20, 2025
misaka
reviewed
Aug 20, 2025
misaka
reviewed
Aug 20, 2025
273a09a
to
6bc8a54
Compare
Update PDS::Patient.search to accept history and fuzzy parameters. This allows us to run tailored queries for MAV-1415.
…on outcome This implements the "cascading" search in MAV-1415. In the event an NHS number isn't found through our default search, we try different PDS search options and return any uniques Nhs number we find.
Introduces a complete test suite for `ProcessPatientChangesetsJob` to verify the cascading search flow, job enquieing process and NHS number retrieval based on various search results.
cda7428
to
18597e8
Compare
This will store the results from PDS searches done during a class or cohort import. It will store the step name, NHS number retrieved if any and result (one match, too many etc). We can use this to surface which step found the NHS number on a record to the user in the future.
This saves all the PDS searches performed and their results on the patient and import when committing the records.
This model was not covered by any tests directly.
This covers the case where the initial and all subsequent searches do not return results from PDS, so the patient should have multiple `pds_search_results`.
When previously a signle no_patient respponse from PDS was enough, we now need to stub the whole flow to return nothing or simply return the correct NHS number in the first request.
For data consistency, and to enable flaggind PDS info in the patient activity log, it would help to store any NHS numbers retrieved from the daily lookup job as well. This is unlikely to happen given that the dialy job is more restrictive than the import pds jobs. But int he event it does, we should have the info stored.
18597e8
to
d2b5f98
Compare
|
misaka
approved these changes
Aug 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the "cascading" search in MAV-1415. In the event an NHS number isn't found
through our default search, we try different PDS search options and return any unique NHS number we find.
https://nhsd-jira.digital.nhs.uk/browse/MAV-1415