Skip to content

Commit

Permalink
feat: improve docs for GetUniqueCohortDefinitionIdsListFromRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse authored Feb 7, 2024
1 parent 9ab34c7 commit 855414c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/parsing.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ func MakeUnique(input []int) []int {
return uniqueList
}

// Utility function to parse out the cohort definition ids from a specific structure in which
// they can be found (in this case deep inside CustomDichotomousVariableDef items) and concatenate them
// with another given list of ids, removing duplicate ids (if any).
func GetUniqueCohortDefinitionIdsListFromRequest(cohortDefinitionIds []int, filterCohortPairs []CustomDichotomousVariableDef) []int {
var idsList []int
idsList = append(idsList, cohortDefinitionIds...)
Expand Down

0 comments on commit 855414c

Please sign in to comment.