Skip to main content

Add your description here

Project description

cdef-cohort-generation

This Python project is part of a research study conducted by the Center for Data og Effektforskning (CDEF) at Mary Elizabeths Hospital, Denmark. The project aims to generate cohorts for an observational study investigating the long-term impact of severe chronic diseases in children on parental income trajectories in Denmark.

The package has been built in such a way that it can be easily extended to include additional registers and data sources. The project is designed to be modular and flexible, allowing for easy integration of new data sources and registers. And also to be easily adaptable to other research projects that require processing and analysis of Danish national registers. But this package focuses on creating the initial cohort/population for the study.

Project Overview

This project is designed to process and analyze data from Danish national registers for an observational study investigating the long-term impact of severe chronic diseases in children on parental income trajectories in Denmark.

The primary objectives of this study are:

  1. Quantify the difference in total personal income between parents of children with severe chronic diseases and matched controls over a 22-year period (2000-2022).
  2. Explore how this impact varies across disease severity, geographical location, and parental education levels.
  3. Examine gender differences in the economic impact of childhood chronic diseases on parents.
  4. Assess the role of socioeconomic factors in moderating the impact of childhood chronic diseases on parental income trajectories.

Key Features

  • Process and combine data from various Danish national registers
  • Identify severe chronic diseases using ICD-10 codes
  • Generate cohorts for analysis
  • Perform longitudinal data analysis
  • Apply statistical methods including difference-in-differences analysis and marginal structural models

Installation

This project requires Python 3.12.6 and uses rye for dependency management.

  1. Clone the repository
  2. Install rye if you haven't already (see here)
  3. Navigate to the project directory and set up the environment:
    rye sync
    

Usage

To run the main processing script:

python -m cdef_cohort_generation.main

Registers implemented

Registers from Sundhedsdatastyrelsen

  • LPR_ADM: Administrative data from hospitals (LPR2)
  • LPR_DIAG: Diagnoses from hospitals (LPR2)
  • LPR_BES: Outpatient visits from hospitals (LPR2)
  • LPR_KONTAKER: Contacts with hospitals (LPR3)
  • LPR_DIAGNOSER: Diagnoses from hospitals (LPR3)

Registers from Statistics Denmark

  • BEF: Population data
  • IND: Income data
  • IDAN: IDA employment data
  • UDDF: Education data
  • AKM: Work classification module

Testing

To run the unit tests:

pytest tests/

Todo

  • Make sure LPR2/LPR3 processing is as smooth as possible
  • Include mappings for variables + ISCED
  • Improve logging and error handling
  • Add descriptive plots
  • Refactor code for better organization and efficiency
  • LPR3 diagnoser / LPR3 kontakter directory names (OBS. convert script)
  • Mapping and .env file not included in repo
  • SENR not available in early years for AKM

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

Contributors

  • Tobias Kragholm

Acknowledgments

This project uses data from Danish national registers and is conducted in compliance with Danish data protection regulations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdef_cohort_generation-0.1.3.tar.gz (174.9 kB view details)

Uploaded Source

Built Distribution

cdef_cohort_generation-0.1.3-py3-none-any.whl (183.4 kB view details)

Uploaded Python 3

File details

Details for the file cdef_cohort_generation-0.1.3.tar.gz.

File metadata

File hashes

Hashes for cdef_cohort_generation-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bd4c025301fa24c3c88b2f04577dafafc3be0d7b8193f9bf50f35f0ce550d011
MD5 807fc8be5d4e64bb4fe6663449f58c0c
BLAKE2b-256 311a67aa320dae54730723f9259830bf207b30b4691cb850aaa41a5aec127d38

See more details on using hashes here.

File details

Details for the file cdef_cohort_generation-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cdef_cohort_generation-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9789ac88f2652807e2037574b25279a6f9724c6912c5a3a1c534d97b1c6c03be
MD5 f237054c0054efd683608399b4cbeacd
BLAKE2b-256 d523637f1d476f616ff5beb1e8091f4bd9a1c70b335f406f1c963e7bd0003b99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page