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

feat: 🚧 skeleton of the core diabetes classification #142

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lwjohnst86
Copy link
Member

Closes #141.

This will form the basis of slowly building up this function. So as we add more inclusion/exclusion functions, we uncomment from here. And at the same time, the general logic of what is needed and what goes into what, as well as the argument names of the functions, can be seen from this function.

@Aastedet I know you had some things you mentioned that needed updating from the diagram, so maybe this function can help clarify that.

)

# Exclusion steps -----
exclusions <- gld_purchases |>
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe name the output gld_hba1c_after_exclusions or something similar?

Comment on lines +98 to +105
classify_t1d <- function(data) {
# data |>
# get_has_t1d_primary_diagnosis() |>
# get_only_insulin_purchases() |>
# get_majority_of_t1d_primary_diagnosis() |>
# get_insulin_purchases_within_180_days() |>
# get_insulin_is_two_thirds_of_gld_purchases()
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it is still present in the classify_diabetes() function environment, then adding the gld_hba1c_after_exclusions object as an input to get_insulin_purchases_within_180_days() would allow us to reuse the post-exclusion GLD data to assess insulin purchases in relation to the date of diabetes variable. This could be a way to solve what we discussed earlier today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

Make skeleton of main functions
2 participants