-
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
docs: ✨ initial draft of functions to classify diabetes type #75
Merged
lwjohnst86
merged 48 commits into
main
from
docs/functionality-flow-classify-diabetes-type
Jun 14, 2024
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
b3d5f6d
docs: :sparkles: initial draft of diabetes type functionality flow
signekb 328516b
fix: :fire: remove old figure experiments
signekb 6f7b6c2
style: remove unnecessary "and" and commas from figure
signekb 8dc6ae1
docs: update output of OSDC to include two inclusion dates (stable an…
signekb af93e94
fix: add oxford comma to header
signekb ef92306
fix: describe classifying steps as "filters" with "criteria"
signekb 18951d7
docs: minor text fixes (add link and "the")
signekb 9f45a1f
fix: update classify diabetes type flow chart based on feedback from …
signekb 332f421
fix: specify that we use the primary diagnosis for classification
signekb b157b5a
fix: minor text edit to make sentence clearer
signekb 6e9ddaa
docs: add description of example output table
signekb 3084d2c
fix: add missing header in output example table
signekb 175fa3d
style: :lipstick: format
signekb a3655b1
Merge branch 'docs/functionality-flow-diabetes-population' into docs/…
signekb f6bebfe
style:
signekb 80fc885
Merge branch 'docs/functionality-flow-diabetes-population' into docs/…
signekb 12fd1d1
docs: elaborate on hierarchy of diagnoses from endocrinological and m…
signekb 33d764e
Merge branch 'docs/functionality-flow-diabetes-population' into docs/…
signekb 6078cc7
Apply suggestions from code review
signekb 57115bf
Merged origin/main into docs/functionality-flow-classify-diabetes-type
lwjohnst86 dadf568
Merge branch 'docs/functionality-flow-diabetes-population' of https:/…
lwjohnst86 f2f29fa
Merge branch 'docs/functionality-flow-diabetes-population' of https:/…
lwjohnst86 4295251
Apply suggestions from code review
signekb 48c69bf
Merge branch 'main' into docs/functionality-flow-classify-diabetes-type
signekb b978ce6
docs: :fire: remove `_status` from `classify_diabetes_status()`
signekb 688fd64
docs: :fire: remove mentions of "components"
signekb b6205d9
Update vignettes/function-flow.Rmd
signekb 56dda95
Merge branch 'main' into docs/functionality-flow-classify-diabetes-type
signekb 81b2561
docs: :memo: add register abbreviations based on `variable_description`
signekb 80d3eab
docs: :fire: remove details about filter 1
signekb a0f7151
docs: :memo: align links to other vignettes
signekb 616e105
feat: add classification to function-flow
signekb 1ed60d1
feat: add function that join inclusion events
signekb ff87125
style: :art: refactor arrows and add comments to create a clearer str…
signekb 7c77923
feat: update structure (arrows and together) to correct arrows and la…
signekb 0266cee
style: :art: add black font to card and rectangle
signekb 3dc29b7
feat: regenerate png from puml
signekb 89dfe0b
docs: add name og brand drugs Saxenda and Wegovy
signekb cced272
fix: diagnosis -> diagnoses in inclusion function
signekb 8662ce4
Merge branch 'main' into docs/functionality-flow-classify-diabetes-type
signekb 950641b
docs: rename wld function; add data source and brand drug names
signekb 9dacf9a
docs: rewrite of classification to omit the filter distinction
signekb 214f0e5
docs: remove backticks from osdc package
signekb a6e7287
docs: :sparkles: create partial function flows while keeping the enti…
signekb f465a63
docs: add separate section for population extraction and fix header l…
signekb 8c45dbc
docs: :fire: remove old classification puml
signekb 2cf719c
Merge branch 'main' into docs/functionality-flow-classify-diabetes-type
signekb 9c5759b
docs: :pencil2: very minor edits and formatting fixes
lwjohnst86 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
@startuml function-flow-classification | ||
!theme cerulean-outline | ||
<style> | ||
action, card, database, rectangle { | ||
FontColor black | ||
} | ||
.inclusion { | ||
BackgroundColor lightblue | ||
} | ||
.exclusion { | ||
BackgroundColor orange | ||
} | ||
</style> | ||
|
||
'Diabetes type classification | ||
|
||
action "get_diagnosis_date()" as diagnosis_date | ||
|
||
rectangle Classification { | ||
action "get_has_t1d_primary_diagnosis()" as t1d_diagnosis | ||
action "get_only_insulin_purchases()" as only_insulins | ||
action "get_majority_of_t1d_primary_diagnoses()" as t1d_diagnosis_majority | ||
action "get_insulin_purchase_within_180_days()" as insulin_within_180_days | ||
action "get_insulin_is_two_thirds_of_gld_doses()" as insulin_is_two_thirds | ||
} | ||
|
||
diagnosis_date --> t1d_diagnosis | ||
t1d_diagnosis -l-> only_insulins | ||
only_insulins -d-> t1d_diagnosis_majority | ||
t1d_diagnosis_majority -r-> insulin_within_180_days | ||
insulin_within_180_days -r-> insulin_is_two_thirds | ||
|
||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
@startuml function-flow-population | ||
!theme cerulean-outline | ||
<style> | ||
action, card, database, rectangle { | ||
FontColor black | ||
} | ||
.inclusion { | ||
BackgroundColor lightblue | ||
} | ||
.exclusion { | ||
BackgroundColor orange | ||
} | ||
</style> | ||
|
||
hide <<inclusion>> stereotype | ||
hide <<exclusion>> stereotype | ||
|
||
'Diabetes population extraction | ||
together { | ||
database sssy | ||
database sysi | ||
database lpr_diag | ||
database lpr_adm | ||
database lmdb | ||
database lab_forsker | ||
database kontakter | ||
database diagnoser | ||
database bef | ||
} | ||
together { | ||
action "join_lpr2()" as lpr2 | ||
action "join_lpr3()" as lpr3 | ||
} | ||
|
||
action "get_potential_pcos()" as pcos | ||
action "get_wld_purchases()" as wld | ||
|
||
together { | ||
action "exclude_pregnancy()" as ex_pregnancy <<exclusion>> | ||
action "exclude_wld_purchases()" as ex_wld <<exclusion>> | ||
action "exclude_potential_pcos()" as ex_pcos <<exclusion>> | ||
} | ||
together { | ||
action "include_diabetes_diagnoses()" as in_diagnoses <<inclusion>> | ||
action "include_hba1c()" as in_hba1c <<inclusion>> | ||
action "include_podiatrist_services()" as in_podiatrist <<inclusion>> | ||
action "include_gld_purchases()" as in_gld <<inclusion>> | ||
action "get_pregnancy_dates()" as pregnancy | ||
} | ||
|
||
action "join_inclusion()" as join_inclusion | ||
action "get_diagnosis_date()" as diagnosis_date | ||
|
||
'join lpr | ||
lpr_diag --> lpr2 | ||
lpr_adm --> lpr2 | ||
kontakter --> lpr3 | ||
diagnoser --> lpr3 | ||
|
||
'inclusion: podiatrist services | ||
sssy --> in_podiatrist | ||
sysi --> in_podiatrist | ||
in_podiatrist --> join_inclusion | ||
|
||
'inclusion: hba1c | ||
lab_forsker --> in_hba1c | ||
in_hba1c --> ex_pregnancy | ||
ex_pregnancy --> join_inclusion | ||
|
||
'inclusion: gld purchases | ||
lmdb --> in_gld | ||
in_gld --> ex_pcos | ||
ex_pcos --> ex_wld | ||
ex_wld --> ex_pregnancy | ||
|
||
'inclusion: diabetes diagnoses | ||
lpr2 --> in_diagnoses | ||
lpr3 --> in_diagnoses | ||
in_diagnoses --> join_inclusion | ||
|
||
'helper functions | ||
lpr2 --> pregnancy | ||
lpr3 --> pregnancy | ||
pregnancy --> ex_pregnancy | ||
lmdb --> wld | ||
wld --> ex_wld | ||
bef --> pcos | ||
in_gld --> ex_pcos | ||
pcos --> ex_pcos | ||
join_inclusion --> diagnosis_date | ||
|
||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure why we should include this in the final output. If the data coverage isn't sufficient, we shouldn't give that to users so that they make their own choice without understanding the context. We give them the context with the given assumptions and limitations of this algorithm.
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.
@Aastedet ? :)
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.
@lwjohnst86 At the Steering Group meeting we decided to provide both, but the "stable_inclusion" being the clear default, while we are explicit to the user that the "raw_inclusion" is experimental/use-at-own-risk.
I'm not sure if that guides us towards an answer here though. Depending on the study design, the user might have a clear need for the "raw_inclusion" date.
I lean towards including both, but naming them to "inclusion_date" and something like "unstable_date" or "_date" to make it clear which is the default (and also obscuring the non-default variable name so users will have to read the documentation to know what the variable is).
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.
Hmmm, what about
initial_inclusion_date
andinclusion_date
? Just wondering how easily a user might interpret "unstable".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.
I'm not sure about "initial". It sounds like it's something that's before something else? Like e.g., the first inclusion event.
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
inclusion_date
andinclusion_date_with_insufficient_data
?