Skip to content

Conversation

@jwildfire
Copy link
Contributor

@jwildfire jwildfire commented Feb 2, 2023

Overview

This PR adds a new tab that shows the safetyProfile shiny module as a tab in the safetyGraphics app whenever the safetyProfile package is loaded. New functionality includes:

  • See participant details in the new "profile" tab
  • See the currently selected participant in a new label on the right side of the safetyGraphics application header.
  • Clicking the label opens the profile tab.
  • Use the dropdown in the profile tab to change the selected participant
  • Select a participant in a chart to change the selected participant

Note that this update depends on updates to the safetyCharts package that are currently in the dev branch (to be released in v0.4)

Test Code

Checkout this branch and the latest build of safety profile and run:

remotes::install_github("safetyGraphics/safetyCharts@dev")
remotes::install_github("safetyGraphics/safetyProfile@dev")
devtools::install('safetyGraphics')

library(safetyCharts)
library(safetyProfile)
library(safetyGraphics)
safetyGraphicsApp()

Test that patProfile is optional:

unloadNamespace('safetyProfile')
safetyGraphicsApp() #profile tab should be hidden
library(safetyProfile)
safetyGraphicsApp() #profile tab should be shown

@jwildfire jwildfire self-assigned this Feb 2, 2023
@jwildfire jwildfire marked this pull request as draft February 2, 2023 16:42
@jwildfire
Copy link
Contributor Author

Next steps:

  • Add header with selected participant ID
  • Trial integration with a chart

@jwildfire
Copy link
Contributor Author

Last step will be to link patProfile to the charts after SafetyGraphics/safetyCharts#125 is ready.

@samussiah
Copy link
Contributor

per @jwildfire - make patient profile an optional plugin?

add chart event listeners and refactor widgets
@jwildfire jwildfire requested a review from samussiah March 8, 2023 15:36
@jwildfire jwildfire linked an issue Mar 8, 2023 that may be closed by this pull request
@jwildfire
Copy link
Contributor Author

jwildfire commented Mar 8, 2023

Added some code to make make the patient profile optional. Tab is shown when safetyProfile package is loaded and hidden otherwise. See test code in PR comments.

@jwildfire jwildfire marked this pull request as ready for review March 9, 2023 15:25
@jwildfire
Copy link
Contributor Author

@samussiah I think this one is good to merge if you want to mark as approved and merge in dev. LMK if there are any interesting conflicts that I can help with.

Copy link
Contributor

@samussiah samussiah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugging this in so easily is a testament to modular design. Love it!

@samussiah samussiah merged commit b34bca0 into dev Mar 15, 2023
@samussiah samussiah deleted the fix-701 branch March 15, 2023 16:33
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

Successfully merging this pull request may close these issues.

Add optional integration of safetyProfile

3 participants