cehrbert-data 0.0.1__tar.gz → 0.0.2__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.
Files changed (126) hide show
  1. cehrbert_data-0.0.2/.github/workflows/python-build.yml +93 -0
  2. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/PKG-INFO +1 -1
  3. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/spark_app_base.py +56 -49
  4. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data.egg-info/PKG-INFO +1 -1
  5. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data.egg-info/SOURCES.txt +2 -0
  6. cehrbert_data-0.0.2/tests/integration_tests/__init__.py +0 -0
  7. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/.github/workflows/tests.yml +0 -0
  8. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/.gitignore +0 -0
  9. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/.pre-commit-config.yaml +0 -0
  10. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/LICENSE +0 -0
  11. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/README.md +0 -0
  12. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/pyproject.toml +0 -0
  13. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/._SUCCESS.crc +0 -0
  14. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/.part-00000-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
  15. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/.part-00003-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
  16. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/.part-00010-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc +0 -0
  17. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/_SUCCESS +0 -0
  18. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/part-00000-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
  19. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/part-00003-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
  20. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept/part-00010-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet +0 -0
  21. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/._SUCCESS.crc +0 -0
  22. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/.part-00000-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
  23. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/.part-00002-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
  24. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/.part-00006-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
  25. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/.part-00011-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
  26. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/.part-00013-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet.crc +0 -0
  27. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/_SUCCESS +0 -0
  28. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/part-00000-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
  29. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/part-00002-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
  30. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/part-00006-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
  31. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/part-00011-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
  32. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_ancestor/part-00013-eafbd8be-3337-46da-89d3-20f79c2565d4-c000.snappy.parquet +0 -0
  33. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/._SUCCESS.crc +0 -0
  34. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/.part-00000-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
  35. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/.part-00002-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
  36. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/.part-00007-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
  37. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/.part-00012-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet.crc +0 -0
  38. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/_SUCCESS +0 -0
  39. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/part-00000-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
  40. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/part-00002-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
  41. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/part-00007-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
  42. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/concept_relationship/part-00012-5752b472-8ba7-4189-ab69-8c92e46443aa-c000.snappy.parquet +0 -0
  43. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/condition_occurrence/._SUCCESS.crc +0 -0
  44. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/condition_occurrence/.part-00000-4eff03a1-cdcf-4c89-b0cd-9ce590b9b1eb-c000.snappy.parquet.crc +0 -0
  45. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/condition_occurrence/_SUCCESS +0 -0
  46. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/condition_occurrence/part-00000-4eff03a1-cdcf-4c89-b0cd-9ce590b9b1eb-c000.snappy.parquet +0 -0
  47. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/drug_exposure/._SUCCESS.crc +0 -0
  48. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/drug_exposure/.part-00000-10bbf1a4-a7da-416e-9703-58609c7edfad-c000.snappy.parquet.crc +0 -0
  49. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/drug_exposure/_SUCCESS +0 -0
  50. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/drug_exposure/part-00000-10bbf1a4-a7da-416e-9703-58609c7edfad-c000.snappy.parquet +0 -0
  51. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/observation_period/._SUCCESS.crc +0 -0
  52. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/observation_period/.part-00000-694316e5-cc95-49f1-9fad-5a7f377e2602-c000.snappy.parquet.crc +0 -0
  53. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/observation_period/_SUCCESS +0 -0
  54. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/observation_period/part-00000-694316e5-cc95-49f1-9fad-5a7f377e2602-c000.snappy.parquet +0 -0
  55. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/person/._SUCCESS.crc +0 -0
  56. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/person/.part-00000-7d789011-f361-48da-af6f-cfe102978b3a-c000.snappy.parquet.crc +0 -0
  57. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/person/_SUCCESS +0 -0
  58. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/person/part-00000-7d789011-f361-48da-af6f-cfe102978b3a-c000.snappy.parquet +0 -0
  59. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/procedure_occurrence/._SUCCESS.crc +0 -0
  60. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/procedure_occurrence/.part-00000-e73003c1-aed5-41c0-b2d4-eaccaccf044a-c000.snappy.parquet.crc +0 -0
  61. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/procedure_occurrence/_SUCCESS +0 -0
  62. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/procedure_occurrence/part-00000-e73003c1-aed5-41c0-b2d4-eaccaccf044a-c000.snappy.parquet +0 -0
  63. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/visit_occurrence/._SUCCESS.crc +0 -0
  64. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/visit_occurrence/.part-00000-e874b5f1-bf9e-4cb9-93bf-c309a47b0476-c000.snappy.parquet.crc +0 -0
  65. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/visit_occurrence/_SUCCESS +0 -0
  66. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/sample_data/omop_sample/visit_occurrence/part-00000-e874b5f1-bf9e-4cb9-93bf-c309a47b0476-c000.snappy.parquet +0 -0
  67. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/setup.cfg +0 -0
  68. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/__init__.py +0 -0
  69. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/__init__.py +0 -0
  70. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/__init__.py +0 -0
  71. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_concept_similarity_table.py +0 -0
  72. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_hierarchical_bert_training_data.py +0 -0
  73. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_included_concept_list.py +0 -0
  74. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_information_content.py +0 -0
  75. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_required_labs.py +0 -0
  76. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/apps/generate_training_data.py +0 -0
  77. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/__init__.py +0 -0
  78. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/atrial_fibrillation.py +0 -0
  79. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/cabg.py +0 -0
  80. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/coronary_artery_disease.py +0 -0
  81. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/covid.py +0 -0
  82. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/covid_inpatient.py +0 -0
  83. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/death.py +0 -0
  84. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/heart_failure.py +0 -0
  85. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/ischemic_stroke.py +0 -0
  86. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/last_visit_discharged_home.py +0 -0
  87. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/query_builder.py +0 -0
  88. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/type_two_diabietes.py +0 -0
  89. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/cohorts/ventilation.py +0 -0
  90. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/config/__init__.py +0 -0
  91. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/config/output_names.py +0 -0
  92. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/const/__init__.py +0 -0
  93. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/const/__pycache__/__init__.cpython-311.pyc +0 -0
  94. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/const/__pycache__/common.cpython-311.pyc +0 -0
  95. /cehrbert_data-0.0.1/src/cehrbert_data/decorators/__init__.py → /cehrbert_data-0.0.2/src/cehrbert_data/const/artificial_tokens.py +0 -0
  96. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/const/common.py +0 -0
  97. {cehrbert_data-0.0.1/src/cehrbert_data/prediction_cohorts → cehrbert_data-0.0.2/src/cehrbert_data/decorators}/__init__.py +0 -0
  98. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/decorators/__pycache__/__init__.cpython-311.pyc +0 -0
  99. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/decorators/__pycache__/patient_event_decorator.cpython-311.pyc +0 -0
  100. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/decorators/patient_event_decorator.py +0 -0
  101. {cehrbert_data-0.0.1/src/cehrbert_data/queries → cehrbert_data-0.0.2/src/cehrbert_data/prediction_cohorts}/__init__.py +0 -0
  102. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/afib_ischemic_stroke.py +0 -0
  103. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/cad_cabg_cohort.py +0 -0
  104. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/cad_hf_cohort.py +0 -0
  105. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/copd_readmission.py +0 -0
  106. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/covid_death.py +0 -0
  107. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/covid_ventilation.py +0 -0
  108. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/discharge_home_death.py +0 -0
  109. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/hf_readmission.py +0 -0
  110. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/hospitalization.py +0 -0
  111. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/hospitalization_mortality.py +0 -0
  112. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/prediction_cohorts/t2dm_hf_cohort.py +0 -0
  113. {cehrbert_data-0.0.1/src/cehrbert_data/tools → cehrbert_data-0.0.2/src/cehrbert_data/queries}/__init__.py +0 -0
  114. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/queries/measurement_unit_stats_query.py +0 -0
  115. {cehrbert_data-0.0.1/src/cehrbert_data/utils → cehrbert_data-0.0.2/src/cehrbert_data/tools}/__init__.py +0 -0
  116. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/tools/download_omop_tables.py +0 -0
  117. {cehrbert_data-0.0.1/tests → cehrbert_data-0.0.2/src/cehrbert_data/utils}/__init__.py +0 -0
  118. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/utils/spark_parse_args.py +0 -0
  119. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data/utils/spark_utils.py +0 -0
  120. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data.egg-info/dependency_links.txt +0 -0
  121. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data.egg-info/requires.txt +0 -0
  122. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/src/cehrbert_data.egg-info/top_level.txt +0 -0
  123. {cehrbert_data-0.0.1/tests/integration_tests → cehrbert_data-0.0.2/tests}/__init__.py +0 -0
  124. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/tests/integration_tests/test_generate_training_data.py +0 -0
  125. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/tests/integration_tests/test_hf_readmission.py +0 -0
  126. {cehrbert_data-0.0.1 → cehrbert_data-0.0.2}/tests/pyspark_test_base.py +0 -0
