Skip to contents

This function joins the outputs from all the filtering functions, by pnr and dates. Input datasets:

  • diabetes_diagnoses: Dates are the first and second hospital diabetes diagnosis.

  • podiatrist_services: Dates are the first and second diabetes-specific podiatrist record.

  • gld_hba1c_after_drop_steps: Dates are the first and second elevated HbA1c test results (after excluding results potentially influenced by gestational diabetes), and the first and second purchase of a glucose-lowering drug (after excluding purchases potentially related to polycystic ovary syndrome or gestational diabetes).

Usage

join_inclusions(
  diabetes_diagnoses,
  podiatrist_services,
  gld_hba1c_after_drop_steps
)

Arguments

diabetes_diagnoses

Output from keep_diabetes_diagnoses().

podiatrist_services

Output from keep_podiatrist_services().

gld_hba1c_after_drop_steps

Output from drop_pregnancies() and drop_pcos().

Value

The same type as the input data, as a duckplyr::duckdb_tibble(), with the joined columns from the output of keep_diabetes_diagnoses(), keep_podiatrist_services(), drop_pcos(), and drop_pregnancies(). There will be 1-8 rows per pnr.

See also

See the vignette("algorithm") for the logic used to filter these patients.