Skip to content
New issue

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

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

Already on GitHub? # to your account

bug: REST API filter by UUID breaks on some endpoints #6107

Merged

Conversation

IvanJov
Copy link
Contributor

@IvanJov IvanJov commented Jan 17, 2023

Short description of what this resolves:

Dear Community, I am representing the project of a Digital health platform developed by Cardo Health AB ( www.cardohealth.com), through the support of my current employer ( NearForm ). We are pleased to contribute some fixes in OpenEMR on behalf of Cardo Health and look forward to continuing to do so in the future.

In this PR there are multiple fixes:

  • filtering by UUID was broken on some API endpoints
  • filtering in general was broken because of a wrong usage of $search variable instead of $newSearch
  • some API endpoints were returning 500 error because byte UUID from DB wasn't converted to string before returning it in a REST API response

Changes proposed in this pull request:

@adunsulag
Copy link
Member

adunsulag commented Feb 1, 2023

So I just ran this PR through the ONC Inferno FHIR test suite and the Condition endpoint is broken for FHIR with this PR.

fhirUrl/apis/default/fhir/Condition?patient=uuid will return a 500 error.

@IvanJov
Copy link
Contributor Author

IvanJov commented Feb 1, 2023

@adunsulag Thanks for the review! Pushed change. Can you rerun the test suite? Thanks!

@IvanJov IvanJov requested a review from adunsulag February 2, 2023 20:43
@IvanJov
Copy link
Contributor Author

IvanJov commented Feb 9, 2023

@adunsulag Hello! I pushed a change. Can you try the test suite again? I think that it will work now 🍻

@rehmanatcardo
Copy link

@adunsulag , would be great to know if you have any update on @IvanJov's request. Thanks in advance!

@rehmanatcardo
Copy link

@adunsulag , can you please point us to someone who can help close it.

@adunsulag
Copy link
Member

Going to dig deeper into this, but pulled the PR and many of the _search POST requests are breaking now in the Inferno test suite for our ONC certification:
image

Also Condition fails completely:
image

Fixing ConditionService to handle FHIR use case when puuid is already a TokenSearchField.
style fix... its what I get for live editing on github
@adunsulag adunsulag merged commit 95f97f4 into openemr:master Aug 10, 2023
@adunsulag adunsulag added this to the 7.0.2 milestone Nov 16, 2023
@adunsulag adunsulag changed the title fix: REST API filter by UUID bugfixes bug: REST API filter by UUID breaks on some endpoints 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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug 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.

4 participants