-
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.
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.
The function outputs and helper functions currently described in #133 need a bit of aligning to match what ends up being implemented in this script (right now I've added another helper function, get_type_diagnosis_majority(), but that one only relates to hospital diagnoses, not GLD, so it should be fine for this PR). There will probably be some back-and-forth between the function flow docs and this script as we go along.
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.
Nice! I really like the overview this provides 👍 🌟
# lmdb = lmdb | ||
# ) | ||
|
||
included_hba1c <- include_hba1c( |
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.
included_hba1c <- include_hba1c( | |
hba1c_over_threshold <- include_hba1c( |
Or something to be more like the other inclusion step variable names (i.e., not start with an "included").
verify_required_variables(sysi, "sysi") | ||
verify_required_variables(sssy, "sssy") |
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.
Oh, I've included this in include_podiatrist_services()
too. Should it only be here?
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.