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

Prevalence patient search #37

Closed
wants to merge 2 commits into from

Conversation

davidbgomes
Copy link

📌 References

📝 Implementation

  • Add Prevelance patient search logic. Since the trackedEntity endpoint doesn't support the rootJunction=OR, in order to filter by one field or the other, I've created two separate calls for each and joined them.

📹 Screenshots/Screen capture

image

🔥 Notes to the tester

Copy link

@9sneha-n 9sneha-n left a comment

Choose a reason for hiding this comment

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

@davidbgomes If i type "aa" in the search and then delete one char "a" then there are duplicate surveys displayed as seen in screenshot. There should be only 2 surveys, but they are displayed twice
Screenshot 2024-05-07 at 11 47 49 AM

@9sneha-n
Copy link

9sneha-n commented May 7, 2024

@davidbgomes based on slack discussion with miquel on amr-surveys channel, we can use api filter correct?
/api/tracker/trackedEntities?program=i0msBbbQxYC&orgUnit=di7FkWFGyuS&fields=trackedEntity,attributes&filter=tlRPoWumrSa%3Aeq%3AdAGk9nbjMeI&filter=yEkJlUFeJdP%3Alike%3Aaa&rootJunction=AND
Let me know if you see any issue with this approach.

@davidbgomes
Copy link
Author

Hi @9sneha-n , addressed the comment about using an array for survey types. As we talked on slack, the endpoints /events and /trackedEntities endpoints no longer work with rootJunction=OR, it acts like the default AND. I'll keep it as it for now and we'll see what can be done in that regard.

@9sneha-n
Copy link

Fixed in #59

@9sneha-n 9sneha-n closed this May 23, 2024
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.

3 participants