Skip to content

Commit 62f2494

Browse files
committed
tmp: add TODO note for future code improvement
1 parent 326d2ff commit 62f2494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/cohortdata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func (h CohortData) RetrieveHistogramDataBySourceIdAndCohortIdAndConceptDefsPlus
8181
session := resultsDataSource.Db.Session(&gorm.Session{})
8282
err := session.Transaction(func(query *gorm.DB) error { // TODO - rename query?
8383
query, tmpTableName := QueryFilterByConceptDefsPlusCohortPairsHelper(query, sourceId, cohortDefinitionId, filterConceptDefsAndCohortPairs, omopDataSource, resultsDataSource, finalCohortAlias)
84-
if tmpTableName != "" {
84+
if tmpTableName != "" { // TODO - get rid of this distinction and then stop returning tmpTableName - see also https://github.com/uc-cdis/cohort-middleware/pull/126#discussion_r1978018822
8585
query = query.Select("distinct(" + tmpTableName + ".person_id), " + tmpTableName + ".observation_concept_id as concept_id, " + tmpTableName + ".value_as_number as concept_value_as_number")
8686
} else {
8787
histogramConcept, errGetLast := utils.CheckAndGetLastCustomConceptVariableDef(filterConceptDefsAndCohortPairs)

0 commit comments

Comments
 (0)