Ensure all hardcoded values are included in queries #2530
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)
, andSocial 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 usescategory=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