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

Ensure all hardcoded values are included in queries #2530

Merged
merged 6 commits into from
Sep 10, 2024

Conversation

m-goggins
Copy link
Collaborator

@m-goggins m-goggins commented Sep 10, 2024

PULL REQUEST

Summary

This PR adds a migration to insert and link all of the values that we have hard coded in our demo queries right now. For example, when you use the hard coded query for Chlamydia, you included medications in the query. The TCR query for Chlamydia, on the other hand, does not include medications. This PR addresses this issue by adding linking additional value sets to the TCR condition for Chlamydia so that when you run a query for Chlamydia using the data from the TCR, you will also get the hard coded concepts.

Importantly, all newly linked concepts are added via new valuesets, e.g., Missing Chlamydia mrtc rather than the TCR Chlamydia mrtc value set, so if we want to undo these linkages in the future (to keep the base queries true to the data in the TCR only), we can easily unlink by changing the condition_to_valueset links. Additionally, some concepts were already included in the TCR data but were not linked to the condition in the way that they are in our hard coded queries, e.g., the gonorrhea test was not linked to chlamydia.

I also added Newborn Screening, Cancer (Leukemia), and Social Determinants of Health as new conditions, though the Social Determinants of Health one does not actually run using any codes to make the query; it just uses category=social-history.

Related Issue

Fixes #2520

Acceptance Criteria

Please copy the acceptance criteria from your ticket and paste it here for your reviewer(s)

Additional Information

Once the PR for #2507 lands, I'll do a quick follow up PR to update the names of the queries in constants.ts.

Checklist

  • If this code affects the other scrum team, have they been notified? (In Slack, as reviewers, etc.)

@m-goggins m-goggins marked this pull request as ready for review September 10, 2024 16:54
Copy link
Collaborator

@fzhao99 fzhao99 left a comment

Choose a reason for hiding this comment

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

🚢

@m-goggins m-goggins added this pull request to the merge queue Sep 10, 2024
Merged via the queue into main with commit 827c026 Sep 10, 2024
10 checks passed
@m-goggins m-goggins deleted the 2520/insert-hardcoded-demo-query-values branch September 10, 2024 20:05
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.

Write migration to insert hardcoded values in existing demo queries
2 participants