diff --git a/articles/changes.html b/articles/changes.html index 8fc172c..2e0db60 100644 --- a/articles/changes.html +++ b/articles/changes.html @@ -97,6 +97,14 @@

Version 1.1 +

Version 1.2 +

+
    +
  1. No longer uses any GLP1-RAs for inclusion or +type-specification.
  2. +
+

Validity @@ -153,28 +161,28 @@

On pre-2019 data (as in the paper) -1.1 +1.2 T1D -0.943 -0.789 +0.944 +0.783 -1.1 +1.2 T1D >40 yrs -0.871 -0.871 +0.708 +0.378 -1.1 +1.2 T2D -0.883 -0.941 +0.879 +0.944 -1.1 +1.2 T2D <40 yrs -0.519 -0.857 +0.480 +0.863 @@ -218,19 +226,19 @@

On pre-2019 data (as in the paper) -1.1 +1.2 T1D -0.781 +0.788 0.999 -0.949 +0.947 0.997 -1.1 +1.2 T2D -0.943 -0.989 -0.879 +0.940 +0.990 +0.881 0.995 diff --git a/pkgdown.yml b/pkgdown.yml index a45b69b..d71c61e 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -8,7 +8,7 @@ articles: function-flow: function-flow.html osdc: osdc.html rationale: rationale.html -last_built: 2024-09-19T13:27Z +last_built: 2024-09-20T11:46Z urls: reference: https://steno-aarhus.github.io/osdc/reference article: https://steno-aarhus.github.io/osdc/articles diff --git a/search.json b/search.json index 6eedfff..8d99afc 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement lwjohnst@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://steno-aarhus.github.io/osdc/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022-2023 Steno Diabetes Center Aarhus Aarhus University Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"version-1-1","dir":"Articles","previous_headings":"Specific changes since the original validation (version from the paper)","what":"Version 1.1","title":"Changes to algorithm","text":"don’t use purchases semaglutid, dapagliflozin empagliflozin, neither inclusion events classification diabetes type (due increasing use treatment non-diabetes). longer use diabetes type reclassification based insulin purchases previous year. logic defining pregnancy index dates simplified use diagnoses pregnancy endings (longer uses data maternal care visits). De-duplicates subsequent HbA1c samples taken date (originally, sampling time available lab data, samples taken time de-duplicated)","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"validity","dir":"Articles","previous_headings":"","what":"Validity","title":"Changes to algorithm","text":"Algorithm validity across versions. Reports PPV (positive predictive value) sensitivity typical cases cases atypical age onset T1D (age 40) T2D (age 40), respectively.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"on-pre-2019-data-as-in-the-paper","dir":"Articles","previous_headings":"Validity","what":"On pre-2019 data (as in the paper)","title":"Changes to algorithm","text":"Overall age onset-stratified (paper table 1 & 2): Bootstrapped metrics (paper S3):","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"potential-future-changes","dir":"Articles","previous_headings":"","what":"Potential future changes","title":"Changes to algorithm","text":"Add support using medical birth register define pregnancies censor gestational diabetes (GDM). allow censoring glucose-lowering drug (GLD) purchases way back 1995 (rather 1997 onward, obstetric codes limited ), enable extension window valid dates diagnosis 1996 onward. Limit historic scope primary diagnoses used evaluate majority diabetes-specific diagnoses type classification (e.g. evaluate majority among last five type-specific diabetes diagnoses).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"expected-data-structure","dir":"Articles","previous_headings":"","what":"Expected data structure","title":"Data sources","text":"section describes data sources expected look like input OSDC algorithm. try mimic much possible raw data looks like within Denmark Statistics. since registers often stored per year basis, don’t expect year variable data . ’ve processed data year variable, likely need split-apply-combine approach using osdc package. internally convert variable names lower case, present lower case, case may vary data sources (even years data source) real data. small note National Patient Register. contains several tables types data. algorithm uses hospital diagnosis data contained four registers, pair two related registers used (LPR2) (LPR3) 2019. LPR2 LPR3 equivalents lpr_adm kontakter lpr_diag diagnoser. variables equivalents well, except c_spec LPR2 equivalent hovedspeciale_ans LPR3, specialty values hovedspeciale_ans coded literal specialty names different padded integer codes c_spec contains. Statistics Denmark, tables provided mix separate files calendar year prior 2019 (LPR2 format) single file containing data 2019 onward (LPR3 format). two tables can joined either recnum variable (LPR2 data) dw_ek_kontakt variable (LPR3 data).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"bef-cpr-registerets-befolkningstabel","dir":"Articles","previous_headings":"Expected data structure","what":"bef: CPR-registerets befolkningstabel","title":"Data sources","text":"Variables descriptions within bef register. Simulated example data looks like bef register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lmdb-laegemiddelstatistikregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"lmdb: Laegemiddelstatistikregisteret","title":"Data sources","text":"Variables descriptions within lmdb register. Simulated example data looks like lmdb register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lpr_adm-landspatientregisterets-administrationstabel-lpr2","dir":"Articles","previous_headings":"Expected data structure","what":"lpr_adm: Landspatientregisterets administrationstabel (LPR2)","title":"Data sources","text":"Variables descriptions within lpr_adm register. Simulated example data looks like lpr_adm register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lpr_diag-landspatientregisterets-diagnosetabel-lpr2","dir":"Articles","previous_headings":"Expected data structure","what":"lpr_diag: Landspatientregisterets diagnosetabel (LPR2)","title":"Data sources","text":"Variables descriptions within lpr_diag register. Simulated example data looks like lpr_diag register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"kontakter-landspatientregisterets-kontakttabel-lpr3","dir":"Articles","previous_headings":"Expected data structure","what":"kontakter: Landspatientregisterets kontakttabel (LPR3)","title":"Data sources","text":"Variables descriptions within kontakter register. Simulated example data looks like kontakter register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"diagnoser-landspatientregisterets-diagnosetabel-lpr3","dir":"Articles","previous_headings":"Expected data structure","what":"diagnoser: Landspatientregisterets diagnosetabel (LPR3)","title":"Data sources","text":"Variables descriptions within diagnoser register. Simulated example data looks like diagnoser register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"sysi-sygesikringsregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"sysi: Sygesikringsregisteret","title":"Data sources","text":"Variables descriptions within sysi register. Simulated example data looks like sysi register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"sssy-sygesikringsregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"sssy: Sygesikringsregisteret","title":"Data sources","text":"Variables descriptions within sssy register. Simulated example data looks like sssy register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lab_forsker-laboratoriedatabasens-forskertabel","dir":"Articles","previous_headings":"Expected data structure","what":"lab_forsker: Laboratoriedatabasens forskertabel","title":"Data sources","text":"Variables descriptions within lab_forsker register. Simulated example data looks like lab_forsker register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"getting-access-to-data","dir":"Articles","previous_headings":"","what":"Getting access to data","title":"Data sources","text":"data available Statistics Denmark Danish Health Data Authority. Researchers must affiliated approved research institute Denmark fees apply. Information gain access data can found https://www.dst.dk/en/TilSalg/Forskningsservice.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"principles","dir":"Articles","previous_headings":"","what":"Principles","title":"Design","text":"guiding principles package: Functionality agnostic data format possible (e.g. can used SQL Arrow connections, data.table format, data.frame). Functions consistent inputs outputs (e.g. inputs outputs , regardless specific conditions). Functions predictable outputs based inputs (e.g. input data frame, output data frame). Functions consistent naming based action. Functions limited additional arguments. Casing input variables (upper lower case) agnostic, internal variables lower case, output variables lower case.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"use-cases","dir":"Articles","previous_headings":"","what":"Use cases","title":"Design","text":"make assumptions package used, based experiences expectations use cases: Entirely used within Denmark Statistics Danish Health Authority’s servers, since data kept. Used researchers within affiliated Danish research institutions. Used specifically within Danish register-based context. set “narratives” “personas” associated needs package aims fulfill: “… want determine registers variables request Denmark Statistics Danish Health Data Authority, certain able classify diabetes status individuals registers.” “… want easily simply create dataset contains data diabetes status population, can begin conducting research involves persons diabetes without tinker coding correct algorithm classify .” “… want informed early clear way whether data fits required data type values, can fix correct issues without extensive debugging code /data.”","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"core-functionality","dir":"Articles","previous_headings":"","what":"Core functionality","title":"Design","text":"list functionality aim osdc package Classify individuals type 1 type 2 diabetes status create data frame information date onset diabetes. Provide helper functions check process individual registers variables required enter classifier. Provide list required variables registers order calculate diabetes status. Provide validation helper functions check variables match expected algorithm. Provide common easily accessible standard determining diabetes status within context research using Danish registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifier-algorithm","dir":"Articles","previous_headings":"","what":"Classifier algorithm","title":"Design","text":"complete description classifier found Anders Aasted Isaksen’s PhD Thesis well validation paper (1). description brief concise version documents. algorithm classifying individuals diabetes described . overall output algorithm first classify diabetes, classify check individuals might type 1 diabetes, otherwise classify type 2 diabetes. Initial diabetes classification defined second occurrence listed inclusion events. Wherever possible, available data event used, except purchases glucose-lowering drugs, since data obstetric diagnoses necessary censor glucose-lowering drug purchases complete 1997 onwards. Inclusion criteria : HbA1c measurements ≥48 mmol/mol. Hospital diagnoses diabetes. Diabetes-specific services received podiatrist. Purchase glucose-lowering drugs. Exclusions : Samples taken pregnancies, potential gestational diabetes mellitus. Brand drugs weight loss, e.g. Saxenda. Purchases pregnancies, potential treatment gestational diabetes mellitus. Metformin women age 40, treatment polycystic ovary syndrome.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifying-type-1-diabetes","dir":"Articles","previous_headings":"Classifier algorithm","what":"Classifying type 1 diabetes","title":"Design","text":"Diabetes type classified either T1D T2D based patterns purchases insulin drugs (including analogues) hospital primary diagnoses T1D T2D. Classification T1D requires individual fulfill either following criteria: Must purchased insulin drugs never type glucose-lowering drugs, least one diagnosis T1D Must majority T1D diagnoses endocrinological departments (medical departments, absence contacts endocrinological departments), purchase insulin within 180 days onset diabetes, insulin contributing least two thirds defined daily doses glucose-lowering drugs purchased. populations generated fixed index date (cross-sectional studies associated dissertation), individuals classified T1D cases must purchased insulin drugs last year prior index date.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifying-type-2-diabetes","dir":"Articles","previous_headings":"Classifier algorithm","what":"Classifying type 2 diabetes","title":"Design","text":"Individuals classified T1D cases classified T2D cases.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"data-required-from-registers","dir":"Articles","previous_headings":"","what":"Data required from registers","title":"Design","text":"following list variables required specific registers order package classify diabetes status:","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Function flow","text":"vignette describes function conventions function flow osdc package. function convention sections go name functions structure terms input output. function flow describes functions within package, internal user-facing, data sources rely , connected . First, functions classifying diabetes status presented, followed functions classifying diabetes type.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"function-conventions","dir":"Articles","previous_headings":"","what":"Function conventions","title":"Function flow","text":"conventions ideals , used guidelines help development understanding code. hard rules.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"naming","dir":"Articles","previous_headings":"Function conventions","what":"Naming","title":"Function flow","text":"First word action verb, later words objects conditions. Exclusion criteria prefixed exclude_. Inclusion criteria prefixed include_. Helpers get extract condition (e.g., “pregnancy” “date visit”) prefixed get_. Helpers drop keep specific condition prefixed drop_ keep_ (e.g., “first visit date maternal care pregnancy 40 weeks”). types helpers likely contained get_ functions. Helpers join registers output functions prefixed join_.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"input-and-output","dir":"Articles","previous_headings":"Function conventions","what":"Input and output","title":"Function flow","text":"arguments, one two core required argument. One input register database time. exclude_ functions can take register first argument take output include_ function. Second argument can output data another function.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"function-flow","dir":"Articles","previous_headings":"","what":"Function flow","title":"Function flow","text":"osdc package contains one main function classifies individuals either type 1 type 2 diabetes using Danish registers: classify_diabetes(). function classifies diabetes (type 1 2) based Danish registers described vignette(\"design\") vignette(\"data-sources\"). data sources used input function. specific inclusion exclusion details also described vignette(\"design\"). results functionality flow classifying diabetes status seen . flow can divided two sections: extracting diabetes population classifying diabetes type detail following sections. functions take data.frame type object input outputs type object input object (data.frame type). instance, input data.table object, output also data.table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"population-extraction","dir":"Articles","previous_headings":"","what":"Population extraction","title":"Function flow","text":"following sections, describe functions used extract diabetes population Danish registers. functions divided inclusion exclusion events, final diagnosis date calculated based events.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hba1c-tests-above-the-diagnosis-cut-off-value-48-mmolmol-or-6-5","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"HbA1c tests above the diagnosis cut-off value (48 mmol/mol or 6.5%)","title":"Function flow","text":"function include_hba1c() uses lab_forsker input data extract events HbA1c tests diagnosis cut-value. Since HbA1c diagnosis cut-value depends kind test used, inclusion event defined follows: HbA1c IFCC (NPU03835), include values >= 6.5 %. HbA1c DCCT (NPU27300), include values >= 48 mmol/mol. Algorithm used implementation including HbA1c.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hospital-diagnosis-of-diabetes","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"Hospital diagnosis of diabetes","title":"Function flow","text":"function include_diabetes_diagnoses() uses hospital contacts LPR2 3 include dates diabetes diagnoses. Diabetes diagnoses ICD 8 ICD 10 included. function contains two helper functions: keep_diabetes_icd10() keep_diabetes_icd8()","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"diabetes-specific-podiatrist-services","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"Diabetes-specific podiatrist services","title":"Function flow","text":"function include_podiatrist_services() uses sysi sssy input extract dates diabetes-specific podiatrist services.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"gld-purchases","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"GLD purchases","title":"Function flow","text":"function include_gld_purchases() uses lmdb extract dates GLD purchases (1997 onwards).","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hba1c-tests-and-gld-purchases-during-pregnancy","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"HbA1c tests and GLD purchases during pregnancy","title":"Function flow","text":"function exclude_pregnancy() uses diagnoses LPR2 LPR3 input used exclude HbA1c tests GLD purchases pregnancy. Internally, relies function get_pregnancy_dates() contains following three helper functions: calculate_pregnancy_index_date_for_mc_visits_wo_end_date() (might removed inclusion birth register) get_pregnancy_end_dates(): Keep maternal care visits end date drop visits 40 weeks end date 12 weeks end date. get_maternal_care_visit_dates_without_end_date(): Uses output get_pregnancy_end_dates() identifies maternal care visits end dates derive maternal care visits without end dates. .","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"glucose-lowering-brand-drugs-for-weight-loss","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"Glucose-lowering brand drugs for weight loss","title":"Function flow","text":"function exclude_wld_purchases() uses lmdb input excludes brand drugs Saxenda Wegovy.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"metformin-purchases-for-women-below-age-40","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"Metformin purchases for women below age 40","title":"Function flow","text":"function exclude_potential_pcos() input exclude purchases metformin women age 40 (.e., <= 39 years old) date purchase. relies bef input. function contains two helper functions: keep_women() drop_age_40_below()","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"get-diagnosis-date","dir":"Articles","previous_headings":"Population extraction","what":"Get diagnosis date","title":"Function flow","text":"function get_diagnosis_date() combines outputs inclusion exclusion functions get final diagnosis date. Initially, drops first inclusion exclusion events function outputs helper drop_first_event(), two events kept. used assign initial diagnosis according OSDC. , outputs joined together join_diagnosis_dates(). Finally, dates outside data coverage period dropped drop_diagnosis_dates_outside_coverage() end final diagnosis date. details censoring based periods insufficient data coverage, see vignette(\"design\").","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"classifying-the-diabetes-type","dir":"Articles","previous_headings":"Population extraction","what":"Classifying the diabetes type","title":"Function flow","text":"next step OSDC algorithm classifies individuals extracted diabetes population either T1D T2D. described vignette(\"design\"), individuals classified T1D cases classified T2D cases. output data.frame includes one row per individual diabetes population: one column PNR, two columns inclusion dates (one “stable” date one “raw” date - see vignette(\"design\") elaboration entails), one column diabetes type.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"type-1-classification","dir":"Articles","previous_headings":"Population extraction > Classifying the diabetes type","what":"Type 1 classification","title":"Function flow","text":"details classification type 1 diabetes described vignette(\"design\"). classify whether individual T1D, OSDC algorithm includes following criteria: get_t1d_primary_diagnosis(), relies hospital diagnoses extracted lpr_diag (LPR2) diagnoser (LPR3) previous steps. get_only_insulin_purchases() relies GLD purchases Lægemiddelsdatabasen get patients GLD purchases insulin . get_majority_of_t1d_diagnoses() (compared T2D diagnoses) relies primary hospital diagnoses LPR. get_insulin_purchase_within_180_days() relies diagnosis LPR GLD purchases Lægemiddelsdatabasen. get_insulin_is_two_thirds_of_gld_doses relies GLD purchases Lægemiddelsdatabasen. Note following hierarchy first function : First, function checks whether individual primary diagnoses endocrinological specialty. ’s case given person, check whether majority T1D primary diagnoses based data endocrinological specialty. ’s case, check based primary diagnoses medical specialties.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"type-2-classification","dir":"Articles","previous_headings":"Population extraction > Classifying the diabetes type","what":"Type 2 classification","title":"Function flow","text":"described vignette(\"design\"), individuals classified type 1 cases classified type 2 cases.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"output","dir":"Articles","previous_headings":"","what":"Output","title":"Function flow","text":"output OSDC algorithm data.frame includes four columns: PNR: pseudonymised social security number individuals diabetes population (one row per individual) stable_inclusion_date: stable inclusion date (.e., raw date mutated individuals included time-period data coverage sufficient make incident cases reliable)1 raw_inclusion_date: raw inclusion date (.e., date second inclusion event described Extracting diabetes population section ) diabetes_type classified diabetes type example, see . Example rows data.frame output osdc package. individuals 0000000001 0000000004 classified diabetes (T1D T2D, respectively). 0000000004 classified type 1 diabetes (T1D) inclusion date 2020-01-01. Since date within time-period sufficient data coverage, column stable_inclusion_date populated date raw_inclusion_date. individual second row, 0000000004 classified type 2 diabetes T2D inclusion date 1995-19-04. Since 1995 within time-period insufficient data coverage, stable_inclusion_date NULL. However, raw_inclusion_date still contains inclusion date individual.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/osdc.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Getting started with osdc","text":"First, let’s load package, well dplyr. core package depends list variables within different registers needed order classify diabetes status individual. can found dataset: Let’s convert nicer format show list table.","code":"library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(osdc) variable_description #> # A tibble: 38 × 7 #> register_name register_abbrev variable_name start_year end_year #> #> 1 CPR-registerets befolkning… bef pnr 1968 NA #> 2 CPR-registerets befolkning… bef koen 1968 NA #> 3 CPR-registerets befolkning… bef foed_dato 1968 NA #> 4 Laegemiddelstatistikregist… lmdb pnr 1995 NA #> 5 Laegemiddelstatistikregist… lmdb eksd 1995 NA #> 6 Laegemiddelstatistikregist… lmdb atc 1995 NA #> 7 Laegemiddelstatistikregist… lmdb volume 1995 NA #> 8 Laegemiddelstatistikregist… lmdb apk 1995 NA #> 9 Laegemiddelstatistikregist… lmdb indo 1995 NA #> 10 Laegemiddelstatistikregist… lmdb name 1995 NA #> # ℹ 28 more rows #> # ℹ 2 more variables: danish_description , english_description variable_description |> select(register_name, register_abbrev, variable_name, english_description) |> knitr::kable()"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"danish-register-data-infrastructure","dir":"Articles","previous_headings":"Identifying type 1 and 2 diabetes cases in Danish healthcare registers","what":"Danish register data infrastructure","title":"Rationale","text":"Many individual-level data (e.g. civil registration, public healthcare contacts, drug prescriptions) automatically collected residents Denmark stored nationwide Danish registers Statistics Denmark Danish Health Data Authority. agencies legally allowed give access register data research purposes, provides (authorized) researchers set common, extensive data sources use studies. researcher associated approved Danish research institute (mainly Danish universities) can apply access, fees conditions apply. Register data generally accessed processed approved researchers remote servers operated Statistics Denmark Danish Health Data Authority. raw data used researchers, coupled common virtual working environment, potential enable reproducible research. means data processing workflow transferable reusable research projects underlying code designed reproducibility mind code shared (“open-sourced”) (2). reproducibility research relates transparent reporting methods enable others reproduce analyses experiments, also applies diabetes classification program, - reproducible - reused researcher access necessary register data dynamically identify study population individuals diabetes research needs (3).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"current-danish-register-based-diabetes-classifiers","dir":"Articles","previous_headings":"Identifying type 1 and 2 diabetes cases in Danish healthcare registers","what":"Current Danish register-based diabetes classifiers","title":"Rationale","text":"Denmark, National Diabetes Register, established 2006, first resource readily available researchers use identifying diabetes cases register data (4) . However, discontinued 2012. next resource Register Selected Chronic Diseases (RSCD), launched 2014. currently publicly available resource identify diabetes cases Danish register data (application Danish Health Data Authority).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"challenges-in-current-classifiers","dir":"Articles","previous_headings":"","what":"Challenges in current classifiers","title":"Rationale","text":"General-purpose registers administrative databases often provide basis diabetes epidemiology, rarely contain validated diabetes-specific data, may introduce bias studies using data. important accurate tool identify individuals diabetes registers, findings may differ various diabetes definitions (5,6). Considerable efforts made towards establishing tool diabetes research several countries, including Denmark (7–9). general population, classification algorithms (classifiers) need identify type 1 diabetes well type 2 diabetes, also account events might lead inclusion non-cases, use glucose-lowering drugs treatment conditions. Currently, type-specific diabetes classifier validated general population, leaves register-based studies area vulnerable biases. Denmark, limitation (flaw) RSCD publicly validated source code behind algorithm made publicly available. Notably, algorithm lacks inclusion based elevated HbA1c levels (10). Likewise, National Diabetes Register, since discontinued 2012, validation study question validity called future registers adopt inclusion based elevated HbA1c levels (11). Since launch RSCD, nationwide laboratory data HbA1c testing become available Danish register ecosystem (12), data yet incorporated available diabetes classifiers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"diabetes-classification-algorithms","dir":"Articles","previous_headings":"","what":"Diabetes classification algorithms","title":"Rationale","text":"currently available register-based diabetes classifiers yet incorporate emerging register data routine HbA1c testing. Wishing take advantage data, developed Open Source Diabetes Classifier (OSDC). Detailed discussion advantages disadvantages ’s design found Anders Aasted Isaksen’s thesis, chapter discussing methods. aimed developing algorithm : Stimulate discussion within Denmark openness ease use existing classifiers diabetes registers, need official process updating contributing existing data sources diabetes status. algorithm package may end used official institutions, can serve starting point improve current state diabetes classification Denmark inspiration might designed. Provide open-source, code-based algorithm R package classify type 1 type 2 diabetes based data Danish registers. implemented R package researchers can easily build database individuals diabetes quickly waiting official source implemented.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Luke William Johnston. Author, maintainer. Signe Kirk Brødbæk. Author. Anders Aasted Isaksen. Author. Steno Diabetes Center Aarhus. Copyright holder. Aarhus University. Copyright holder.","code":""},{"path":"https://steno-aarhus.github.io/osdc/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Johnston LW, Brødbæk SK, Isaksen AA (2024). osdc: Open Source Diabetes Classifier (OSDC) Danish Registers. R package version 0.0.1.9000, https://steno-aarhus.github.io/osdc/, https://github.com/steno-aarhus/osdc.","code":"@Manual{, title = {osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers}, author = {Luke William Johnston and Signe Kirk Brødbæk and Anders Aasted Isaksen}, year = {2024}, note = {R package version 0.0.1.9000, https://steno-aarhus.github.io/osdc/}, url = {https://github.com/steno-aarhus/osdc}, }"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"goal osdc (Open Source Diabetes Classifier) expose algorithm classifying diabetes within Danish registers can accessible R package. algorithm developed Steno Diabetes Center Aarhus flexible convenient use, validated terms accuracy. algorithms used throughout Denmark Danish register research, usually textual descriptions , rather code-based descriptions (e.g. Register Selected Chronic Diseases). project, aim make easier explicit classify type 1 type 2 diabetes within Danish register context. original implementation algorithm validated peer-reviewed publication , expect make tweaks algorithm time. changes transparent osdc repository.","code":""},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"can install development version osdc GitHub : install dependencies development , like simulating data running full test suite, use:","code":"# install.packages(\"pak\") pak::pak(\"steno-aarhus/osdc\") pak::pak( \"steno-aarhus/osdc\", dependencies = c(\"all\", \"Config/Needs/data\") )"},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"development","dir":"","previous_headings":"","what":"Development","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"developing package make changes files data-raw/, use targets pipeline re-generate data files:","code":"# install.packages(\"targets\") targets::tar_make()"},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"Please note osdc project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":null,"dir":"Reference","previous_headings":"","what":"Data frame of the logic for the OSDC algorithm — algorithm","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"data frame contains logic details algorithm specific inclusion exclusion criteria.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"","code":"algorithm"},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"tibble::tibble() two columns: name inclusion exclusion criteria name. logic logic criteria.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert column names to lower case. — column_names_to_lower","title":"Convert column names to lower case. — column_names_to_lower","text":"Convert column names lower case.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert column names to lower case. — column_names_to_lower","text":"","code":"column_names_to_lower(data)"},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert column names to lower case. — column_names_to_lower","text":"data data frame type object.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert column names to lower case. — column_names_to_lower","text":"object type given.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert column names to lower case. — column_names_to_lower","text":"","code":"if (FALSE) { # \\dontrun{ tibble::tibble(A = 1:3, B = 4:6) |> osdc:::column_names_to_lower() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"Get criteria algorithmic logic convert R logic condition.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"","code":"get_algorithm_logic(criteria)"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"criteria name inclusion exclusion criteria use.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"character string.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"","code":"if (FALSE) { # \\dontrun{ get_algorithm_logic(\"hba1c\") } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of the registers' abbreviations. — get_register_abbrev","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"Get list registers' abbreviations.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"","code":"get_register_abbrev()"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"character string.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"","code":"if (FALSE) { # \\dontrun{ get_register_abbrev() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of required variables from a specific register. — get_required_variables","title":"Get a list of required variables from a specific register. — get_required_variables","text":"Get list required variables specific register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of required variables from a specific register. — get_required_variables","text":"","code":"get_required_variables(register)"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a list of required variables from a specific register. — get_required_variables","text":"register abbreviation register name. See list abbreviations get_register_abbrev().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of required variables from a specific register. — get_required_variables","text":"character vector variable names.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a list of required variables from a specific register. — get_required_variables","text":"","code":"if (FALSE) { # \\dontrun{ get_required_variables(\"bef\") } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":null,"dir":"Reference","previous_headings":"","what":"Include only those with HbA1c in the required range. — include_hba1c","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"lab_forsker register, NPU27300 HbA1c modern units (IFCC) NPU03835 HbA1c old units (DCCT).","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"","code":"include_hba1c(data)"},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"data lab_forsker register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"object input type, default tibble::tibble(), two columns: pnr included_hba1c.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"","code":"if (FALSE) { # \\dontrun{ register_data$lab_forsker |> include_hba1c() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":null,"dir":"Reference","previous_headings":"","what":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"Join together LPR2 (lpr_diag lpr_adm) registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"","code":"join_lpr2(lpr_adm, lpr_diag)"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"lpr_adm admission register. lpr_diag diagnosis register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"class input, defaults tibble::tibble().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"","code":"if (FALSE) { # \\dontrun{ register_data$lpr_adm |> join_lpr2(register_data$lpr_diag) } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":null,"dir":"Reference","previous_headings":"","what":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"Join together LPR3 (diagnoser kontakter) registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"","code":"join_lpr3(kontakter, diagnoser)"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"kontakter contacts register. diagnoser diagnosis register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"class input, defaults tibble::tibble().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"","code":"if (FALSE) { # \\dontrun{ register_data$kontakter |> join_lpr3(register_data$diagnoser) } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/osdc-package.html","id":null,"dir":"Reference","previous_headings":"","what":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","title":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","text":"classifier first identifies population individuals type diabetes mellitus splits population T1D T2D identifying individuals T1D classifying remainder diabetes population T2D.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/reference/osdc-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","text":"Maintainer: Luke William Johnston lwjohnst@gmail.com (ORCID) Authors: Signe Kirk Brødbæk signekb@clin.au.dk Anders Aasted Isaksen andaas@rm.dk contributors: Steno Diabetes Center Aarhus [copyright holder] Aarhus University [copyright holder]","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the register name into text to use in a Markdown header — register_as_md_header","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"Convert register name text use Markdown header","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"","code":"register_as_md_header(register)"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"register abbreviation register name.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"character vector.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulation of register data needed for OSDC algorithm — register_data","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"Details data simulated found data-raw/ folder GitHub repository: https://github.com/steno-aarhus/osdc","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"","code":"register_data"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"list several registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the fake register data into a Markdown table — register_data_as_md_table","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"Convert fake register data Markdown table","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"","code":"register_data_as_md_table(data, caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"data data specific register register_data. caption caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the register data sources — registers_as_md_table","title":"Convert the register data sources — registers_as_md_table","text":"Convert register data sources","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the register data sources — registers_as_md_table","text":"","code":"registers_as_md_table(caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the register data sources — registers_as_md_table","text":"caption Caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the register data sources — registers_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"Variables registers descriptions required osdc algorithm.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"","code":"variable_description"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"variable-description","dir":"Reference","previous_headings":"","what":"variable_description","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"data frame 39 rows 6 columns: register_name official, full Danish name register. register_abbrev official abbreviation register. variable_name official name variable found register. years_covered years variable available . danish_description official description Danish variable. english_description translated description English variable.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"Many details within variable_description dataset come full official list registers Statistics Denmark (DST): https://www.dst.dk/extranet/forskningvariabellister/Oversigt%20over%20registre.html","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts the variables for a register into a Markdown table — variables_as_md_table","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"Converts variables register Markdown table","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"","code":"variables_as_md_table(register, caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"caption caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"Use function inside another function within condition provide informative error message within function used. done make error message informative location error actually occurs, rather within function.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"","code":"verify_required_variables(data, register, call = rlang::caller_env())"},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"data dataset check. register abbreviation register name. See list abbreviations get_register_abbrev(). call environment function called, error traceback gives meaningful location.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"Either TRUE verification passes, error.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"","code":"if (FALSE) { # \\dontrun{ # TODO: Replace with simulated data. verify_required_variables(register_data$bef, \"bef\") verify_required_variables(register_data$lpr_adm, \"lpr_adm\") } # }"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"general-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"General","title":"osdc 0.0.1.9000 (development version)","text":"Started package setup infrastructure.","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"documentation-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Documentation","title":"osdc 0.0.1.9000 (development version)","text":"Added drafts vignettes Getting Started vignette(\"osdc\") (#53) Added multiple sections design package algorithm vignette(\"design\") (#42, #43, #56, #57, #51) Added draft rationale package algorithm vignette(\"rationale\") (#63).","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"data-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Data","title":"osdc 0.0.1.9000 (development version)","text":"Added dataset contains list variables registers need algorithm work variable_description (#37, #48).","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"internal-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Internal","title":"osdc 0.0.1.9000 (development version)","text":"Added function internally verify input register database contains necessary variables algorithm work, using verify_required_variables() (#45). Added function convert columns lower case register database, using column_names_to_lower() (#60).","code":""}] +[{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"our-pledge","dir":"","previous_headings":"","what":"Our Pledge","title":"Contributor Covenant Code of Conduct","text":"members, contributors, leaders pledge make participation community harassment-free experience everyone, regardless age, body size, visible invisible disability, ethnicity, sex characteristics, gender identity expression, level experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, sexual identity orientation. pledge act interact ways contribute open, welcoming, diverse, inclusive, healthy community.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"our-standards","dir":"","previous_headings":"","what":"Our Standards","title":"Contributor Covenant Code of Conduct","text":"Examples behavior contributes positive environment community include: Demonstrating empathy kindness toward people respectful differing opinions, viewpoints, experiences Giving gracefully accepting constructive feedback Accepting responsibility apologizing affected mistakes, learning experience Focusing best just us individuals, overall community Examples unacceptable behavior include: use sexualized language imagery, sexual attention advances kind Trolling, insulting derogatory comments, personal political attacks Public private harassment Publishing others’ private information, physical email address, without explicit permission conduct reasonably considered inappropriate professional setting","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement-responsibilities","dir":"","previous_headings":"","what":"Enforcement Responsibilities","title":"Contributor Covenant Code of Conduct","text":"Community leaders responsible clarifying enforcing standards acceptable behavior take appropriate fair corrective action response behavior deem inappropriate, threatening, offensive, harmful. Community leaders right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct, communicate reasons moderation decisions appropriate.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"scope","dir":"","previous_headings":"","what":"Scope","title":"Contributor Covenant Code of Conduct","text":"Code Conduct applies within community spaces, also applies individual officially representing community public spaces. Examples representing community include using official e-mail address, posting via official social media account, acting appointed representative online offline event.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement","dir":"","previous_headings":"","what":"Enforcement","title":"Contributor Covenant Code of Conduct","text":"Instances abusive, harassing, otherwise unacceptable behavior may reported community leaders responsible enforcement lwjohnst@gmail.com. complaints reviewed investigated promptly fairly. community leaders obligated respect privacy security reporter incident.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"enforcement-guidelines","dir":"","previous_headings":"","what":"Enforcement Guidelines","title":"Contributor Covenant Code of Conduct","text":"Community leaders follow Community Impact Guidelines determining consequences action deem violation Code Conduct:","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_1-correction","dir":"","previous_headings":"Enforcement Guidelines","what":"1. Correction","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Use inappropriate language behavior deemed unprofessional unwelcome community. Consequence: private, written warning community leaders, providing clarity around nature violation explanation behavior inappropriate. public apology may requested.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_2-warning","dir":"","previous_headings":"Enforcement Guidelines","what":"2. Warning","title":"Contributor Covenant Code of Conduct","text":"Community Impact: violation single incident series actions. Consequence: warning consequences continued behavior. interaction people involved, including unsolicited interaction enforcing Code Conduct, specified period time. includes avoiding interactions community spaces well external channels like social media. Violating terms may lead temporary permanent ban.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_3-temporary-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"3. Temporary Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: serious violation community standards, including sustained inappropriate behavior. Consequence: temporary ban sort interaction public communication community specified period time. public private interaction people involved, including unsolicited interaction enforcing Code Conduct, allowed period. Violating terms may lead permanent ban.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"id_4-permanent-ban","dir":"","previous_headings":"Enforcement Guidelines","what":"4. Permanent Ban","title":"Contributor Covenant Code of Conduct","text":"Community Impact: Demonstrating pattern violation community standards, including sustained inappropriate behavior, harassment individual, aggression toward disparagement classes individuals. Consequence: permanent ban sort public interaction within community.","code":""},{"path":"https://steno-aarhus.github.io/osdc/CODE_OF_CONDUCT.html","id":"attribution","dir":"","previous_headings":"","what":"Attribution","title":"Contributor Covenant Code of Conduct","text":"Code Conduct adapted Contributor Covenant, version 2.1, available https://www.contributor-covenant.org/version/2/1/code_of_conduct.html. Community Impact Guidelines inspired [Mozilla’s code conduct enforcement ladder][https://github.com/mozilla/inclusion]. answers common questions code conduct, see FAQ https://www.contributor-covenant.org/faq. Translations available https://www.contributor-covenant.org/translations.","code":""},{"path":"https://steno-aarhus.github.io/osdc/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2022-2023 Steno Diabetes Center Aarhus Aarhus University Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"version-1-1","dir":"Articles","previous_headings":"Specific changes since the original validation (version from the paper)","what":"Version 1.1","title":"Changes to algorithm","text":"don’t use purchases semaglutid, dapagliflozin empagliflozin, neither inclusion events classification diabetes type (due increasing use treatment non-diabetes). longer use diabetes type reclassification based insulin purchases previous year. logic defining pregnancy index dates simplified use diagnoses pregnancy endings (longer uses data maternal care visits). De-duplicates subsequent HbA1c samples taken date (originally, sampling time available lab data, samples taken time de-duplicated)","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"version-1-2","dir":"Articles","previous_headings":"Specific changes since the original validation (version from the paper)","what":"Version 1.2","title":"Changes to algorithm","text":"longer uses GLP1-RAs inclusion type-specification.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"validity","dir":"Articles","previous_headings":"","what":"Validity","title":"Changes to algorithm","text":"Algorithm validity across versions. Reports PPV (positive predictive value) sensitivity typical cases cases atypical age onset T1D (age 40) T2D (age 40), respectively.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"on-pre-2019-data-as-in-the-paper","dir":"Articles","previous_headings":"Validity","what":"On pre-2019 data (as in the paper)","title":"Changes to algorithm","text":"Overall age onset-stratified (paper table 1 & 2): Bootstrapped metrics (paper S3):","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/changes.html","id":"potential-future-changes","dir":"Articles","previous_headings":"","what":"Potential future changes","title":"Changes to algorithm","text":"Add support using medical birth register define pregnancies censor gestational diabetes (GDM). allow censoring glucose-lowering drug (GLD) purchases way back 1995 (rather 1997 onward, obstetric codes limited ), enable extension window valid dates diagnosis 1996 onward. Limit historic scope primary diagnoses used evaluate majority diabetes-specific diagnoses type classification (e.g. evaluate majority among last five type-specific diabetes diagnoses).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"expected-data-structure","dir":"Articles","previous_headings":"","what":"Expected data structure","title":"Data sources","text":"section describes data sources expected look like input OSDC algorithm. try mimic much possible raw data looks like within Denmark Statistics. since registers often stored per year basis, don’t expect year variable data . ’ve processed data year variable, likely need split-apply-combine approach using osdc package. internally convert variable names lower case, present lower case, case may vary data sources (even years data source) real data. small note National Patient Register. contains several tables types data. algorithm uses hospital diagnosis data contained four registers, pair two related registers used (LPR2) (LPR3) 2019. LPR2 LPR3 equivalents lpr_adm kontakter lpr_diag diagnoser. variables equivalents well, except c_spec LPR2 equivalent hovedspeciale_ans LPR3, specialty values hovedspeciale_ans coded literal specialty names different padded integer codes c_spec contains. Statistics Denmark, tables provided mix separate files calendar year prior 2019 (LPR2 format) single file containing data 2019 onward (LPR3 format). two tables can joined either recnum variable (LPR2 data) dw_ek_kontakt variable (LPR3 data).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"bef-cpr-registerets-befolkningstabel","dir":"Articles","previous_headings":"Expected data structure","what":"bef: CPR-registerets befolkningstabel","title":"Data sources","text":"Variables descriptions within bef register. Simulated example data looks like bef register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lmdb-laegemiddelstatistikregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"lmdb: Laegemiddelstatistikregisteret","title":"Data sources","text":"Variables descriptions within lmdb register. Simulated example data looks like lmdb register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lpr_adm-landspatientregisterets-administrationstabel-lpr2","dir":"Articles","previous_headings":"Expected data structure","what":"lpr_adm: Landspatientregisterets administrationstabel (LPR2)","title":"Data sources","text":"Variables descriptions within lpr_adm register. Simulated example data looks like lpr_adm register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lpr_diag-landspatientregisterets-diagnosetabel-lpr2","dir":"Articles","previous_headings":"Expected data structure","what":"lpr_diag: Landspatientregisterets diagnosetabel (LPR2)","title":"Data sources","text":"Variables descriptions within lpr_diag register. Simulated example data looks like lpr_diag register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"kontakter-landspatientregisterets-kontakttabel-lpr3","dir":"Articles","previous_headings":"Expected data structure","what":"kontakter: Landspatientregisterets kontakttabel (LPR3)","title":"Data sources","text":"Variables descriptions within kontakter register. Simulated example data looks like kontakter register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"diagnoser-landspatientregisterets-diagnosetabel-lpr3","dir":"Articles","previous_headings":"Expected data structure","what":"diagnoser: Landspatientregisterets diagnosetabel (LPR3)","title":"Data sources","text":"Variables descriptions within diagnoser register. Simulated example data looks like diagnoser register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"sysi-sygesikringsregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"sysi: Sygesikringsregisteret","title":"Data sources","text":"Variables descriptions within sysi register. Simulated example data looks like sysi register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"sssy-sygesikringsregisteret","dir":"Articles","previous_headings":"Expected data structure","what":"sssy: Sygesikringsregisteret","title":"Data sources","text":"Variables descriptions within sssy register. Simulated example data looks like sssy register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"lab_forsker-laboratoriedatabasens-forskertabel","dir":"Articles","previous_headings":"Expected data structure","what":"lab_forsker: Laboratoriedatabasens forskertabel","title":"Data sources","text":"Variables descriptions within lab_forsker register. Simulated example data looks like lab_forsker register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/data-sources.html","id":"getting-access-to-data","dir":"Articles","previous_headings":"","what":"Getting access to data","title":"Data sources","text":"data available Statistics Denmark Danish Health Data Authority. Researchers must affiliated approved research institute Denmark fees apply. Information gain access data can found https://www.dst.dk/en/TilSalg/Forskningsservice.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"principles","dir":"Articles","previous_headings":"","what":"Principles","title":"Design","text":"guiding principles package: Functionality agnostic data format possible (e.g. can used SQL Arrow connections, data.table format, data.frame). Functions consistent inputs outputs (e.g. inputs outputs , regardless specific conditions). Functions predictable outputs based inputs (e.g. input data frame, output data frame). Functions consistent naming based action. Functions limited additional arguments. Casing input variables (upper lower case) agnostic, internal variables lower case, output variables lower case.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"use-cases","dir":"Articles","previous_headings":"","what":"Use cases","title":"Design","text":"make assumptions package used, based experiences expectations use cases: Entirely used within Denmark Statistics Danish Health Authority’s servers, since data kept. Used researchers within affiliated Danish research institutions. Used specifically within Danish register-based context. set “narratives” “personas” associated needs package aims fulfill: “… want determine registers variables request Denmark Statistics Danish Health Data Authority, certain able classify diabetes status individuals registers.” “… want easily simply create dataset contains data diabetes status population, can begin conducting research involves persons diabetes without tinker coding correct algorithm classify .” “… want informed early clear way whether data fits required data type values, can fix correct issues without extensive debugging code /data.”","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"core-functionality","dir":"Articles","previous_headings":"","what":"Core functionality","title":"Design","text":"list functionality aim osdc package Classify individuals type 1 type 2 diabetes status create data frame information date onset diabetes. Provide helper functions check process individual registers variables required enter classifier. Provide list required variables registers order calculate diabetes status. Provide validation helper functions check variables match expected algorithm. Provide common easily accessible standard determining diabetes status within context research using Danish registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifier-algorithm","dir":"Articles","previous_headings":"","what":"Classifier algorithm","title":"Design","text":"complete description classifier found Anders Aasted Isaksen’s PhD Thesis well validation paper (1). description brief concise version documents. algorithm classifying individuals diabetes described . overall output algorithm first classify diabetes, classify check individuals might type 1 diabetes, otherwise classify type 2 diabetes. Initial diabetes classification defined second occurrence listed inclusion events. Wherever possible, available data event used, except purchases glucose-lowering drugs, since data obstetric diagnoses necessary censor glucose-lowering drug purchases complete 1997 onwards. Inclusion criteria : HbA1c measurements ≥48 mmol/mol. Hospital diagnoses diabetes. Diabetes-specific services received podiatrist. Purchase glucose-lowering drugs. Exclusions : Samples taken pregnancies, potential gestational diabetes mellitus. Brand drugs weight loss, e.g. Saxenda. Purchases pregnancies, potential treatment gestational diabetes mellitus. Metformin women age 40, treatment polycystic ovary syndrome.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifying-type-1-diabetes","dir":"Articles","previous_headings":"Classifier algorithm","what":"Classifying type 1 diabetes","title":"Design","text":"Diabetes type classified either T1D T2D based patterns purchases insulin drugs (including analogues) hospital primary diagnoses T1D T2D. Classification T1D requires individual fulfill either following criteria: Must purchased insulin drugs never type glucose-lowering drugs, least one diagnosis T1D Must majority T1D diagnoses endocrinological departments (medical departments, absence contacts endocrinological departments), purchase insulin within 180 days onset diabetes, insulin contributing least two thirds defined daily doses glucose-lowering drugs purchased. populations generated fixed index date (cross-sectional studies associated dissertation), individuals classified T1D cases must purchased insulin drugs last year prior index date.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"classifying-type-2-diabetes","dir":"Articles","previous_headings":"Classifier algorithm","what":"Classifying type 2 diabetes","title":"Design","text":"Individuals classified T1D cases classified T2D cases.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/design.html","id":"data-required-from-registers","dir":"Articles","previous_headings":"","what":"Data required from registers","title":"Design","text":"following list variables required specific registers order package classify diabetes status:","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Function flow","text":"vignette describes function conventions function flow osdc package. function convention sections go name functions structure terms input output. function flow describes functions within package, internal user-facing, data sources rely , connected . First, functions classifying diabetes status presented, followed functions classifying diabetes type.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"function-conventions","dir":"Articles","previous_headings":"","what":"Function conventions","title":"Function flow","text":"conventions ideals , used guidelines help development understanding code. hard rules.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"naming","dir":"Articles","previous_headings":"Function conventions","what":"Naming","title":"Function flow","text":"First word action verb, later words objects conditions. Exclusion criteria prefixed exclude_. Inclusion criteria prefixed include_. Helpers get extract condition (e.g., “pregnancy” “date visit”) prefixed get_. Helpers drop keep specific condition prefixed drop_ keep_ (e.g., “first visit date maternal care pregnancy 40 weeks”). types helpers likely contained get_ functions. Helpers join registers output functions prefixed join_.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"input-and-output","dir":"Articles","previous_headings":"Function conventions","what":"Input and output","title":"Function flow","text":"arguments, one two core required argument. One input register database time. exclude_ functions can take register first argument take output include_ function. Second argument can output data another function.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"function-flow","dir":"Articles","previous_headings":"","what":"Function flow","title":"Function flow","text":"osdc package contains one main function classifies individuals either type 1 type 2 diabetes using Danish registers: classify_diabetes(). function classifies diabetes (type 1 2) based Danish registers described vignette(\"design\") vignette(\"data-sources\"). data sources used input function. specific inclusion exclusion details also described vignette(\"design\"). results functionality flow classifying diabetes status seen . flow can divided two sections: extracting diabetes population classifying diabetes type detail following sections. functions take data.frame type object input outputs type object input object (data.frame type). instance, input data.table object, output also data.table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"population-extraction","dir":"Articles","previous_headings":"","what":"Population extraction","title":"Function flow","text":"following sections, describe functions used extract diabetes population Danish registers. functions divided inclusion exclusion events, final diagnosis date calculated based events.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hba1c-tests-above-the-diagnosis-cut-off-value-48-mmolmol-or-6-5","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"HbA1c tests above the diagnosis cut-off value (48 mmol/mol or 6.5%)","title":"Function flow","text":"function include_hba1c() uses lab_forsker input data extract events HbA1c tests diagnosis cut-value. Since HbA1c diagnosis cut-value depends kind test used, inclusion event defined follows: HbA1c IFCC (NPU03835), include values >= 6.5 %. HbA1c DCCT (NPU27300), include values >= 48 mmol/mol. Algorithm used implementation including HbA1c.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hospital-diagnosis-of-diabetes","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"Hospital diagnosis of diabetes","title":"Function flow","text":"function include_diabetes_diagnoses() uses hospital contacts LPR2 3 include dates diabetes diagnoses. Diabetes diagnoses ICD 8 ICD 10 included. function contains two helper functions: keep_diabetes_icd10() keep_diabetes_icd8()","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"diabetes-specific-podiatrist-services","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"Diabetes-specific podiatrist services","title":"Function flow","text":"function include_podiatrist_services() uses sysi sssy input extract dates diabetes-specific podiatrist services.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"gld-purchases","dir":"Articles","previous_headings":"Population extraction > Inclusion events","what":"GLD purchases","title":"Function flow","text":"function include_gld_purchases() uses lmdb extract dates GLD purchases (1997 onwards).","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"hba1c-tests-and-gld-purchases-during-pregnancy","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"HbA1c tests and GLD purchases during pregnancy","title":"Function flow","text":"function exclude_pregnancy() uses diagnoses LPR2 LPR3 input used exclude HbA1c tests GLD purchases pregnancy. Internally, relies function get_pregnancy_dates() contains following three helper functions: calculate_pregnancy_index_date_for_mc_visits_wo_end_date() (might removed inclusion birth register) get_pregnancy_end_dates(): Keep maternal care visits end date drop visits 40 weeks end date 12 weeks end date. get_maternal_care_visit_dates_without_end_date(): Uses output get_pregnancy_end_dates() identifies maternal care visits end dates derive maternal care visits without end dates. .","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"glucose-lowering-brand-drugs-for-weight-loss","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"Glucose-lowering brand drugs for weight loss","title":"Function flow","text":"function exclude_wld_purchases() uses lmdb input excludes brand drugs Saxenda Wegovy.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"metformin-purchases-for-women-below-age-40","dir":"Articles","previous_headings":"Population extraction > Exclusion events","what":"Metformin purchases for women below age 40","title":"Function flow","text":"function exclude_potential_pcos() input exclude purchases metformin women age 40 (.e., <= 39 years old) date purchase. relies bef input. function contains two helper functions: keep_women() drop_age_40_below()","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"get-diagnosis-date","dir":"Articles","previous_headings":"Population extraction","what":"Get diagnosis date","title":"Function flow","text":"function get_diagnosis_date() combines outputs inclusion exclusion functions get final diagnosis date. Initially, drops first inclusion exclusion events function outputs helper drop_first_event(), two events kept. used assign initial diagnosis according OSDC. , outputs joined together join_diagnosis_dates(). Finally, dates outside data coverage period dropped drop_diagnosis_dates_outside_coverage() end final diagnosis date. details censoring based periods insufficient data coverage, see vignette(\"design\").","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"classifying-the-diabetes-type","dir":"Articles","previous_headings":"Population extraction","what":"Classifying the diabetes type","title":"Function flow","text":"next step OSDC algorithm classifies individuals extracted diabetes population either T1D T2D. described vignette(\"design\"), individuals classified T1D cases classified T2D cases. output data.frame includes one row per individual diabetes population: one column PNR, two columns inclusion dates (one “stable” date one “raw” date - see vignette(\"design\") elaboration entails), one column diabetes type.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"type-1-classification","dir":"Articles","previous_headings":"Population extraction > Classifying the diabetes type","what":"Type 1 classification","title":"Function flow","text":"details classification type 1 diabetes described vignette(\"design\"). classify whether individual T1D, OSDC algorithm includes following criteria: get_t1d_primary_diagnosis(), relies hospital diagnoses extracted lpr_diag (LPR2) diagnoser (LPR3) previous steps. get_only_insulin_purchases() relies GLD purchases Lægemiddelsdatabasen get patients GLD purchases insulin . get_majority_of_t1d_diagnoses() (compared T2D diagnoses) relies primary hospital diagnoses LPR. get_insulin_purchase_within_180_days() relies diagnosis LPR GLD purchases Lægemiddelsdatabasen. get_insulin_is_two_thirds_of_gld_doses relies GLD purchases Lægemiddelsdatabasen. Note following hierarchy first function : First, function checks whether individual primary diagnoses endocrinological specialty. ’s case given person, check whether majority T1D primary diagnoses based data endocrinological specialty. ’s case, check based primary diagnoses medical specialties.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"type-2-classification","dir":"Articles","previous_headings":"Population extraction > Classifying the diabetes type","what":"Type 2 classification","title":"Function flow","text":"described vignette(\"design\"), individuals classified type 1 cases classified type 2 cases.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/function-flow.html","id":"output","dir":"Articles","previous_headings":"","what":"Output","title":"Function flow","text":"output OSDC algorithm data.frame includes four columns: PNR: pseudonymised social security number individuals diabetes population (one row per individual) stable_inclusion_date: stable inclusion date (.e., raw date mutated individuals included time-period data coverage sufficient make incident cases reliable)1 raw_inclusion_date: raw inclusion date (.e., date second inclusion event described Extracting diabetes population section ) diabetes_type classified diabetes type example, see . Example rows data.frame output osdc package. individuals 0000000001 0000000004 classified diabetes (T1D T2D, respectively). 0000000004 classified type 1 diabetes (T1D) inclusion date 2020-01-01. Since date within time-period sufficient data coverage, column stable_inclusion_date populated date raw_inclusion_date. individual second row, 0000000004 classified type 2 diabetes T2D inclusion date 1995-19-04. Since 1995 within time-period insufficient data coverage, stable_inclusion_date NULL. However, raw_inclusion_date still contains inclusion date individual.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/osdc.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Getting started with osdc","text":"First, let’s load package, well dplyr. core package depends list variables within different registers needed order classify diabetes status individual. can found dataset: Let’s convert nicer format show list table.","code":"library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union library(osdc) variable_description #> # A tibble: 38 × 7 #> register_name register_abbrev variable_name start_year end_year #> #> 1 CPR-registerets befolkning… bef pnr 1968 NA #> 2 CPR-registerets befolkning… bef koen 1968 NA #> 3 CPR-registerets befolkning… bef foed_dato 1968 NA #> 4 Laegemiddelstatistikregist… lmdb pnr 1995 NA #> 5 Laegemiddelstatistikregist… lmdb eksd 1995 NA #> 6 Laegemiddelstatistikregist… lmdb atc 1995 NA #> 7 Laegemiddelstatistikregist… lmdb volume 1995 NA #> 8 Laegemiddelstatistikregist… lmdb apk 1995 NA #> 9 Laegemiddelstatistikregist… lmdb indo 1995 NA #> 10 Laegemiddelstatistikregist… lmdb name 1995 NA #> # ℹ 28 more rows #> # ℹ 2 more variables: danish_description , english_description variable_description |> select(register_name, register_abbrev, variable_name, english_description) |> knitr::kable()"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"danish-register-data-infrastructure","dir":"Articles","previous_headings":"Identifying type 1 and 2 diabetes cases in Danish healthcare registers","what":"Danish register data infrastructure","title":"Rationale","text":"Many individual-level data (e.g. civil registration, public healthcare contacts, drug prescriptions) automatically collected residents Denmark stored nationwide Danish registers Statistics Denmark Danish Health Data Authority. agencies legally allowed give access register data research purposes, provides (authorized) researchers set common, extensive data sources use studies. researcher associated approved Danish research institute (mainly Danish universities) can apply access, fees conditions apply. Register data generally accessed processed approved researchers remote servers operated Statistics Denmark Danish Health Data Authority. raw data used researchers, coupled common virtual working environment, potential enable reproducible research. means data processing workflow transferable reusable research projects underlying code designed reproducibility mind code shared (“open-sourced”) (2). reproducibility research relates transparent reporting methods enable others reproduce analyses experiments, also applies diabetes classification program, - reproducible - reused researcher access necessary register data dynamically identify study population individuals diabetes research needs (3).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"current-danish-register-based-diabetes-classifiers","dir":"Articles","previous_headings":"Identifying type 1 and 2 diabetes cases in Danish healthcare registers","what":"Current Danish register-based diabetes classifiers","title":"Rationale","text":"Denmark, National Diabetes Register, established 2006, first resource readily available researchers use identifying diabetes cases register data (4) . However, discontinued 2012. next resource Register Selected Chronic Diseases (RSCD), launched 2014. currently publicly available resource identify diabetes cases Danish register data (application Danish Health Data Authority).","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"challenges-in-current-classifiers","dir":"Articles","previous_headings":"","what":"Challenges in current classifiers","title":"Rationale","text":"General-purpose registers administrative databases often provide basis diabetes epidemiology, rarely contain validated diabetes-specific data, may introduce bias studies using data. important accurate tool identify individuals diabetes registers, findings may differ various diabetes definitions (5,6). Considerable efforts made towards establishing tool diabetes research several countries, including Denmark (7–9). general population, classification algorithms (classifiers) need identify type 1 diabetes well type 2 diabetes, also account events might lead inclusion non-cases, use glucose-lowering drugs treatment conditions. Currently, type-specific diabetes classifier validated general population, leaves register-based studies area vulnerable biases. Denmark, limitation (flaw) RSCD publicly validated source code behind algorithm made publicly available. Notably, algorithm lacks inclusion based elevated HbA1c levels (10). Likewise, National Diabetes Register, since discontinued 2012, validation study question validity called future registers adopt inclusion based elevated HbA1c levels (11). Since launch RSCD, nationwide laboratory data HbA1c testing become available Danish register ecosystem (12), data yet incorporated available diabetes classifiers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/articles/rationale.html","id":"diabetes-classification-algorithms","dir":"Articles","previous_headings":"","what":"Diabetes classification algorithms","title":"Rationale","text":"currently available register-based diabetes classifiers yet incorporate emerging register data routine HbA1c testing. Wishing take advantage data, developed Open Source Diabetes Classifier (OSDC). Detailed discussion advantages disadvantages ’s design found Anders Aasted Isaksen’s thesis, chapter discussing methods. aimed developing algorithm : Stimulate discussion within Denmark openness ease use existing classifiers diabetes registers, need official process updating contributing existing data sources diabetes status. algorithm package may end used official institutions, can serve starting point improve current state diabetes classification Denmark inspiration might designed. Provide open-source, code-based algorithm R package classify type 1 type 2 diabetes based data Danish registers. implemented R package researchers can easily build database individuals diabetes quickly waiting official source implemented.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Luke William Johnston. Author, maintainer. Signe Kirk Brødbæk. Author. Anders Aasted Isaksen. Author. Steno Diabetes Center Aarhus. Copyright holder. Aarhus University. Copyright holder.","code":""},{"path":"https://steno-aarhus.github.io/osdc/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Johnston LW, Brødbæk SK, Isaksen AA (2024). osdc: Open Source Diabetes Classifier (OSDC) Danish Registers. R package version 0.0.1.9000, https://steno-aarhus.github.io/osdc/, https://github.com/steno-aarhus/osdc.","code":"@Manual{, title = {osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers}, author = {Luke William Johnston and Signe Kirk Brødbæk and Anders Aasted Isaksen}, year = {2024}, note = {R package version 0.0.1.9000, https://steno-aarhus.github.io/osdc/}, url = {https://github.com/steno-aarhus/osdc}, }"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"overview","dir":"","previous_headings":"","what":"Overview","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"goal osdc (Open Source Diabetes Classifier) expose algorithm classifying diabetes within Danish registers can accessible R package. algorithm developed Steno Diabetes Center Aarhus flexible convenient use, validated terms accuracy. algorithms used throughout Denmark Danish register research, usually textual descriptions , rather code-based descriptions (e.g. Register Selected Chronic Diseases). project, aim make easier explicit classify type 1 type 2 diabetes within Danish register context. original implementation algorithm validated peer-reviewed publication , expect make tweaks algorithm time. changes transparent osdc repository.","code":""},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"can install development version osdc GitHub : install dependencies development , like simulating data running full test suite, use:","code":"# install.packages(\"pak\") pak::pak(\"steno-aarhus/osdc\") pak::pak( \"steno-aarhus/osdc\", dependencies = c(\"all\", \"Config/Needs/data\") )"},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"development","dir":"","previous_headings":"","what":"Development","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"developing package make changes files data-raw/, use targets pipeline re-generate data files:","code":"# install.packages(\"targets\") targets::tar_make()"},{"path":"https://steno-aarhus.github.io/osdc/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Open Source Diabetes Classifier (OSDC) for Danish Registers","text":"Please note osdc project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":null,"dir":"Reference","previous_headings":"","what":"Data frame of the logic for the OSDC algorithm — algorithm","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"data frame contains logic details algorithm specific inclusion exclusion criteria.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"","code":"algorithm"},{"path":"https://steno-aarhus.github.io/osdc/reference/algorithm.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Data frame of the logic for the OSDC algorithm — algorithm","text":"tibble::tibble() two columns: name inclusion exclusion criteria name. logic logic criteria.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert column names to lower case. — column_names_to_lower","title":"Convert column names to lower case. — column_names_to_lower","text":"Convert column names lower case.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert column names to lower case. — column_names_to_lower","text":"","code":"column_names_to_lower(data)"},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert column names to lower case. — column_names_to_lower","text":"data data frame type object.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert column names to lower case. — column_names_to_lower","text":"object type given.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/column_names_to_lower.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert column names to lower case. — column_names_to_lower","text":"","code":"if (FALSE) { # \\dontrun{ tibble::tibble(A = 1:3, B = 4:6) |> osdc:::column_names_to_lower() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"Get criteria algorithmic logic convert R logic condition.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"","code":"get_algorithm_logic(criteria)"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"criteria name inclusion exclusion criteria use.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"character string.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_algorithm_logic.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the criteria algorithmic logic and convert to an R logic condition. — get_algorithm_logic","text":"","code":"if (FALSE) { # \\dontrun{ get_algorithm_logic(\"hba1c\") } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of the registers' abbreviations. — get_register_abbrev","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"Get list registers' abbreviations.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"","code":"get_register_abbrev()"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"character string.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_register_abbrev.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a list of the registers' abbreviations. — get_register_abbrev","text":"","code":"if (FALSE) { # \\dontrun{ get_register_abbrev() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Get a list of required variables from a specific register. — get_required_variables","title":"Get a list of required variables from a specific register. — get_required_variables","text":"Get list required variables specific register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get a list of required variables from a specific register. — get_required_variables","text":"","code":"get_required_variables(register)"},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get a list of required variables from a specific register. — get_required_variables","text":"register abbreviation register name. See list abbreviations get_register_abbrev().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get a list of required variables from a specific register. — get_required_variables","text":"character vector variable names.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/get_required_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get a list of required variables from a specific register. — get_required_variables","text":"","code":"if (FALSE) { # \\dontrun{ get_required_variables(\"bef\") } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":null,"dir":"Reference","previous_headings":"","what":"Include only those with HbA1c in the required range. — include_hba1c","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"lab_forsker register, NPU27300 HbA1c modern units (IFCC) NPU03835 HbA1c old units (DCCT).","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"","code":"include_hba1c(data)"},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"data lab_forsker register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"object input type, default tibble::tibble(), two columns: pnr included_hba1c.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/include_hba1c.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Include only those with HbA1c in the required range. — include_hba1c","text":"","code":"if (FALSE) { # \\dontrun{ register_data$lab_forsker |> include_hba1c() } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":null,"dir":"Reference","previous_headings":"","what":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"Join together LPR2 (lpr_diag lpr_adm) registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"","code":"join_lpr2(lpr_adm, lpr_diag)"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"lpr_adm admission register. lpr_diag diagnosis register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"class input, defaults tibble::tibble().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr2.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join together the LPR2 (lpr_diag and lpr_adm) registers. — join_lpr2","text":"","code":"if (FALSE) { # \\dontrun{ register_data$lpr_adm |> join_lpr2(register_data$lpr_diag) } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":null,"dir":"Reference","previous_headings":"","what":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"Join together LPR3 (diagnoser kontakter) registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"","code":"join_lpr3(kontakter, diagnoser)"},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"kontakter contacts register. diagnoser diagnosis register.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"class input, defaults tibble::tibble().","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/join_lpr3.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join together the LPR3 (diagnoser and kontakter) registers. — join_lpr3","text":"","code":"if (FALSE) { # \\dontrun{ register_data$kontakter |> join_lpr3(register_data$diagnoser) } # }"},{"path":"https://steno-aarhus.github.io/osdc/reference/osdc-package.html","id":null,"dir":"Reference","previous_headings":"","what":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","title":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","text":"classifier first identifies population individuals type diabetes mellitus splits population T1D T2D identifying individuals T1D classifying remainder diabetes population T2D.","code":""},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/reference/osdc-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"osdc: Open Source Diabetes Classifier (OSDC) for Danish Registers — osdc-package","text":"Maintainer: Luke William Johnston lwjohnst@gmail.com (ORCID) Authors: Signe Kirk Brødbæk signekb@clin.au.dk Anders Aasted Isaksen andaas@rm.dk contributors: Steno Diabetes Center Aarhus [copyright holder] Aarhus University [copyright holder]","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the register name into text to use in a Markdown header — register_as_md_header","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"Convert register name text use Markdown header","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"","code":"register_as_md_header(register)"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"register abbreviation register name.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_as_md_header.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the register name into text to use in a Markdown header — register_as_md_header","text":"character vector.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Simulation of register data needed for OSDC algorithm — register_data","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"Details data simulated found data-raw/ folder GitHub repository: https://github.com/steno-aarhus/osdc","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"","code":"register_data"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Simulation of register data needed for OSDC algorithm — register_data","text":"list several registers.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the fake register data into a Markdown table — register_data_as_md_table","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"Convert fake register data Markdown table","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"","code":"register_data_as_md_table(data, caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"data data specific register register_data. caption caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/register_data_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the fake register data into a Markdown table — register_data_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert the register data sources — registers_as_md_table","title":"Convert the register data sources — registers_as_md_table","text":"Convert register data sources","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert the register data sources — registers_as_md_table","text":"","code":"registers_as_md_table(caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert the register data sources — registers_as_md_table","text":"caption Caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/registers_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert the register data sources — registers_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":null,"dir":"Reference","previous_headings":"","what":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"Variables registers descriptions required osdc algorithm.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"","code":"variable_description"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"variable-description","dir":"Reference","previous_headings":"","what":"variable_description","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"data frame 39 rows 6 columns: register_name official, full Danish name register. register_abbrev official abbreviation register. variable_name official name variable found register. years_covered years variable available . danish_description official description Danish variable. english_description translated description English variable.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variable_description.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Variables from registers and their descriptions that are required for the osdc algorithm. — variable_description","text":"Many details within variable_description dataset come full official list registers Statistics Denmark (DST): https://www.dst.dk/extranet/forskningvariabellister/Oversigt%20over%20registre.html","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Converts the variables for a register into a Markdown table — variables_as_md_table","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"Converts variables register Markdown table","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"","code":"variables_as_md_table(register, caption = NULL)"},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"caption caption add table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/variables_as_md_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Converts the variables for a register into a Markdown table — variables_as_md_table","text":"character vector Markdown table.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"Use function inside another function within condition provide informative error message within function used. done make error message informative location error actually occurs, rather within function.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"","code":"verify_required_variables(data, register, call = rlang::caller_env())"},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"data dataset check. register abbreviation register name. See list abbreviations get_register_abbrev(). call environment function called, error traceback gives meaningful location.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"Either TRUE verification passes, error.","code":""},{"path":"https://steno-aarhus.github.io/osdc/reference/verify_required_variables.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Verify that the dataset has the required variables for the algorithm. — verify_required_variables","text":"","code":"if (FALSE) { # \\dontrun{ # TODO: Replace with simulated data. verify_required_variables(register_data$bef, \"bef\") verify_required_variables(register_data$lpr_adm, \"lpr_adm\") } # }"},{"path":[]},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"general-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"General","title":"osdc 0.0.1.9000 (development version)","text":"Started package setup infrastructure.","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"documentation-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Documentation","title":"osdc 0.0.1.9000 (development version)","text":"Added drafts vignettes Getting Started vignette(\"osdc\") (#53) Added multiple sections design package algorithm vignette(\"design\") (#42, #43, #56, #57, #51) Added draft rationale package algorithm vignette(\"rationale\") (#63).","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"data-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Data","title":"osdc 0.0.1.9000 (development version)","text":"Added dataset contains list variables registers need algorithm work variable_description (#37, #48).","code":""},{"path":"https://steno-aarhus.github.io/osdc/news/index.html","id":"internal-0-0-1-9000","dir":"Changelog","previous_headings":"","what":"Internal","title":"osdc 0.0.1.9000 (development version)","text":"Added function internally verify input register database contains necessary variables algorithm work, using verify_required_variables() (#45). Added function convert columns lower case register database, using column_names_to_lower() (#60).","code":""}]