Data Sources visit drilldown returns an empty visitDurationByType for Achilles 1.7+ results (query still reads analysis 211)
维护者通常 2 天内回复
已经有一个关联 PR 被合并了。
- #2583 来自 @DG47 —— 已合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 77/100
调研方向
阅读 src/main/resources/resources/cdmresults/sql/report/visit/drilldown/visitDurationByType.sql 和 src/main/resources/resources/cdmresults/sql/report/visit/drilldownsummary/visitDurationByType.sql;两者都使用 analysis 211 筛选住院时长分布,而 issue 指出 Achilles 1.7+ 将其存储在 analysis 213 下。检查相关的查询测试或 fixtures,然后验证对于 Achilles 1.7+ 的结果架构,两个 visit 端点都会返回分布字段。
由索引模型根据 Issue 内容生成。
描述
Expected behavior
GET /cdmresults/{sourceKey}/visit/{conceptId} (and the drilldown summary GET /cdmresults/{sourceKey}/visit) return the length of stay distribution for the visit concept in visitDurationByType, with minValue, p10Value, p25Value, medianValue, p75Value, p90Value and maxValue.
Actual behavior
visitDurationByType is always an empty array when the results schema was produced by Achilles 1.7.0 or later, even though achilles_results_dist contains the length of stay distribution. The Achilles cache warm-up (AchillesCacheTasklet includes visitDurationByType in the visit domain) caches the empty result.
Cause: Achilles 1.7.0 renumbered "Distribution of length of stay by visit_concept_id" from analysis 211 to analysis 213 (inst/csv/achilles/achilles_analysis_details.csv; in 1.6.3 the line is 211,1,0,,Distribution of length of stay by visit_concept_id,visit_concept_id, in 1.7.0 it is 213,1,,Distribution of length of stay by visit_concept_id,visit_concept_id and 211 became Number of visit records with end date < start date, a count written to achilles_results). Both
src/main/resources/resources/cdmresults/sql/report/visit/drilldown/visitDurationByType.sqlsrc/main/resources/resources/cdmresults/sql/report/visit/drilldownsummary/visitDurationByType.sql
still filter achilles_results_dist on analysis_id = 211, which no longer has any rows in that table.
Steps to reproduce behavior
- Run Achilles 1.7.x on a CDM that has visit_occurrence records (for example Eunomia) and point a WebAPI source's results daimon at the results schema.
- Check that the distribution exists:
SELECT analysis_id, stratum_1, median_value FROM <results>.achilles_results_dist WHERE analysis_id IN (211, 213);returns rows for 213 only. - Call
GET /WebAPI/cdmresults/<sourceKey>/visit/9201(Inpatient Visit, or any visit concept present in step 2). visitDurationByTypeis[];ageAtFirstOccurrence,prevalenceByMonthandprevalenceByGenderAgeYearare populated.
Environment: WebAPI master (3.0.1-SNAPSHOT) and 2.15.x; Achilles 1.7.0 through 1.7.2; reproduced with the embedded PostgreSQL test database, the query is dialect-independent.
- 主要语言
- Java
- 星标
- 153
- 派生
- 186
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 21
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OHDSI/WebAPI 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 67/100
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 35/100
维护者通常 2 天内回复
相似的 Issue
-
Document and enforce pull request review guidelines可能已有人在做 @dashorst 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRuby未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
hermes-queue
难度 1/5 1 小时以内 新手友好度 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
维护者通常 1 天内回复
-
Retry-After parser accepts invalid delay-seconds values可能已有人在做 @Dhruvraj-Rana 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 82/100
open-telemetry/opentelemetry-java#9018 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
dropwizard/dropwizard#11410 ·
维护者通常 1 天内回复