insightsengineering / insightsengineering/osprey
enhance g_patient_profile
- Dominant language
- R
- Stars
- 5
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Feature description
Hi Osprey team,
My name is Imanol Zubizarreta and I was previously working in the NEST SME team. I am now trying the different set of toolkits that insightsengineering is providing by applying them to our data.
I saw the following issue in the `g_patient_profile` function while I was trying the `tm_g_patient_profile ` module, which I believe it is easy to implement and the function/module would be significantly improved.
Currently the user does not have any option to decide on the marker color in ADAE as this is hardcoded as `marker_col = factor(ae$data$AETOXGR)` in `g_patient_profile()`. I was wondering whether we could enhance this function so that the user can use another variable such as ASEV (just by making `marker_col` user input dependant as in`line_col_list`), where we can color the markers based on severity mild/moderate/severe? By default, it could be `AETOXGR` and `line_col_opt = c("1" = "green", "2" = "blue", "3" = "yellow", "4" = "orange", "5" = "red")`, but the user could potentially select other value for `marker_col `and `line_col_opt` within `marker_col_list`.
This would also require a change in the module (teal.osprey) as `ATOXGRADE` would not be a required variable anymore. The module has a hardcoding part to state the mandatory ADAE variables.
BTW, I feel this module is a great one and can be used widely across the industry!
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct.
### Contribution Guidelines
- [X] I agree to follow this project's Contribution Guidelines.
### Security Policy
- [X] I agree to follow this project's Security Policy.
Contributor guide
Assessment
This issue has not been assessed yet.