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

fix: fix AllergyIntoleranceService lookup by pid to return results instead of empty list. #6864

Conversation

stephenwaite
Copy link
Member

Fixes #

Short description of what this resolves:

Changes proposed in this pull request:

@stephenwaite stephenwaite changed the title fix: fix allergyIntoleranceService lookup by pid fix: fix AllergyIntoleranceService lookup by pid Sep 18, 2023
if (isset($search['lists.pid'])) {
$search['puuid'] = $search['lists.pid'];
$patient = (new PatientService())->findByPid($search['lists.pid']);
$search['puuid'] = UuidRegistry::uuidToString($patient['uuid']);
Copy link
Member

Choose a reason for hiding this comment

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

nice!

@adunsulag , is there a chance this fix may unmask a bug and affect inferno testing?

Copy link
Member

Choose a reason for hiding this comment

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

Yes @stephenwaite and @bradymiller, I'll need to look at this more closely as I thought we brought in a PR recently to 'supposedly' fix the very thing that @stephenwaite is fixing. I'm finding it odd that its still braking. I've got some stuff going on today, but will see if I can get to it this evening or tomorrow.

Copy link
Member

Choose a reason for hiding this comment

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

@stephenwaite I opened a PR to your PR with some changes. I thought the changes by @IvanJov
were in this same spot but it was lower down in the function. I tested this and allergies are now showing up in the card. Sinces its hitting the lists.pid field for the search it shouldn't have an impact on the Inferno testing.
Here is the PR. stephenwaite#9

adunsulag and others added 3 commits September 19, 2023 18:23
Rather than doing a duplicate query, we filter on the patient_id for the
pid in the query.
…service-getall-pid

Fix search by lists.pid and remove dup query
@stephenwaite
Copy link
Member Author

thanks @adunsulag and @bradymiller!

@stephenwaite stephenwaite merged commit 776475c into openemr:master Sep 20, 2023
@bradymiller
Copy link
Member

tenor99

@adunsulag adunsulag changed the title fix: fix AllergyIntoleranceService lookup by pid fix: fix AllergyIntoleranceService lookup by pid to return results instead of empty list. Nov 16, 2023
@adunsulag adunsulag added this to the 7.0.2 milestone Nov 16, 2023
@adunsulag adunsulag added the developers This issue targets an issue that is for developers/collaborators/module writers/technical users label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developers This issue targets an issue that is for developers/collaborators/module writers/technical users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants