Repository navigation
Conversation
Achilles 1.7 renumbered "Distribution of length of stay by visit_concept_id" from analysis 211 to 213 and reused 211 for the count of visit records with an end date before the start date, which is written to achilles_results rather than achilles_results_dist. The visit drilldown and drilldown summary queries still read analysis 211 from achilles_results_dist, so the visit duration box plot in the Data Sources visit report has been empty for every source characterized with Achilles 1.7 or later. Accept analysis 213 in both queries and keep 211 so results produced by older Achilles versions keep working. Adds a test that runs the visit drilldown and drilldown summary queries against the embedded Postgres database with a 213 row and a legacy 211 row.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #2582
Achilles 1.7 (August 2022) renumbered "Distribution of length of stay by visit_concept_id" from analysis 211 to analysis 213 and reused 211 for "Number of visit records with end date < start date", a plain count that is written to
achilles_results, notachilles_results_dist:achilles_results_dist)achilles_results)achilles_results_dist)cdmresults/sql/report/visit/drilldown/visitDurationByType.sqlandcdmresults/sql/report/visit/drilldownsummary/visitDurationByType.sqlstill read analysis 211 fromachilles_results_dist, so for any source characterized with Achilles 1.7 or laterGET /cdmresults/{sourceKey}/visit/{conceptId}andGET /cdmresults/{sourceKey}/visitreturn an emptyvisitDurationByTypearray, and the Achilles cache warm-up (AchillesCacheTaskletlistsvisitDurationByTypefor the visit domain) caches that empty result.Changes:
achilles_results_dist, so the two cannot both match.CDMResultsVisitDurationTest, which runs the visit drilldown and drilldown summary queries throughCDMResultsAnalysisRunner.getDrilldownagainst the embedded Postgres database with a 213 row and a legacy 211 row. Two of the three tests fail on master.The change is a plain
IN (211, 213)list, so SqlRender translation is unaffected for the other dialects.Testing:
mvn -DskipUnitTests=false -Dtest='CDMResultsVisitDurationTest,CDMResultsTreemapTest,CDMResultsAnalysisRunnerTest' -Dmaven.gitcommitid.skip=true -Pwebapi-postgresql test(JDK 21): 5 tests, 0 failures.