8000 Add lab abnormality KRI by samussiah · Pull Request #617 · Gilead-BioStats/gsm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add lab abnormality KRI #617

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

Merged
merged 38 commits into from
Aug 5, 2022
Merged

Add lab abnormality KRI #617

merged 38 commits into from
Aug 5, 2022

Conversation

samussiah
Copy link
Contributor

Overview

Adds a lab abnormality KRI that models the number of abnormal lab results out of the total number of lab results.

Test Notes/Sample Code

output <- LB_Map_Raw() %>% LB_Assess()

# stratified by lab category
output_stratified <- MakeAssessmentList() %>%
    pluck('lbCategory') %>%
    MakeStratifiedAssessment(
        yaml::read_yaml(system.file('mappings', 'mapping_rawplus.yaml', package = 'gsm')),
        list(dfSUBJ = clindata::rawplus_subj, dfLB = clindata::rawplus_lb)
    ) %>%
    map(~.x %>%
        RunAssessment(
            list(dfSUBJ = clindata::rawplus_subj, dfLB = clindata::rawplus_lb),
            system.file('mappings', 'mapping_rawplus.yaml', package = 'gsm')
        )
    )

Notes:
The stratified assessment is bombing somewhere, but the standalone is good to go. It'd be useful to directly visualize the rate of abnormal labs - perhaps the standard KRI viz will handle this use case - but the KRI is the count, not the proportion. It's also be nice to flag on that proportion (>5% abnormal labs for instance)...

Copy link
Contributor
@mattroumaya mattroumaya left a comment

Choose a reason for hiding this comment

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

@samussiah - Haven't pulled this to review in more detail, but at first glance it looks like there are some .rda files in here. Did they sneak in from clindata or are they needed for labs?

@samussiah
Copy link
Contributor Author

@mattroumaya yeah, I attached the mappings as R data to avoid typing yaml::read_yaml(system.file('mappings', 'mapping_rawplus.yaml', package = 'gsm')) all the time.

@mattroumaya
Copy link
Contributor

Ahhh cool! Got it.

Copy link
Contributor
@mattroumaya mattroumaya left a comment

Choose a reason for hiding this comment

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

Looks great @samussiah!

Left some comments/suggestions, mostly just for passing all possible grouping columns in mapping, and adding the ability to group in assess.

@mattroumaya
Copy link
Contributor

Forgot to mention that clindata was released with rawplus_lb updates - feel free to update to v0.6.2 in workflows.

samussiah and others added 12 commits July 26, 2022 18:56
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
Co-authored-by: Matt Roumaya <40671730+mattroumaya@users.noreply.github.com>
@mattroumaya
Copy link
Contributor

@samussiah - note to add Analyze_Identity() to the assess function

@samussiah samussiah requested a review from mattroumaya August 5, 2022 17:11
Copy link
Contributor
@mattroumaya mattroumaya left a comment

Choose a reason for hiding this comment

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

Awesome - great work @samussiah!

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.

2 participants
0