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

extract metadata without calculating all data #444

Merged
merged 1 commit into from
Nov 7, 2024
Merged

Conversation

M-Kusumgar
Copy link
Contributor

No description provided.

Copy link
Contributor

@r-ash r-ash left a comment

Choose a reason for hiding this comment

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

Looks good on first glance, though have to admit I find get_art_metadata a little confusing. Might make more sense with a bit of a closer look!

Would be good to see @rtesra thoughts too as we want to keep maintenance possible for her.

Comment on lines +24 to +28
cols_list <- c("anc_clients", "anc_known_pos", "anc_already_art",
"anc_tested", "anc_tested_pos", "anc_known_neg", "births_facility")
cols_keep <- intersect(cols_list, colnames(anc))
plot_types <- c(cols_keep, "anc_total_pos", "anc_status", "anc_prevalence",
"anc_art_among_known", "anc_art_coverage", "births_clients_ratio")
Copy link
Contributor

Choose a reason for hiding this comment

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

So cols_list are the full list of potential indicators in the uploaded data?

Then cols_keep gives us which ones are actually in the data

And plot_types is those and any properties derived from these?

What happens if say we don't have births_facility in the uploaded data. Then we cannot calculate births_clients_ratio? Does that matter that we're returning it in the metadata, or will this not happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep pretty much but plot_types doesnt necessarily have to include cols_keep like for example in the art metadata, from the code it seemed like there were no if statements to check births_facility and it was assumed so i just replicated that

Copy link
Contributor

Choose a reason for hiding this comment

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

Great ok, that all sounds fine! We probably have a validation check somewhere.

@M-Kusumgar M-Kusumgar requested a review from r-ash November 6, 2024 13:37
@r-ash r-ash merged commit 8e9f06b into master Nov 7, 2024
7 of 8 checks passed
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