insightsengineering / osprey

Community effort to collect TLG code and create a catalogue
https://insightsengineering.github.io/osprey/
Other
4 stars 1 forks source link

enhance g_patient_profile #105

Open imazubi opened 2 years ago

imazubi commented 2 years ago

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 inline_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_coland 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

Contribution Guidelines

Security Policy

donyunardi commented 2 years ago

Thanks for the suggestion @imazubi . @lcd2yyz can I hear your thought on this?

lcd2yyz commented 1 year ago

Thanks @imazubi for your feedback. Your suggested changes would indeed make the function and modules more robust and flexible to the app users. In the spirit of open-source development mindset and encouraging collaboration, would you be interested in implementing the suggested solution yourself via a PR? This can be a great example of community-based contribution we are aiming to expand on. Feel free to reach out to us via Slack pharmaverse.slack.com via #teal channel in case you have questions or wanting to discuss any details.