-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Enable the Shiny app to accept URL parameters (e.g., ?codelist=opensafely/anxiety-disorders/6aef605a) to automatically load codelists when the app starts, improving integration with OpenCodelists.org and user experience.
Currently, users must manually copy-paste codelist slugs into the app. Direct linking from http://opencodelists.org/ would imporove the workflow and make the tool more accessible for researchers exploring code usage patterns of codelists.
Proposed Implementation
- URL parameter parsing: Use parseQueryString() to extract codelist parameter from URL
- Automatic text input population: Update codelist_slug text input using updateTextInput()
- Programmatic button trigger: Automatically trigger the "Load codelist" action button
Technical approach
- Parse URL parameters in
server.Rusingsession$clientData$url_search - Check for codelist parameter on app initialisation
- If present, populate the text input and simulate button click
- Handle error cases gracefully (invalid codelist slugs, network issues)
Future enhancements
- Support multiple parameters (dataset, date_range)
- Validation of codelist compatibility with selected dataset
Acceptance Criteria
- App accepts
?codelist=URL parameter - Codelist automatically loads on app startup when parameter present
- Error handling for invalid codelist slugs
- Maintains existing functionality when no parameters provided
- Documentation updated with URL parameter usage examples
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels