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

Feature: MakeStudyInfo() #1790

Closed
jonthegeek opened this issue Aug 19, 2024 · 3 comments · Fixed by #1791
Closed

Feature: MakeStudyInfo() #1790

jonthegeek opened this issue Aug 19, 2024 · 3 comments · Fixed by #1791

Comments

@jonthegeek
Copy link
Contributor

Feature Details

Add a function that takes the same input as Report_StudyInfo(), and returns a df with Description + Value, like the one produced as study_status_table in Report_StudyInfo()

Example Code

Possible Implementation

Additional Comments

I want to use this for the Site Metadata module in {gsm.app}. In general I think we'll probably want to split up functions for prepping the data, building a pretty table, and printing that table in a report.

@jwildfire
Copy link
Contributor

jwildfire commented Aug 19, 2024

I think I'd make a util-MakeParamLabels function that adds a label col to dfGroups. It can take dfGroups and lLabels (formatted as param:label) as inputs and then autoformat any param (SiteCount -> "Site Count", etc) that aren't in lLabels.

@jwildfire
Copy link
Contributor

jwildfire commented Aug 19, 2024

Probably call the new MakeParamLabels after this and to add dfGroups$Label to the reporting data model:

- name: bind_rows
output: Reporting_Groups
params:
SiteCounts: Temp_SiteCounts
StudyCounts: Temp_StudyCounts
CountryCounts: Temp_CountryCounts
Site: Temp_CTMSSite
Study: Temp_CTMSStudy

@jonthegeek
Copy link
Contributor Author

After Teams discussion: MakeParamLabels() will take dfGroups and (optionally) lParamLabels, and return dfGroups with an added Label column (using a heuristic for any params that aren't provided in lParamLabels). Anything downstream that uses dfGroups should display Label instead of Param (but we don't have to fix every instance of that for this issue to be complete).

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 a pull request may close this issue.

2 participants