cehrbert-data 0.0.3__tar.gz → 0.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/PKG-INFO +1 -1
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_training_data.py +4 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/spark_app_base.py +5 -0
- cehrbert_data-0.0.4/src/cehrbert_data/utils/logging_utils.py +12 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/utils/spark_parse_args.py +6 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data.egg-info/PKG-INFO +1 -1
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data.egg-info/SOURCES.txt +1 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/.github/workflows/python-build.yml +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/.github/workflows/tests.yml +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/.gitignore +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/.pre-commit-config.yaml +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/LICENSE +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/README.md +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/pyproject.toml +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/.part-00000-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/.part-00003-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/.part-00010-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/part-00000-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/part-00003-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept/part-00010-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/.part-00000-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/.part-00002-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/.part-00006-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/.part-00011-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/.part-00013-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/part-00000-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/part-00002-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/part-00006-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/part-00011-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/part-00013-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/.part-00000-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/.part-00002-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/.part-00007-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/.part-00012-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/part-00000-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/part-00002-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/part-00007-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/part-00012-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/condition_occurrence/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/condition_occurrence/.part-00000-4eff03a1-cdcf-4c89-b0cd-9ce590b9b1eb-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/condition_occurrence/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/condition_occurrence/part-00000-4eff03a1-cdcf-4c89-b0cd-9ce590b9b1eb-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/drug_exposure/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/drug_exposure/.part-00000-10bbf1a4-a7da-416e-9703-58609c7edfad-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/drug_exposure/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/drug_exposure/part-00000-10bbf1a4-a7da-416e-9703-58609c7edfad-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/.part-00000-694316e5-cc95-49f1-9fad-5a7f377e2602-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/part-00000-694316e5-cc95-49f1-9fad-5a7f377e2602-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/person/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/person/.part-00000-7d789011-f361-48da-af6f-cfe102978b3a-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/person/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/person/part-00000-7d789011-f361-48da-af6f-cfe102978b3a-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/procedure_occurrence/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/procedure_occurrence/.part-00000-e73003c1-aed5-41c0-b2d4-eaccaccf044a-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/procedure_occurrence/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/procedure_occurrence/part-00000-e73003c1-aed5-41c0-b2d4-eaccaccf044a-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/._SUCCESS.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/.part-00000-e874b5f1-bf9e-4cb9-93bf-c309a47b0476-c000.snappy.parquet.crc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/_SUCCESS +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/part-00000-e874b5f1-bf9e-4cb9-93bf-c309a47b0476-c000.snappy.parquet +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/setup.cfg +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_concept_similarity_table.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_hierarchical_bert_training_data.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_included_concept_list.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_information_content.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_required_labs.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/atrial_fibrillation.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/cabg.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/coronary_artery_disease.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/covid.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/covid_inpatient.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/death.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/heart_failure.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/ischemic_stroke.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/last_visit_discharged_home.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/query_builder.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/type_two_diabietes.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/ventilation.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/config/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/config/output_names.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/const/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/const/__pycache__/__init__.cpython-311.pyc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/const/__pycache__/common.cpython-311.pyc +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/const/artificial_tokens.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/const/common.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/artificial_time_token_decorator.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/clinical_event_decorator.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/death_event_decorator.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/demographic_event_decorator.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/patient_event_decorator_base.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/token_priority.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/afib_ischemic_stroke.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/cad_cabg_cohort.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/cad_hf_cohort.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/copd_readmission.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/covid_death.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/covid_ventilation.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/discharge_home_death.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/hf_readmission.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/hospitalization.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/hospitalization_mortality.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/t2dm_hf_cohort.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/queries/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/queries/measurement_queries.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/tools/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/tools/download_omop_tables.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/utils/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/utils/spark_utils.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data.egg-info/dependency_links.txt +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data.egg-info/requires.txt +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data.egg-info/top_level.txt +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/integration_tests/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/integration_tests/test_generate_training_data.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/integration_tests/test_hf_readmission.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/pyspark_test_base.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/unit_tests/__init__.py +0 -0
- {cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/unit_tests/test_spark_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cehrbert_data
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: The Spark ETL tools for generating the CEHR-BERT and CEHR-GPT pre-training and finetuning data
|
|
5
5
|
Author-email: Chao Pang <chaopang229@gmail.com>, Xinzhuo Jiang <xj2193@cumc.columbia.edu>, Krishna Kalluri <kk3326@cumc.columbia.edu>, Nishanth Parameshwar Pavinkurve <np2689@cumc.columbia.edu>, Karthik Natarajan <kn2174@cumc.columbia.edu>
|
|
6
6
|
License: MIT License
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_training_data.py
RENAMED
|
@@ -23,6 +23,7 @@ from cehrbert_data.utils.spark_utils import (
|
|
|
23
23
|
get_measurement_table,
|
|
24
24
|
validate_table_names,
|
|
25
25
|
)
|
|
26
|
+
from cehrbert_data.utils.logging_utils import add_console_logging
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
def main(
|
|
@@ -333,6 +334,9 @@ if __name__ == "__main__":
|
|
|
333
334
|
|
|
334
335
|
ARGS = parser.parse_args()
|
|
335
336
|
|
|
337
|
+
# Enable logging
|
|
338
|
+
add_console_logging()
|
|
339
|
+
|
|
336
340
|
main(
|
|
337
341
|
ARGS.input_folder,
|
|
338
342
|
ARGS.output_folder,
|
|
@@ -22,6 +22,7 @@ from cehrbert_data.utils.spark_utils import (
|
|
|
22
22
|
get_descendant_concept_ids,
|
|
23
23
|
preprocess_domain_table,
|
|
24
24
|
)
|
|
25
|
+
from cehrbert_data.utils.logging_utils import add_console_logging
|
|
25
26
|
|
|
26
27
|
from ..cohorts.query_builder import ENTRY_COHORT, NEGATIVE_COHORT, QueryBuilder
|
|
27
28
|
|
|
@@ -677,6 +678,10 @@ def create_prediction_cohort(
|
|
|
677
678
|
:param ehr_table_list:
|
|
678
679
|
:return:
|
|
679
680
|
"""
|
|
681
|
+
# Add logging to spark application output when enable_logging is set to True
|
|
682
|
+
if spark_args.enable_logging:
|
|
683
|
+
add_console_logging()
|
|
684
|
+
|
|
680
685
|
# Toggle the prior/post observation_period depending on the is_window_post_index flag
|
|
681
686
|
prior_observation_period = (
|
|
682
687
|
0 if spark_args.is_window_post_index else spark_args.observation_window + spark_args.hold_off_window
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def add_console_logging():
|
|
6
|
+
root = logging.getLogger()
|
|
7
|
+
root.setLevel(logging.INFO)
|
|
8
|
+
|
|
9
|
+
handler = logging.StreamHandler(sys.stdout)
|
|
10
|
+
handler.setLevel(logging.DEBUG)
|
|
11
|
+
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
12
|
+
handler.setFormatter(formatter)
|
|
@@ -82,6 +82,12 @@ def create_spark_args():
|
|
|
82
82
|
--single_contribution: Whether patients should contribute only once to the training data.
|
|
83
83
|
"""
|
|
84
84
|
parser = argparse.ArgumentParser(description="Arguments for spark applications for generating cohort definitions")
|
|
85
|
+
parser.add_argument(
|
|
86
|
+
"--enable_logging",
|
|
87
|
+
dest="enable_logging",
|
|
88
|
+
action="store_true",
|
|
89
|
+
help="Indicate whether we should log the info to the spark-submit output",
|
|
90
|
+
)
|
|
85
91
|
parser.add_argument(
|
|
86
92
|
"-c",
|
|
87
93
|
"--cohort_name",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cehrbert_data
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: The Spark ETL tools for generating the CEHR-BERT and CEHR-GPT pre-training and finetuning data
|
|
5
5
|
Author-email: Chao Pang <chaopang229@gmail.com>, Xinzhuo Jiang <xj2193@cumc.columbia.edu>, Krishna Kalluri <kk3326@cumc.columbia.edu>, Nishanth Parameshwar Pavinkurve <np2689@cumc.columbia.edu>, Karthik Natarajan <kn2174@cumc.columbia.edu>
|
|
6
6
|
License: MIT License
|
|
@@ -118,6 +118,7 @@ src/cehrbert_data/queries/measurement_queries.py
|
|
|
118
118
|
src/cehrbert_data/tools/__init__.py
|
|
119
119
|
src/cehrbert_data/tools/download_omop_tables.py
|
|
120
120
|
src/cehrbert_data/utils/__init__.py
|
|
121
|
+
src/cehrbert_data/utils/logging_utils.py
|
|
121
122
|
src/cehrbert_data/utils/spark_parse_args.py
|
|
122
123
|
src/cehrbert_data/utils/spark_utils.py
|
|
123
124
|
tests/__init__.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/._SUCCESS.crc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_ancestor/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/concept_relationship/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/condition_occurrence/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/drug_exposure/._SUCCESS.crc
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/._SUCCESS.crc
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/observation_period/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/procedure_occurrence/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/._SUCCESS.crc
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/sample_data/omop_sample/visit_occurrence/_SUCCESS
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_included_concept_list.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_information_content.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/apps/generate_required_labs.py
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/atrial_fibrillation.py
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/coronary_artery_disease.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/cohorts/last_visit_discharged_home.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/clinical_event_decorator.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/decorators/death_event_decorator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/cad_cabg_cohort.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/cad_hf_cohort.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/copd_readmission.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/covid_death.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/hf_readmission.py
RENAMED
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/hospitalization.py
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/prediction_cohorts/t2dm_hf_cohort.py
RENAMED
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/src/cehrbert_data/queries/measurement_queries.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cehrbert_data-0.0.3 → cehrbert_data-0.0.4}/tests/integration_tests/test_generate_training_data.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|