Skip to content

Instantly share code, notes, and snippets.

@zindel
Last active March 23, 2016 13:31
Show Gist options
  • Save zindel/a92833b51aea5c4897ae to your computer and use it in GitHub Desktop.
Save zindel/a92833b51aea5c4897ae to your computer and use it in GitHub Desktop.
/do(
$version := @study[$study].config_version.id(),
$p_id := merge(participant_group {
study_version := $version,
code := if_null($participant_group, 'all-participants')
}),
$t_id := merge(time_period := {
study_version := $version,
code := if_null($time_period, 'anytime'),
title := if_null(title, 'Anytime')
}),
$id := merge(requirement_list := {
study_version := $version,
participant_group := $p_id,
time_period := $t_id
}),
{id := $id}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment