Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ability to get survey URL #293

Closed
Stephonomon opened this issue Jan 25, 2020 · 2 comments
Closed

Adding ability to get survey URL #293

Stephonomon opened this issue Jan 25, 2020 · 2 comments
Assignees

Comments

@Stephonomon
Copy link

Describe the behavior
Is it possible to write a function that allows the requester to return the survey url for the record?

@wibeasley wibeasley self-assigned this Jan 25, 2020
@wibeasley
Copy link
Member

@Stephonomon I'm about to push an untested version called redcap_survey_link_export_oneshot(). It's in the dev branch.

Will you give it a shot and tell me if it does what you want?

# Install the dev branch
remotes::install_github(repo="OuhscBbmc/REDCapR", ref="dev")

Here's an example from the documentation

uri     <- "https://bbmc.ouhsc.edu/redcap/api/"
token   <- "8FA9A6BDAE2C0B5DD3CB472DD8E8918C" #pid=817
record  <- 1
instrument   <- "participant_morale_questionnaire"
result <- REDCapR::redcap_survey_link_export_oneshot(
  record         = record,
  instrument     = instrument,
  redcap_uri     = uri,
  token          = token
)
## Preparing to export the survey link for the instrument `participant_morale_questionnaire`.
## exported the survey link in 0.6 seconds, for instrument `participant_morale_questionnaire`, record `1`.
result$survey_link
## "https://bbmc.ouhsc.edu/redcap/surveys/?s=8KuzSLMHf6"

wibeasley added a commit that referenced this issue Jan 26, 2020
@Stephonomon
Copy link
Author

Stephonomon commented Feb 2, 2020 via email

wibeasley added a commit that referenced this issue Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants