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

docs: 📝 moved logic into algorithm.csv #190

Open
wants to merge 4 commits into
base: docs/design-into-algorithm-and-pseudocode
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data-raw/algorithm.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ lpr_diag,lpr2,Relevant LPR2 diagnoses codes,c_diag =~ '^(DO0[0-6]|DO8[0-4]|DZ3[3
lpr_diag,lpr2_has_t1d,LPR2 diagnoses codes for T1D,c_diag =~ '^(DE10|249)',
lpr_diag,lpr2_has_t2d,LPR2 diagnoses codes for T2D,c_diag =~ '^(DE11|250)',
lpr_diag,lpr2_has_pregnancy_event,LPR2 diagnoses codes for pregnancy-related outcomes,c_diag =~ '^(DO0[0-6]|DO8[0-4]|DZ3[37])',These are recorded pregnancy endings like live births and miscarriages.
lpr_adm,lpr2_is_endocrinology_department,LPR2 endocrinology department,"na_if(c_spec, !(c_spec %in% 8:30)) == 8","True is when the department is endocrinology, false is when it is other medical departments, and missing is all other cases."
kontakter,lpr3_is_endocrinology_department,LPR3 endocrinology department,"na_if(hovedspeciale_ans, !(hovedspeciale_ans %in% c('medicinsk endokrinologi', 'blandet medicin og kirurgi', 'intern medicin', 'geriatri', 'hepatologi', 'hæmatologi', 'infektionsmedicin', 'kardiologi', 'medicinsk allergologi', 'medicinsk gastroenterologi', 'medicinsk lungesygdomme', 'nefrologi', 'reumatologi', 'palliativ medicin', 'akut medicin', 'dermato-venerologi', 'neurologi', 'onkologi', 'fysiurgi', 'tropemedicin'))) == 'medicinsk endokrinologi'","True is when the department is endocrinology, false is when it is other medical departments, and missing is all other cases."
lpr_adm,lpr2_is_endocrinology_department,LPR2 endocrinology department,"na_if(c_spec, !(c_spec %in% 8:30)) == 8",`TRUE` when the department is endocrinology,`FALSE` when it is other medical departments, and missing is all other cases.
lwjohnst86 marked this conversation as resolved.
Show resolved Hide resolved
kontakter,lpr3_is_endocrinology_department,LPR3 endocrinology department,"na_if(hovedspeciale_ans, !(hovedspeciale_ans %in% c('medicinsk endokrinologi', 'blandet medicin og kirurgi', 'intern medicin', 'geriatri', 'hepatologi', 'hæmatologi', 'infektionsmedicin', 'kardiologi', 'medicinsk allergologi', 'medicinsk gastroenterologi', 'medicinsk lungesygdomme', 'nefrologi', 'reumatologi', 'palliativ medicin', 'akut medicin', 'dermato-venerologi', 'neurologi', 'onkologi', 'fysiurgi', 'tropemedicin'))) == 'medicinsk endokrinologi'",`TRUE` when the department is endocrinology, `FALSE` when it is other medical departments, and missing in all other cases.
lwjohnst86 marked this conversation as resolved.
Show resolved Hide resolved
diagnoser,lpr3,Relevant LPR3 diagnoses codes,diagnosekode =~ '^(DO0[0-6]|DO8[0-4]|DZ3[37]|DE1[0-4])' AND (diagnosetype == 'A' OR diagnosetype == 'B') AND (senere_afkraeftet == "Nej"),'A' `diagnosekode` means primary diagnosis and `senere_afkraeftet` means diagnosis was later retracted.
diagnoser,lpr3_has_t1d,LPR3 diagnoses codes for T1D,diagnosekode =~ '^(DE10)',
diagnoser,lpr3_has_t2d,LPR3 diagnoses codes for T2D,diagnosekode =~ '^(DE11)',
Expand Down