@@ -0,0 +1,93 @@
1
+ name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2
+
3
+ on: push
4
+
5
+ jobs:
6
+ build:
7
+ name: Build distribution 📦
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - name: Set up Python
13
+ uses: actions/setup-python@v4
14
+ with:
15
+ python-version: "3.x"
16
+ - name: Install pypa/build
17
+ run: >-
18
+ python3 -m
19
+ pip install
20
+ build
21
+ --user
22
+ - name: Build a binary wheel and a source tarball
23
+ run: python3 -m build
24
+ - name: Store the distribution packages
25
+ uses: actions/upload-artifact@v4
26
+ with:
27
+ name: python-package-distributions
28
+ path: dist/
29
+
30
+ publish-to-pypi:
31
+ name: >-
32
+ Publish Python 🐍 distribution 📦 to PyPI
33
+ if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
34
+ needs:
35
+ - build
36
+ runs-on: ubuntu-latest
37
+ environment:
38
+ name: pypi
39
+ url: https://pypi.org/p/cehrbert-data # Replace <package-name> with your PyPI project name
40
+ permissions:
41
+ id-token: write # IMPORTANT: mandatory for trusted publishing
42
+
43
+ steps:
44
+ - name: Download all the dists
45
+ uses: actions/download-artifact@v4
46
+ with:
47
+ name: python-package-distributions
48
+ path: dist/
49
+ - name: Publish distribution 📦 to PyPI
50
+ uses: pypa/gh-action-pypi-publish@release/v1
51
+
52
+ github-release:
53
+ name: >-
54
+ Sign the Python 🐍 distribution 📦 with Sigstore
55
+ and upload them to GitHub Release
56
+ needs:
57
+ - publish-to-pypi
58
+ runs-on: ubuntu-latest
59
+
60
+ permissions:
61
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
62
+ id-token: write # IMPORTANT: mandatory for sigstore
63
+
64
+ steps:
65
+ - name: Download all the dists
66
+ uses: actions/download-artifact@v4
67
+ with:
68
+ name: python-package-distributions
69
+ path: dist/
70
+ - name: Sign the dists with Sigstore
71
+ uses: sigstore/gh-action-sigstore-python@v2.1.1
72
+ with:
73
+ inputs: >-
74
+ ./dist/*.tar.gz
75
+ ./dist/*.whl
76
+ - name: Create GitHub Release
77
+ env:
78
+ GITHUB_TOKEN: ${{ github.token }}
79
+ run: >-
80
+ gh release create
81
+ '${{ github.ref_name }}'
82
+ --repo '${{ github.repository }}'
83
+ --notes ""
84
+ - name: Upload artifact signatures to GitHub Release
85
+ env:
86
+ GITHUB_TOKEN: ${{ github.token }}
87
+ # Upload to GitHub Release using the `gh` CLI.
88
+ # `dist/` contains the built packages, and the
89
+ # sigstore-produced signatures and certificates.
90
+ run: >-
91
+ gh release upload
92
+ '${{ github.ref_name }}' dist/**
93
+ --repo '${{ github.repository }}'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cehrbert_data
3
- Version: 0.0.1
3
+ Version: 0.0.2
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
@@ -87,16 +87,16 @@ class BaseCohortBuilder(ABC):
87
87
  cohort_required_columns = ["person_id", "index_date", "visit_occurrence_id"]
88
88
 
89
89
  def __init__(
90
- self,
91
- query_builder: QueryBuilder,
92
- input_folder: str,
93
- output_folder: str,
94
- date_lower_bound: str,
95
- date_upper_bound: str,
96
- age_lower_bound: int,
97
- age_upper_bound: int,
98
- prior_observation_period: int,
99
- post_observation_period: int,
90
+ self,
91
+ query_builder: QueryBuilder,
92
+ input_folder: str,
93
+ output_folder: str,
94
+ date_lower_bound: str,
95
+ date_upper_bound: str,
96
+ age_lower_bound: int,
97
+ age_upper_bound: int,
98
+ prior_observation_period: int,
99
+ post_observation_period: int,
100
100
  ):
101
101
 
102
102
  self._query_builder = query_builder
@@ -256,41 +256,41 @@ class BaseCohortBuilder(ABC):
256
256
 
257
257
  class NestedCohortBuilder:
258
258
  def __init__(
259
- self,
260
- cohort_name: str,
261
- input_folder: str,
262
- output_folder: str,
263
- target_cohort: DataFrame,
264
- outcome_cohort: DataFrame,
265
- ehr_table_list: List[str],
266
- observation_window: int,
267
- hold_off_window: int,
268
- prediction_start_days: int,
269
- prediction_window: int,
270
- num_of_visits: int,
271
- num_of_concepts: int,
272
- patient_splits_folder: str = None,
273
- is_window_post_index: bool = False,
274
- include_visit_type: bool = True,
275
- allow_measurement_only: bool = False,
276
- exclude_visit_tokens: bool = False,
277
- is_feature_concept_frequency: bool = False,
278
- is_roll_up_concept: bool = False,
279
- include_concept_list: bool = True,
280
- is_new_patient_representation: bool = False,
281
- gpt_patient_sequence: bool = False,
282
- is_hierarchical_bert: bool = False,
283
- classic_bert_seq: bool = False,
284
- is_first_time_outcome: bool = False,
285
- is_questionable_outcome_existed: bool = False,
286
- is_remove_index_prediction_starts: bool = False,
287
- is_prediction_window_unbounded: bool = False,
288
- is_observation_window_unbounded: bool = False,
289
- is_population_estimation: bool = False,
290
- att_type: AttType = AttType.CEHR_BERT,
291
- exclude_demographic: bool = True,
292
- use_age_group: bool = False,
293
- single_contribution: bool = False,
259
+ self,
260
+ cohort_name: str,
261
+ input_folder: str,
262
+ output_folder: str,
263
+ target_cohort: DataFrame,
264
+ outcome_cohort: DataFrame,
265
+ ehr_table_list: List[str],
266
+ observation_window: int,
267
+ hold_off_window: int,
268
+ prediction_start_days: int,
269
+ prediction_window: int,
270
+ num_of_visits: int,
271
+ num_of_concepts: int,
272
+ patient_splits_folder: str = None,
273
+ is_window_post_index: bool = False,
274
+ include_visit_type: bool = True,
275
+ allow_measurement_only: bool = False,
276
+ exclude_visit_tokens: bool = False,
277
+ is_feature_concept_frequency: bool = False,
278
+ is_roll_up_concept: bool = False,
279
+ include_concept_list: bool = True,
280
+ is_new_patient_representation: bool = False,
281
+ gpt_patient_sequence: bool = False,
282
+ is_hierarchical_bert: bool = False,
283
+ classic_bert_seq: bool = False,
284
+ is_first_time_outcome: bool = False,
285
+ is_questionable_outcome_existed: bool = False,
286
+ is_remove_index_prediction_starts: bool = False,
287
+ is_prediction_window_unbounded: bool = False,
288
+ is_observation_window_unbounded: bool = False,
289
+ is_population_estimation: bool = False,
290
+ att_type: AttType = AttType.CEHR_BERT,
291
+ exclude_demographic: bool = True,
292
+ use_age_group: bool = False,
293
+ single_contribution: bool = False,
294
294
  ):
295
295
  self._cohort_name = cohort_name
296
296
  self._input_folder = input_folder
@@ -494,6 +494,13 @@ class NestedCohortBuilder:
494
494
  .where(F.col("num_of_concepts") >= self._num_of_concepts)
495
495
  )
496
496
 
497
+ # Add time_to_event
498
+ cohort = cohort.withColumn(
499
+ "study_end_date",
500
+ F.coalesce(F.col("outcome_date"), F.date_add(cohort.index_date, self._prediction_window))
501
+ )
502
+ cohort = cohort.withColumn("time_to_event", F.datediff("study_end_date", "index_date"))
503
+
497
504
  # if patient_splits is provided, we will
498
505
  if self._patient_splits_folder:
499
506
  patient_splits = self.spark.read.parquet(self._patient_splits_folder)
@@ -623,10 +630,10 @@ class NestedCohortBuilder:
623
630
 
624
631
 
625
632
  def create_prediction_cohort(
626
- spark_args,
627
- target_query_builder: QueryBuilder,
628
- outcome_query_builder: QueryBuilder,
629
- ehr_table_list,
633
+ spark_args,
634
+ target_query_builder: QueryBuilder,
635
+ outcome_query_builder: QueryBuilder,
636
+ ehr_table_list,
630
637
  ):
631
638
  """
632
639
  TODO.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cehrbert_data
3
- Version: 0.0.1
3
+ Version: 0.0.2
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
@@ -3,6 +3,7 @@
3
3
  LICENSE
4
4
  README.md
5
5
  pyproject.toml
6
+ .github/workflows/python-build.yml
6
7
  .github/workflows/tests.yml
7
8
  sample_data/omop_sample/concept/._SUCCESS.crc
8
9
  sample_data/omop_sample/concept/.part-00000-4b12270c-f6c8-4b59-8e0f-fd588bd79386-c000.snappy.parquet.crc
@@ -89,6 +90,7 @@ src/cehrbert_data/cohorts/ventilation.py
89
90
  src/cehrbert_data/config/__init__.py
90
91
  src/cehrbert_data/config/output_names.py
91
92
  src/cehrbert_data/const/__init__.py
93
+ src/cehrbert_data/const/artificial_tokens.py
92
94
  src/cehrbert_data/const/common.py
93
95
  src/cehrbert_data/const/__pycache__/__init__.cpython-311.pyc
94
96
  src/cehrbert_data/const/__pycache__/common.cpython-311.pyc
File without changes
File without changes
File without changes
File without changes