-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
) | ||
|
||
# Exclusion steps ----- | ||
exclusions <- gld_purchases |> |
There was a problem hiding this comment.
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?
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() | ||
} |
There was a problem hiding this comment.
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.
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.