if (FALSE) {
a <- amber.login("https://amber-demo.obiba.org")
# Find interview records of a study
itws <- amber.interviews(a, study = "Trauma Registry")
# Get steps
steps <- amber.interviews_steps(itws)
# Get actions of the step with name QUESTIONNAIRE
actions <- amber.interviews_step_actions(steps, 'QUESTIONNAIRE')
# Count the number of completed QUESTIONNAIRE steps ('complete' action type)
# in completed interviews ('completed' state)
actions %>% filter(state == 'completed', type == 'complete') %>% count()
amber.logout(a)
}
Run the code above in your browser using DataLab