-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adding Custom Queries backend #133
base: main
Are you sure you want to change the base?
Adding Custom Queries backend #133
Conversation
My preference would be to re-use the same constants we already have, especially the ones for Can you say more about the guardrails you're imagining we'd need to implement elsewhere? I might be missing some of the context for this. |
Hm, so I think using all the fields like I think the main thing i was worried about was making a bunch of the fields in So, 🤷🏽 i think I'm good to just update the existing if that's preferred. |
Why would we have to preserve them in the query table?
I thought we would want to keep the fields as required and add the checks since those fields make up a ValueSet and lend credibility to them when used, e.g., a valueset from CSTE is more trustworthy than a valueset from DIBBs. |
Because there are more required fields in |
I am confused haha. Want to discuss in parking lot or jump on a call? |
yeah, happy to chat about it. I pushed a change where the error generated on lines 660 onward try to demonstrate the issue with just using ValueSet/Concept without further change. But free most of the day to chat through it if there's a better way forward. |
PULL REQUEST
Summary
This adds a backend function that calls the query data to display eventually on the My Queries page.
For now, we opted to use the existing
query
table. We could limit it to the five out-of-the-box queries we offer in demo; i may do that in the next PR which actually puts up the front-end but tinker with how the page looks when there are 20+, 30+ custom queries saved.Right now, this PR is not taking into account user permissions; for now, it is displaying all queries based on feedback we should not yet integrate that work Nick and Katie are doing on that front.
I also opted to create new Query/ValueSet/Concept interfaces specific to this work. I had initially started by editing the existing ones in
constants.ts
to have a lot of optional fields, but that felt potentially unwieldy. Open to the idea, but it seemed like we'd have to then build in more guardrails elsewhere to ensure that those interfaces had sufficient data elsewhere.Only other thing to note is that we are also punting on displaying which conditions comprise each query based on notes here: https://linear.app/skylight-cdc/issue/QUE-53/build-out-my-queries-backend-function. Basically, to implement, we will need to refactor part of the
query
work to ensure we can tie queries to conditions selected to valuesets included/unincluded to concepts included/unincluded. As of now, our workflow only ties queries to valuesets to concepts included/unincluded. This will impact our functionality on the My Queries to display conditions accurately as well as edit existing queries from that page.Related Issue
Fixes #117
Additional Information
Anything else the review team should know?
Checklist