cumulus-library-pcx 0.4.0__py3-none-any.whl

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 (214) hide show
  1. cumulus_library_pcx/__init__.py +1 -0
  2. cumulus_library_pcx/casedef.toml +39 -0
  3. cumulus_library_pcx/client_views.toml +36 -0
  4. cumulus_library_pcx/counts.toml +15 -0
  5. cumulus_library_pcx/elastic_upload.toml +6 -0
  6. cumulus_library_pcx/eligible.toml +12 -0
  7. cumulus_library_pcx/llm/schemas/pcx-diagnosis-annotation.json +321 -0
  8. cumulus_library_pcx/llm/schemas/pcx-document-topic-annotation.json +133 -0
  9. cumulus_library_pcx/llm/schemas/pcx-document-type-annotation.json +80 -0
  10. cumulus_library_pcx/llm/schemas/pcx-event-annotation.json +160 -0
  11. cumulus_library_pcx/llm/schemas/pcx-laboratory-annotation.json +316 -0
  12. cumulus_library_pcx/llm/schemas/pcx-metastasis-annotation.json +229 -0
  13. cumulus_library_pcx/llm/schemas/pcx-molecular-annotation.json +209 -0
  14. cumulus_library_pcx/llm/schemas/pcx-radiation-annotation.json +331 -0
  15. cumulus_library_pcx/llm/schemas/pcx-registry-eligibility-annotation.json +138 -0
  16. cumulus_library_pcx/llm/schemas/pcx-response-annotation.json +136 -0
  17. cumulus_library_pcx/llm/schemas/pcx-surgery-annotation.json +164 -0
  18. cumulus_library_pcx/llm/schemas/pcx-survival-timeline-annotation.json +268 -0
  19. cumulus_library_pcx/llm/schemas/pcx-systemic-therapy-annotation.json +657 -0
  20. cumulus_library_pcx/llm/schemas/pcx-transition-of-care-annotation.json +269 -0
  21. cumulus_library_pcx/llm_clinical_wide.toml +27 -0
  22. cumulus_library_pcx/llm_document_wide.toml +8 -0
  23. cumulus_library_pcx/llm_schema.toml +7 -0
  24. cumulus_library_pcx/manifest.toml +112 -0
  25. cumulus_library_pcx/nlp_clinical_tasks.workflow +102 -0
  26. cumulus_library_pcx/nlp_document_tasks.workflow +49 -0
  27. cumulus_library_pcx/outcome.toml +10 -0
  28. cumulus_library_pcx/qa_athena.toml +52 -0
  29. cumulus_library_pcx/sample.toml +60 -0
  30. cumulus_library_pcx/spreadsheet/age_group.csv +122 -0
  31. cumulus_library_pcx/spreadsheet/casedef.csv +56 -0
  32. cumulus_library_pcx/spreadsheet/client_dictionary.csv +217 -0
  33. cumulus_library_pcx/spreadsheet/data_dictionary.csv +239 -0
  34. cumulus_library_pcx/spreadsheet/dx_atrt.csv +5 -0
  35. cumulus_library_pcx/spreadsheet/dx_brain_cancer.csv +25 -0
  36. cumulus_library_pcx/spreadsheet/dx_medulloblastoma.csv +8 -0
  37. cumulus_library_pcx/spreadsheet/dx_methotrexate_toxic.csv +26 -0
  38. cumulus_library_pcx/spreadsheet/dx_radiation.csv +6 -0
  39. cumulus_library_pcx/spreadsheet/file_upload_casedef.toml +13 -0
  40. cumulus_library_pcx/spreadsheet/file_upload_client_views.toml +18 -0
  41. cumulus_library_pcx/spreadsheet/file_upload_population.toml +61 -0
  42. cumulus_library_pcx/spreadsheet/file_upload_study_variable.toml +225 -0
  43. cumulus_library_pcx/spreadsheet/include_age_at_visit.csv +2 -0
  44. cumulus_library_pcx/spreadsheet/include_gender.csv +5 -0
  45. cumulus_library_pcx/spreadsheet/include_obs_category.csv +2 -0
  46. cumulus_library_pcx/spreadsheet/include_study_period.csv +2 -0
  47. cumulus_library_pcx/spreadsheet/include_utilization.csv +2 -0
  48. cumulus_library_pcx/spreadsheet/lab_absolute_neutrophil_count.csv +3 -0
  49. cumulus_library_pcx/spreadsheet/lab_alt.csv +10 -0
  50. cumulus_library_pcx/spreadsheet/lab_ast.csv +7 -0
  51. cumulus_library_pcx/spreadsheet/lab_creatinine.csv +9 -0
  52. cumulus_library_pcx/spreadsheet/lab_hemoglobin.csv +34 -0
  53. cumulus_library_pcx/spreadsheet/lab_platelets.csv +10 -0
  54. cumulus_library_pcx/spreadsheet/lab_total_bilirubin.csv +2 -0
  55. cumulus_library_pcx/spreadsheet/proc_craniotomy.csv +16 -0
  56. cumulus_library_pcx/spreadsheet/proc_radiation.csv +19 -0
  57. cumulus_library_pcx/spreadsheet/rx_chemo_carboplatin.csv +5 -0
  58. cumulus_library_pcx/spreadsheet/rx_chemo_cisplatin.csv +4 -0
  59. cumulus_library_pcx/spreadsheet/rx_chemo_cyclophosphamide.csv +21 -0
  60. cumulus_library_pcx/spreadsheet/rx_chemo_etoposide.csv +11 -0
  61. cumulus_library_pcx/spreadsheet/rx_chemo_thiotepa.csv +14 -0
  62. cumulus_library_pcx/spreadsheet/rx_chemo_vincristine.csv +11 -0
  63. cumulus_library_pcx/spreadsheet/rx_contrast_methotrexate.csv +87 -0
  64. cumulus_library_pcx/sql/custom/client_diagnosis.sql +154 -0
  65. cumulus_library_pcx/sql/custom/client_dictionary_coverage.sql +88 -0
  66. cumulus_library_pcx/sql/custom/client_encounter.sql +88 -0
  67. cumulus_library_pcx/sql/custom/client_exposure.sql +66 -0
  68. cumulus_library_pcx/sql/custom/client_outcome.sql +159 -0
  69. cumulus_library_pcx/sql/custom/client_subject.sql +110 -0
  70. cumulus_library_pcx/sql/custom/client_timeline.sql +1829 -0
  71. cumulus_library_pcx/sql/custom/client_timeline_latest.sql +52 -0
  72. cumulus_library_pcx/sql/custom/eligible.sql +64 -0
  73. cumulus_library_pcx/sql/custom/eligible_dx.sql +79 -0
  74. cumulus_library_pcx/sql/custom/eligible_radiation.sql +74 -0
  75. cumulus_library_pcx/sql/custom/eligible_rx.sql +125 -0
  76. cumulus_library_pcx/sql/custom/eligible_surgery.sql +64 -0
  77. cumulus_library_pcx/sql/custom/eligible_trial.sql +21 -0
  78. cumulus_library_pcx/sql/custom/outcome.sql +58 -0
  79. cumulus_library_pcx/sql/custom/outcome_exposure.sql +70 -0
  80. cumulus_library_pcx/sql/custom/outcome_first_event.sql +77 -0
  81. cumulus_library_pcx/sql/custom/outcome_vital_status.sql +72 -0
  82. cumulus_library_pcx/sql/custom/pcx__cohort_casedef_include.sql +62 -0
  83. cumulus_library_pcx/sql/generated/pcx__cohort_casedef.sql +139 -0
  84. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_candidate.sql +75 -0
  85. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_dx.sql +31 -0
  86. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_exclude.sql +8 -0
  87. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_include.sql +10 -0
  88. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_lab.sql +31 -0
  89. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_proc.sql +31 -0
  90. cumulus_library_pcx/sql/generated/pcx__cohort_casedef_rx.sql +31 -0
  91. cumulus_library_pcx/sql/generated/pcx__cohort_dx_atrt.sql +7 -0
  92. cumulus_library_pcx/sql/generated/pcx__cohort_dx_brain_cancer.sql +7 -0
  93. cumulus_library_pcx/sql/generated/pcx__cohort_dx_medulloblastoma.sql +7 -0
  94. cumulus_library_pcx/sql/generated/pcx__cohort_dx_methotrexate_toxic.sql +7 -0
  95. cumulus_library_pcx/sql/generated/pcx__cohort_dx_radiation.sql +7 -0
  96. cumulus_library_pcx/sql/generated/pcx__cohort_lab_absolute_neutrophil_count.sql +7 -0
  97. cumulus_library_pcx/sql/generated/pcx__cohort_lab_alt.sql +7 -0
  98. cumulus_library_pcx/sql/generated/pcx__cohort_lab_ast.sql +7 -0
  99. cumulus_library_pcx/sql/generated/pcx__cohort_lab_creatinine.sql +7 -0
  100. cumulus_library_pcx/sql/generated/pcx__cohort_lab_hemoglobin.sql +7 -0
  101. cumulus_library_pcx/sql/generated/pcx__cohort_lab_platelets.sql +7 -0
  102. cumulus_library_pcx/sql/generated/pcx__cohort_lab_total_bilirubin.sql +7 -0
  103. cumulus_library_pcx/sql/generated/pcx__cohort_proc_craniotomy.sql +7 -0
  104. cumulus_library_pcx/sql/generated/pcx__cohort_proc_radiation.sql +7 -0
  105. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_carboplatin.sql +7 -0
  106. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_cisplatin.sql +7 -0
  107. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_cyclophosphamide.sql +7 -0
  108. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_etoposide.sql +7 -0
  109. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_thiotepa.sql +7 -0
  110. cumulus_library_pcx/sql/generated/pcx__cohort_rx_chemo_vincristine.sql +7 -0
  111. cumulus_library_pcx/sql/generated/pcx__cohort_rx_contrast_methotrexate.sql +7 -0
  112. cumulus_library_pcx/sql/generated/pcx__cohort_study_period.sql +60 -0
  113. cumulus_library_pcx/sql/generated/pcx__cohort_study_population.sql +60 -0
  114. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_allergy.sql +133 -0
  115. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_diag.sql +146 -0
  116. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_doc.sql +114 -0
  117. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_dx.sql +112 -0
  118. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_enc.sql +42 -0
  119. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_lab.sql +167 -0
  120. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_lab_base.sql +35 -0
  121. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_obs.sql +137 -0
  122. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_obs_base.sql +75 -0
  123. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_proc.sql +118 -0
  124. cumulus_library_pcx/sql/generated/pcx__cohort_study_population_rx.sql +138 -0
  125. cumulus_library_pcx/sql/generated/pcx__cohort_timeline.sql +31 -0
  126. cumulus_library_pcx/sql/generated/pcx__cohort_variable_union.sql +71 -0
  127. cumulus_library_pcx/sql/generated/pcx__cohort_variable_union_dx.sql +23 -0
  128. cumulus_library_pcx/sql/generated/pcx__cohort_variable_union_lab.sql +25 -0
  129. cumulus_library_pcx/sql/generated/pcx__cohort_variable_union_proc.sql +20 -0
  130. cumulus_library_pcx/sql/generated/pcx__cohort_variable_union_rx.sql +25 -0
  131. cumulus_library_pcx/sql/generated/pcx__cohort_variable_wide.sql +61 -0
  132. cumulus_library_pcx/sql/generated/pcx__cohort_variable_wide_dx.sql +26 -0
  133. cumulus_library_pcx/sql/generated/pcx__cohort_variable_wide_lab.sql +41 -0
  134. cumulus_library_pcx/sql/generated/pcx__cohort_variable_wide_proc.sql +12 -0
  135. cumulus_library_pcx/sql/generated/pcx__cohort_variable_wide_rx.sql +34 -0
  136. cumulus_library_pcx/sql/generated/pcx__counts.workflow +223 -0
  137. cumulus_library_pcx/sql/generated/pcx__elastic_union.sql +15 -0
  138. cumulus_library_pcx/sql/generated/pcx__llm_diagnosis_wide.sql +23 -0
  139. cumulus_library_pcx/sql/generated/pcx__llm_document_topic_wide.sql +46 -0
  140. cumulus_library_pcx/sql/generated/pcx__llm_document_type_wide.sql +16 -0
  141. cumulus_library_pcx/sql/generated/pcx__llm_event_wide.sql +25 -0
  142. cumulus_library_pcx/sql/generated/pcx__llm_laboratory_result.sql +28 -0
  143. cumulus_library_pcx/sql/generated/pcx__llm_laboratory_toxicity.sql +24 -0
  144. cumulus_library_pcx/sql/generated/pcx__llm_metastasis_site.sql +20 -0
  145. cumulus_library_pcx/sql/generated/pcx__llm_metastasis_wide.sql +24 -0
  146. cumulus_library_pcx/sql/generated/pcx__llm_molecular_alteration.sql +23 -0
  147. cumulus_library_pcx/sql/generated/pcx__llm_molecular_report.sql +21 -0
  148. cumulus_library_pcx/sql/generated/pcx__llm_radiation_wide.sql +36 -0
  149. cumulus_library_pcx/sql/generated/pcx__llm_registry_eligibility_wide.sql +47 -0
  150. cumulus_library_pcx/sql/generated/pcx__llm_response_wide.sql +23 -0
  151. cumulus_library_pcx/sql/generated/pcx__llm_surgery_wide.sql +25 -0
  152. cumulus_library_pcx/sql/generated/pcx__llm_survival_timeline_anchor.sql +21 -0
  153. cumulus_library_pcx/sql/generated/pcx__llm_survival_timeline_follow_up.sql +20 -0
  154. cumulus_library_pcx/sql/generated/pcx__llm_survival_timeline_wide.sql +19 -0
  155. cumulus_library_pcx/sql/generated/pcx__llm_systemic_therapy_administration.sql +30 -0
  156. cumulus_library_pcx/sql/generated/pcx__llm_systemic_therapy_agent.sql +27 -0
  157. cumulus_library_pcx/sql/generated/pcx__llm_systemic_therapy_cycle.sql +26 -0
  158. cumulus_library_pcx/sql/generated/pcx__llm_systemic_therapy_regimen.sql +24 -0
  159. cumulus_library_pcx/sql/generated/pcx__llm_systemic_therapy_stem_cell_infusion.sql +24 -0
  160. cumulus_library_pcx/sql/generated/pcx__llm_transition_of_care_wide.sql +23 -0
  161. cumulus_library_pcx/sql/generated/pcx__meta_date.sql +17 -0
  162. cumulus_library_pcx/sql/generated/pcx__meta_version.sql +2 -0
  163. cumulus_library_pcx/sql/generated/pcx__sample_casedef.sql +102 -0
  164. cumulus_library_pcx/sql/generated/pcx__sample_casedef_author.sql +7 -0
  165. cumulus_library_pcx/sql/generated/pcx__sample_casedef_dx.sql +10 -0
  166. cumulus_library_pcx/sql/generated/pcx__sample_casedef_lab.sql +10 -0
  167. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri.sql +103 -0
  168. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri_limit_note_50.sql +17 -0
  169. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri_limit_patient_10.sql +17 -0
  170. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri_post.sql +103 -0
  171. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri_post_limit_note_50.sql +17 -0
  172. cumulus_library_pcx/sql/generated/pcx__sample_casedef_peri_post_limit_patient_10.sql +17 -0
  173. cumulus_library_pcx/sql/generated/pcx__sample_casedef_post.sql +103 -0
  174. cumulus_library_pcx/sql/generated/pcx__sample_casedef_post_limit_note_50.sql +17 -0
  175. cumulus_library_pcx/sql/generated/pcx__sample_casedef_post_limit_patient_10.sql +17 -0
  176. cumulus_library_pcx/sql/generated/pcx__sample_casedef_pre.sql +103 -0
  177. cumulus_library_pcx/sql/generated/pcx__sample_casedef_pre_limit_note_50.sql +17 -0
  178. cumulus_library_pcx/sql/generated/pcx__sample_casedef_pre_limit_patient_10.sql +17 -0
  179. cumulus_library_pcx/sql/generated/pcx__sample_casedef_proc.sql +10 -0
  180. cumulus_library_pcx/sql/generated/pcx__sample_casedef_rx.sql +10 -0
  181. cumulus_library_pcx/sql/generated/pcx__sample_task.sql +17 -0
  182. cumulus_library_pcx/study_meta.toml +15 -0
  183. cumulus_library_pcx/study_population.toml +43 -0
  184. cumulus_library_pcx/study_variable.toml +33 -0
  185. cumulus_library_pcx/study_variable_wide.toml +33 -0
  186. cumulus_library_pcx/tests/sql/custom/pcx__qa_study_period_bounds.sql +39 -0
  187. cumulus_library_pcx/tests/sql/custom/pcx__qa_study_population_utilization.sql +36 -0
  188. cumulus_library_pcx/tests/sql/custom/pcx__qa_union.sql +6 -0
  189. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_age_disagree.sql +40 -0
  190. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_age_near_36_month_boundary.sql +33 -0
  191. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_dx_date_disagree_fhir_before_llm.sql +30 -0
  192. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_dx_date_disagree_llm_before_fhir.sql +31 -0
  193. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_dx_subtype_conflict.sql +54 -0
  194. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_radiation_evidence_conflict.sql +55 -0
  195. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_rx_llm_agent_unrecognized.sql +45 -0
  196. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_subject_missing_patient.sql +41 -0
  197. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_surgery_evidence.sql +71 -0
  198. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_surgery_timing.sql +70 -0
  199. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_t0_after_condition_date.sql +43 -0
  200. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_t0_anchor_disagree.sql +36 -0
  201. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_t0_missing.sql +39 -0
  202. cumulus_library_pcx/tests/sql/custom/pcx__warn_eligible_therapy_precedes_t0.sql +64 -0
  203. cumulus_library_pcx/tests/sql/custom/pcx__warn_llm_date_after_note.sql +75 -0
  204. cumulus_library_pcx/tests/sql/custom/pcx__warn_llm_date_coarse.sql +60 -0
  205. cumulus_library_pcx/tests/sql/custom/pcx__warn_outcome_exposure_after_first_event.sql +41 -0
  206. cumulus_library_pcx/tests/sql/custom/pcx__warn_outcome_exposure_order_only.sql +59 -0
  207. cumulus_library_pcx/tests/sql/custom/pcx__warn_outcome_first_event_timing.sql +73 -0
  208. cumulus_library_pcx/tests/sql/custom/pcx__warn_outcome_survival_days.sql +39 -0
  209. cumulus_library_pcx/tests/sql/custom/pcx__warn_outcome_vital_status_conflict.sql +67 -0
  210. cumulus_library_pcx/tests/sql/custom/pcx__warn_study_period_null_end.sql +27 -0
  211. cumulus_library_pcx/tests/sql/custom/pcx__warn_union.sql +66 -0
  212. cumulus_library_pcx-0.4.0.dist-info/METADATA +7 -0
  213. cumulus_library_pcx-0.4.0.dist-info/RECORD +214 -0
  214. cumulus_library_pcx-0.4.0.dist-info/WHEEL +4 -0
@@ -0,0 +1 @@
1
+ """PCX study for Cumulus Library: rendered SQL and data files, no code."""
@@ -0,0 +1,39 @@
1
+ [[actions]]
2
+ label = "case definition CSV upload"
3
+ type = "build:parallel"
4
+ files = [
5
+ "spreadsheet/file_upload_casedef.toml",
6
+ ]
7
+
8
+ [[actions]]
9
+ label = "filter include/exclude"
10
+ type = "build:serial"
11
+ files = [
12
+ "sql/generated/pcx__cohort_casedef_candidate.sql",
13
+ "sql/generated/pcx__cohort_casedef_exclude.sql",
14
+ "sql/generated/pcx__cohort_casedef_include.sql",
15
+ ]
16
+
17
+ [[actions]]
18
+ label = "cohort from case definition (valueset_casedef)"
19
+ type = "build:serial"
20
+ files = [
21
+ "sql/generated/pcx__cohort_casedef.sql",
22
+ ]
23
+
24
+ [[actions]]
25
+ label = "cohort for case definition aspects (dx, rx, lab, proc)"
26
+ type = "build:serial"
27
+ files = [
28
+ "sql/generated/pcx__cohort_casedef_dx.sql",
29
+ "sql/generated/pcx__cohort_casedef_lab.sql",
30
+ "sql/generated/pcx__cohort_casedef_proc.sql",
31
+ "sql/generated/pcx__cohort_casedef_rx.sql",
32
+ ]
33
+
34
+ [[actions]]
35
+ label = "timeline for casedef with variables"
36
+ type = "build:serial"
37
+ files = [
38
+ "sql/generated/pcx__cohort_timeline.sql",
39
+ ]
@@ -0,0 +1,36 @@
1
+ [[actions]]
2
+ label = "Study inputs"
3
+ type = "build:parallel"
4
+ files = [
5
+ "spreadsheet/file_upload_client_views.toml",
6
+ ]
7
+ skip_by_default = true
8
+
9
+ [[actions]]
10
+ label = "client_views"
11
+ type = "build:serial"
12
+ files = [
13
+ "sql/custom/client_subject.sql",
14
+ "sql/custom/client_diagnosis.sql",
15
+ "sql/custom/client_encounter.sql",
16
+ "sql/custom/client_exposure.sql",
17
+ "sql/custom/client_timeline.sql",
18
+ "sql/custom/client_timeline_latest.sql",
19
+ "sql/custom/client_outcome.sql",
20
+ "sql/custom/client_dictionary_coverage.sql",
21
+ ]
22
+ skip_by_default = true
23
+
24
+ [[actions]]
25
+ label = "Analysis-ready tables"
26
+ type = "export:flat"
27
+ tables = [
28
+ "pcx__client_subject",
29
+ "pcx__client_diagnosis",
30
+ "pcx__client_encounter",
31
+ "pcx__client_exposure",
32
+ "pcx__client_timeline",
33
+ "pcx__client_outcome",
34
+ "pcx__client_dictionary_coverage",
35
+ ]
36
+ skip_by_default = true
@@ -0,0 +1,15 @@
1
+ [[actions]]
2
+ label = "Shared and site-only counts"
3
+ type = "build:serial"
4
+ files = [
5
+ "sql/generated/pcx__counts.workflow",
6
+ ]
7
+ skip_by_default = true
8
+
9
+ [[actions]]
10
+ label = "Shared counts only"
11
+ type = "export:counts"
12
+ tables = [
13
+ "sql/generated/pcx__counts.workflow",
14
+ ]
15
+ skip_by_default = true
@@ -0,0 +1,6 @@
1
+ [[actions]]
2
+ label = "elastic_output union tasks"
3
+ type = "build:serial"
4
+ files = [
5
+ "sql/generated/pcx__elastic_union.sql",
6
+ ]
@@ -0,0 +1,12 @@
1
+ [[actions]]
2
+ label = "eligible"
3
+ type = "build:serial"
4
+ files = [
5
+ "sql/custom/eligible_dx.sql",
6
+ "sql/custom/eligible_surgery.sql",
7
+ "sql/custom/eligible_rx.sql",
8
+ "sql/custom/eligible_radiation.sql",
9
+ "sql/custom/eligible.sql",
10
+ "sql/custom/eligible_trial.sql",
11
+ ]
12
+ skip_by_default = true
@@ -0,0 +1,321 @@
1
+ {
2
+ "$defs": {
3
+ "AgeAtDiagnosisMention": {
4
+ "description": "Patient's age at initial diagnosis in completed months. Extract only if explicitly\nstated. Preserve all ages; age at definitive surgery is a separate trial criterion.",
5
+ "properties": {
6
+ "has_mention": {
7
+ "description": "Indicates whether the concept was mentioned in the text.",
8
+ "title": "Has Mention",
9
+ "type": "boolean"
10
+ },
11
+ "spans": {
12
+ "description": "The verbatim text where this concept was mentioned.",
13
+ "items": {
14
+ "type": "string"
15
+ },
16
+ "title": "Spans",
17
+ "type": "array"
18
+ },
19
+ "age_at_diagnosis_months": {
20
+ "anyOf": [
21
+ {
22
+ "maximum": 1500,
23
+ "minimum": 0,
24
+ "type": "integer"
25
+ },
26
+ {
27
+ "type": "null"
28
+ }
29
+ ],
30
+ "default": null,
31
+ "description": "Explicit age at initial diagnosis in completed months (e.g. '2 years' -> 24); not age at definitive surgery. Null if unstated.",
32
+ "title": "Age At Diagnosis Months"
33
+ }
34
+ },
35
+ "required": [
36
+ "has_mention",
37
+ "spans"
38
+ ],
39
+ "title": "AgeAtDiagnosisMention",
40
+ "type": "object"
41
+ },
42
+ "ChangMStage": {
43
+ "description": "Chang metastasis stage (Chang M-stage). Direct-extraction fallback; the derived\nstage is to be adjudicated downstream from the metastasis.py staging inputs.",
44
+ "enum": [
45
+ "M0",
46
+ "M1",
47
+ "M2",
48
+ "M3",
49
+ "M4",
50
+ "NONE_OF_THE_ABOVE"
51
+ ],
52
+ "title": "ChangMStage",
53
+ "type": "string"
54
+ },
55
+ "ChangMStageMention": {
56
+ "description": "Documented Chang metastasis stage (M-stage) at diagnosis/staging, when stated\ndirectly. Do not derive it from imaging or cytology here; the derived stage is\nadjudicated downstream from the metastasis.py inputs.",
57
+ "properties": {
58
+ "has_mention": {
59
+ "description": "Indicates whether the concept was mentioned in the text.",
60
+ "title": "Has Mention",
61
+ "type": "boolean"
62
+ },
63
+ "spans": {
64
+ "description": "The verbatim text where this concept was mentioned.",
65
+ "items": {
66
+ "type": "string"
67
+ },
68
+ "title": "Spans",
69
+ "type": "array"
70
+ },
71
+ "chang_m_stage": {
72
+ "$ref": "#/$defs/ChangMStage",
73
+ "default": "NONE_OF_THE_ABOVE",
74
+ "description": "M0: no metastasis (localized). M1: positive CSF cytology only. M2: intracranial metastasis beyond primary. M3: spinal/leptomeningeal metastasis. M4: metastasis outside the CNS. NONE_OF_THE_ABOVE: M-stage not documented."
75
+ }
76
+ },
77
+ "required": [
78
+ "has_mention",
79
+ "spans"
80
+ ],
81
+ "title": "ChangMStageMention",
82
+ "type": "object"
83
+ },
84
+ "DatePrecision": {
85
+ "description": "Precision supported by the source text for a date field; null when the date is null.\nDAY: day, month and year explicitly stated.\nMONTH: month and year explicitly stated.\nYEAR: only the year explicitly stated.",
86
+ "enum": [
87
+ "DAY",
88
+ "MONTH",
89
+ "YEAR"
90
+ ],
91
+ "title": "DatePrecision",
92
+ "type": "string"
93
+ },
94
+ "DiagnosisDateGoldMention": {
95
+ "description": "Date of the confirmatory ('gold standard') tissue diagnosis: prefer the surgery /\nbiopsy procedure date that produced the diagnostic specimen over a later report date.\nNot necessarily the definitive surgery.",
96
+ "properties": {
97
+ "has_mention": {
98
+ "description": "Indicates whether the concept was mentioned in the text.",
99
+ "title": "Has Mention",
100
+ "type": "boolean"
101
+ },
102
+ "spans": {
103
+ "description": "The verbatim text where this concept was mentioned.",
104
+ "items": {
105
+ "type": "string"
106
+ },
107
+ "title": "Spans",
108
+ "type": "array"
109
+ },
110
+ "diagnosis_date_gold": {
111
+ "anyOf": [
112
+ {
113
+ "type": "string"
114
+ },
115
+ {
116
+ "type": "null"
117
+ }
118
+ ],
119
+ "default": null,
120
+ "description": "Confirmatory tissue-diagnosis date, ISO YYYY-MM-DD, first-of-period if coarse. Null if unstated.",
121
+ "title": "Diagnosis Date Gold"
122
+ },
123
+ "diagnosis_date_gold_precision": {
124
+ "anyOf": [
125
+ {
126
+ "$ref": "#/$defs/DatePrecision"
127
+ },
128
+ {
129
+ "type": "null"
130
+ }
131
+ ],
132
+ "default": null,
133
+ "description": "Precision for diagnosis_date_gold. Null when diagnosis_date_gold is null."
134
+ }
135
+ },
136
+ "required": [
137
+ "has_mention",
138
+ "spans"
139
+ ],
140
+ "title": "DiagnosisDateGoldMention",
141
+ "type": "object"
142
+ },
143
+ "DiagnosisDateMention": {
144
+ "description": "Date the patient was first diagnosed with this embryonal tumor. If several dates\nappear, use the earliest diagnosis date.",
145
+ "properties": {
146
+ "has_mention": {
147
+ "description": "Indicates whether the concept was mentioned in the text.",
148
+ "title": "Has Mention",
149
+ "type": "boolean"
150
+ },
151
+ "spans": {
152
+ "description": "The verbatim text where this concept was mentioned.",
153
+ "items": {
154
+ "type": "string"
155
+ },
156
+ "title": "Spans",
157
+ "type": "array"
158
+ },
159
+ "diagnosis_date": {
160
+ "anyOf": [
161
+ {
162
+ "type": "string"
163
+ },
164
+ {
165
+ "type": "null"
166
+ }
167
+ ],
168
+ "default": null,
169
+ "description": "Earliest diagnosis date, ISO YYYY-MM-DD (first-of-period if coarse). Null if not stated.",
170
+ "title": "Diagnosis Date"
171
+ },
172
+ "diagnosis_date_precision": {
173
+ "anyOf": [
174
+ {
175
+ "$ref": "#/$defs/DatePrecision"
176
+ },
177
+ {
178
+ "type": "null"
179
+ }
180
+ ],
181
+ "default": null,
182
+ "description": "Precision supported by the text for diagnosis_date. Null when diagnosis_date is null."
183
+ }
184
+ },
185
+ "required": [
186
+ "has_mention",
187
+ "spans"
188
+ ],
189
+ "title": "DiagnosisDateMention",
190
+ "type": "object"
191
+ },
192
+ "DiseaseSubtype": {
193
+ "description": "Embryonal diagnoses, including exclusions and historical classifications.",
194
+ "enum": [
195
+ "ATRT",
196
+ "MEDULLOBLASTOMA",
197
+ "ETMR",
198
+ "PINEOBLASTOMA",
199
+ "LEGACY_SPNET",
200
+ "OTHER_CNS_EMBRYONAL",
201
+ "NONE_OF_THE_ABOVE"
202
+ ],
203
+ "title": "DiseaseSubtype",
204
+ "type": "string"
205
+ },
206
+ "DiseaseSubtypeMention": {
207
+ "description": "The patient's documented CNS embryonal tumor diagnosis. Choose the single best\nsubtype supported by pathology/molecular text in THIS note. Do not extract negated,\nrule-out, suspected/probable, or family-history diagnoses.",
208
+ "properties": {
209
+ "has_mention": {
210
+ "description": "Indicates whether the concept was mentioned in the text.",
211
+ "title": "Has Mention",
212
+ "type": "boolean"
213
+ },
214
+ "spans": {
215
+ "description": "The verbatim text where this concept was mentioned.",
216
+ "items": {
217
+ "type": "string"
218
+ },
219
+ "title": "Spans",
220
+ "type": "array"
221
+ },
222
+ "disease_subtype": {
223
+ "$ref": "#/$defs/DiseaseSubtype",
224
+ "default": "NONE_OF_THE_ABOVE",
225
+ "description": "Documented diagnosis using only evidence from this note. Choose exactly one. ATRT: atypical teratoid/rhabdoid tumor, AT/RT, malignant rhabdoid tumor of the CNS. Record ATRT as an exclusion/reclassification; do not infer it from a marker alone. MEDULLOBLASTOMA: medulloblastoma of any histology or molecular group (WNT, SHH, Group 3, Group 4), include medullomyoblastoma and MBEN. ETMR: embryonal tumor with multilayered rosettes. PINEOBLASTOMA: pineoblastoma. LEGACY_SPNET: historical supratentorial PNET/CNS-PNET without a modern diagnosis. OTHER_CNS_EMBRYONAL: other embryonal CNS tumor or embryonal tumor NOS. NONE_OF_THE_ABOVE: no embryonal-tumor diagnosis is documented in this note."
226
+ },
227
+ "historical_diagnosis_term": {
228
+ "anyOf": [
229
+ {
230
+ "type": "string"
231
+ },
232
+ {
233
+ "type": "null"
234
+ }
235
+ ],
236
+ "default": null,
237
+ "description": "A deprecated or legacy (pre-WHO-CNS5) diagnosis term the note uses for THIS tumor -- e.g. 'PNET', 'CNS-PNET', 'supratentorial PNET', 'cerebellar sarcoma', 'medulloblastoma variant'. Capture the exact historical phrase verbatim so a downstream crosswalk can review it against a current diagnosis; do not infer a modern entity from a legacy term. Null when the note uses only current integrated-diagnosis terminology, or no such term is stated. Do not record family-history, negated, or rule-out terms.",
238
+ "title": "Historical Diagnosis Term"
239
+ }
240
+ },
241
+ "required": [
242
+ "has_mention",
243
+ "spans"
244
+ ],
245
+ "title": "DiseaseSubtypeMention",
246
+ "type": "object"
247
+ },
248
+ "MedulloblastomaHistology": {
249
+ "description": "WHO histologic pattern of medulloblastoma (distinct from molecular group).",
250
+ "enum": [
251
+ "CLASSIC",
252
+ "DESMOPLASTIC_NODULAR",
253
+ "EXTENSIVE_NODULARITY_MBEN",
254
+ "LARGE_CELL_ANAPLASTIC",
255
+ "NONE_OF_THE_ABOVE"
256
+ ],
257
+ "title": "MedulloblastomaHistology",
258
+ "type": "string"
259
+ },
260
+ "MedulloblastomaHistologyMention": {
261
+ "description": "Histologic pattern when the diagnosis is medulloblastoma. Leave NONE_OF_THE_ABOVE if\nthe histologic pattern is not stated or the tumor is not a medulloblastoma.",
262
+ "properties": {
263
+ "has_mention": {
264
+ "description": "Indicates whether the concept was mentioned in the text.",
265
+ "title": "Has Mention",
266
+ "type": "boolean"
267
+ },
268
+ "spans": {
269
+ "description": "The verbatim text where this concept was mentioned.",
270
+ "items": {
271
+ "type": "string"
272
+ },
273
+ "title": "Spans",
274
+ "type": "array"
275
+ },
276
+ "histology": {
277
+ "$ref": "#/$defs/MedulloblastomaHistology",
278
+ "default": "NONE_OF_THE_ABOVE",
279
+ "description": "Choose exactly one. CLASSIC: classic medulloblastoma. DESMOPLASTIC_NODULAR: desmoplastic/nodular. EXTENSIVE_NODULARITY_MBEN: medulloblastoma with extensive nodularity (MBEN). LARGE_CELL_ANAPLASTIC: large-cell and/or anaplastic. NONE_OF_THE_ABOVE: histologic pattern not stated or not a medulloblastoma."
280
+ }
281
+ },
282
+ "required": [
283
+ "has_mention",
284
+ "spans"
285
+ ],
286
+ "title": "MedulloblastomaHistologyMention",
287
+ "type": "object"
288
+ }
289
+ },
290
+ "description": "Extract confirmed patient-specific diagnoses, including documented history.\nExclude suspected, negated, rule-out, and family-history diagnoses. Preserve\nexact diagnosis/site wording and legacy terms without inferring modern entities.\nMolecular classification is handled separately. Unknown findings do not imply\neligibility or exclusion. Extract only explicitly documented M-stage; do not\nderive it from imaging or cytology here. Histology is unknown when unstated or\nnot medulloblastoma. Every mention carries verbatim spans; has_mention must agree\nwith the spans.",
291
+ "properties": {
292
+ "disease_subtype": {
293
+ "$ref": "#/$defs/DiseaseSubtypeMention"
294
+ },
295
+ "medulloblastoma_histology": {
296
+ "$ref": "#/$defs/MedulloblastomaHistologyMention"
297
+ },
298
+ "chang_m_stage": {
299
+ "$ref": "#/$defs/ChangMStageMention"
300
+ },
301
+ "age_at_diagnosis": {
302
+ "$ref": "#/$defs/AgeAtDiagnosisMention"
303
+ },
304
+ "diagnosis_date": {
305
+ "$ref": "#/$defs/DiagnosisDateMention"
306
+ },
307
+ "diagnosis_date_gold": {
308
+ "$ref": "#/$defs/DiagnosisDateGoldMention"
309
+ }
310
+ },
311
+ "required": [
312
+ "disease_subtype",
313
+ "medulloblastoma_histology",
314
+ "chang_m_stage",
315
+ "age_at_diagnosis",
316
+ "diagnosis_date",
317
+ "diagnosis_date_gold"
318
+ ],
319
+ "title": "DiagnosisAnnotation",
320
+ "type": "object"
321
+ }
@@ -0,0 +1,133 @@
1
+ {
2
+ "$defs": {
3
+ "TopicRelevance": {
4
+ "description": "Highest level of patient-specific evidence for a requested topic.",
5
+ "enum": [
6
+ "EXPLICIT",
7
+ "IMPLICIT",
8
+ "NONE_OF_THE_ABOVE"
9
+ ],
10
+ "title": "TopicRelevance",
11
+ "type": "string"
12
+ },
13
+ "TopicRelevanceMention": {
14
+ "description": "Classify one fixed PCX topic using patient-specific document evidence.",
15
+ "properties": {
16
+ "has_mention": {
17
+ "description": "Indicates whether the concept was mentioned in the text.",
18
+ "title": "Has Mention",
19
+ "type": "boolean"
20
+ },
21
+ "spans": {
22
+ "description": "The verbatim text where this concept was mentioned.",
23
+ "items": {
24
+ "type": "string"
25
+ },
26
+ "title": "Spans",
27
+ "type": "array"
28
+ },
29
+ "relevance": {
30
+ "$ref": "#/$defs/TopicRelevance",
31
+ "default": "NONE_OF_THE_ABOVE",
32
+ "description": "Explicit negative tests and non-receipt statements are relevant to staging, treatment, molecular testing and eligibility. Exclude hypothetical/rule-out disease and family history unless requested. EXPLICIT: the topic is directly named or measured for this patient. IMPLICIT: only when the document contains the topic-specific supporting facts in the parent field description. NONE_OF_THE_ABOVE: neither level is supported."
33
+ },
34
+ "confidence": {
35
+ "anyOf": [
36
+ {
37
+ "maximum": 1.0,
38
+ "minimum": 0.0,
39
+ "type": "number"
40
+ },
41
+ {
42
+ "type": "null"
43
+ }
44
+ ],
45
+ "default": null,
46
+ "description": "Confidence in the relevance classification from 0.0 to 1.0.",
47
+ "title": "Confidence"
48
+ },
49
+ "reasoning": {
50
+ "anyOf": [
51
+ {
52
+ "type": "string"
53
+ },
54
+ {
55
+ "type": "null"
56
+ }
57
+ ],
58
+ "default": null,
59
+ "description": "One concise sentence applying the parent field definition to the cited spans. Null for NONE_OF_THE_ABOVE.",
60
+ "title": "Reasoning"
61
+ }
62
+ },
63
+ "required": [
64
+ "has_mention",
65
+ "spans"
66
+ ],
67
+ "title": "TopicRelevanceMention",
68
+ "type": "object"
69
+ }
70
+ },
71
+ "description": "Wide-friendly routing gate for the PCX extraction models.\n\nEach routing field matches its extraction module's filename without ``.py``.",
72
+ "properties": {
73
+ "response": {
74
+ "$ref": "#/$defs/TopicRelevanceMention",
75
+ "description": "Baseline measurable/evaluable disease, CR/PR/SD/PD, end-induction or end-consolidation assessment, including explicitly negative MRI/CSF findings."
76
+ },
77
+ "diagnosis": {
78
+ "$ref": "#/$defs/TopicRelevanceMention",
79
+ "description": "ATRT, medulloblastoma, other CNS embryonal diagnosis, WHO-CNS5 integrated diagnosis, primary site, or diagnosis date."
80
+ },
81
+ "molecular": {
82
+ "$ref": "#/$defs/TopicRelevanceMention",
83
+ "description": "Medulloblastoma subgroup, MYC/MYCN, chromosome alterations, assay provenance, WNT/SHH/Group 3/Group 4, methylation class, or a qualifying pathology and molecular report."
84
+ },
85
+ "event": {
86
+ "$ref": "#/$defs/TopicRelevanceMention",
87
+ "description": "Initial diagnosis, progression, recurrence, refractory disease, second malignancy, second primary, death, response, or current disease status."
88
+ },
89
+ "metastasis": {
90
+ "$ref": "#/$defs/TopicRelevanceMention",
91
+ "description": "Chang M stage, brain/spine metastatic imaging, CSF cytology, leptomeningeal spread, or extraneural metastatic disease."
92
+ },
93
+ "surgery": {
94
+ "$ref": "#/$defs/TopicRelevanceMention",
95
+ "description": "Tumor biopsy/resection, surgery date, procedure type, or extent of resection."
96
+ },
97
+ "radiation": {
98
+ "$ref": "#/$defs/TopicRelevanceMention",
99
+ "description": "Radiation course, modality, field, start/stop date, craniospinal or focal treatment, and dose."
100
+ },
101
+ "systemic_therapy": {
102
+ "$ref": "#/$defs/TopicRelevanceMention",
103
+ "description": "Chemotherapy protocol, regimen, cycle, administered agent, dose, route, high-dose methotrexate, induction/consolidation, stem-cell rescue or prior treatment."
104
+ },
105
+ "laboratory": {
106
+ "$ref": "#/$defs/TopicRelevanceMention",
107
+ "description": "Hemoglobin, platelets, absolute neutrophils, creatinine, ALT, AST, bilirubin, creatinine clearance/measured GFR, MTX level, or documented toxicity. Include explicit normal and abnormal results; absent testing is not a negative result."
108
+ },
109
+ "survival_timeline": {
110
+ "$ref": "#/$defs/TopicRelevanceMention",
111
+ "description": "Initial tumor-detecting MRI date, vital status, last known alive date, death date, event-free follow-up, definitive surgery, treatment initiation or actual trial enrollment."
112
+ },
113
+ "registry_eligibility": {
114
+ "$ref": "#/$defs/TopicRelevanceMention",
115
+ "description": "ACNS0334 comparability: age at definitive surgery, newly diagnosed high-risk embryonal disease, ATRT exclusion/reclassification, pretreatment history or renal/hepatic/cardiac/pulmonary/marrow adequacy. Include explicit negatives."
116
+ }
117
+ },
118
+ "required": [
119
+ "response",
120
+ "diagnosis",
121
+ "molecular",
122
+ "event",
123
+ "metastasis",
124
+ "surgery",
125
+ "radiation",
126
+ "systemic_therapy",
127
+ "laboratory",
128
+ "survival_timeline",
129
+ "registry_eligibility"
130
+ ],
131
+ "title": "DocumentTopicAnnotation",
132
+ "type": "object"
133
+ }
@@ -0,0 +1,80 @@
1
+ {
2
+ "$defs": {
3
+ "DocumentType": {
4
+ "description": "Primary purpose and producing service of a clinical document. Mutually exclusive.",
5
+ "enum": [
6
+ "OPERATIVE_NOTE",
7
+ "PATHOLOGY_REPORT",
8
+ "IMAGING_REPORT",
9
+ "GENETICS_DOCUMENT",
10
+ "TREATMENT_ADMINISTRATION_RECORD",
11
+ "RADIATION_ONCOLOGY_NOTE",
12
+ "TUMOR_BOARD_NOTE",
13
+ "RESEARCH_PROTOCOL_DOCUMENT",
14
+ "TRANSFER_DOCUMENT",
15
+ "DISCHARGE_SUMMARY",
16
+ "END_OF_LIFE_DOCUMENT",
17
+ "NEUROSURGERY_NOTE",
18
+ "ONCOLOGY_NOTE",
19
+ "NONE_OF_THE_ABOVE"
20
+ ],
21
+ "title": "DocumentType",
22
+ "type": "string"
23
+ },
24
+ "DocumentTypeMention": {
25
+ "description": "Classify one clinical document before task routing.\n\nSet ``has_mention`` to true when the title, headings, author or service, or body\nprovides classification evidence, and put the shortest verbatim title, header, or\nsignature cue in ``spans``. Set ``has_mention`` to false, use ``NONE_OF_THE_ABOVE``, and return an\nempty span list only when the document is empty, unreadable, or too ambiguous to\nclassify.\n\nDocument type is a routing feature, not a clinical finding. It says which extraction\ntasks should read the note (DOCUMENT_TASKS), not what the note concludes.",
26
+ "properties": {
27
+ "has_mention": {
28
+ "description": "Indicates whether the concept was mentioned in the text.",
29
+ "title": "Has Mention",
30
+ "type": "boolean"
31
+ },
32
+ "spans": {
33
+ "description": "The verbatim text where this concept was mentioned.",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "title": "Spans",
38
+ "type": "array"
39
+ },
40
+ "document_type": {
41
+ "$ref": "#/$defs/DocumentType",
42
+ "default": "NONE_OF_THE_ABOVE",
43
+ "description": "\nAssign exactly one document type from the producing service and the document's primary\npurpose. Use the title, author or service, headings, and body together. Classify the\ndocument as a whole: a quoted pathology result, MRI impression, or operative history inside\na clinic note does not change the type of the note that quotes it. Types are defined so\nthat at most one applies. When two definitions could both fit, the EARLIER entry in this\nlist wins.\n\n1. END_OF_LIFE_DOCUMENT: the document records the patient's death or the transition to\n comfort-focused care: death note or death summary, pronouncement, autopsy consent or\n report, hospice enrollment or referral, palliative care consult whose purpose is\n end-of-life planning, DNR/DNI or goals-of-care documentation. Wins over every other type\n regardless of authoring service.\n\n2. RESEARCH_PROTOCOL_DOCUMENT: the document exists because of a clinical trial or registry:\n research consent, eligibility checklist, enrollment or randomization confirmation,\n on-study or off-study note, protocol deviation, study coordinator note, protocol\n treatment roadmap. Named-protocol treatment inside an ordinary oncology note is NOT this\n type.\n\n3. TRANSFER_DOCUMENT: the document moves care between institutions or carries another\n institution's information: inter-facility transfer or acceptance note, referral letter\n from or to an outside provider, outside-records summary or review, transport team record,\n a scanned or transcribed outside document (outside operative note, outside pathology,\n outside imaging). A discharge summary written here for a patient going elsewhere is a\n DISCHARGE_SUMMARY, not this.\n\n4. DISCHARGE_SUMMARY: a synopsis of a completed admission written at discharge: reason for\n admission, hospital course, procedures and treatment given, condition and disposition,\n follow-up. Includes chemotherapy-admission discharge summaries authored by oncology.\n Excludes ED discharge notes and nursing discharge instructions (NONE_OF_THE_ABOVE).\n\n5. OPERATIVE_NOTE: the surgeon's report of an operation: operative report, brief operative\n note, procedure note for a tumor resection, biopsy, shunt, EVD, or second-look surgery.\n Pre-operative and post-operative visit notes are NEUROSURGERY_NOTE, not this.\n\n6. PATHOLOGY_REPORT: a pathologist-signed interpretation of tissue or fluid: surgical\n pathology with final diagnosis, gross and microscopic description, immunohistochemistry,\n FISH, and any molecular or methylation addendum attached to the same accession, CSF or\n other cytology, autopsy neuropathology, and outside-slide consultation reports signed by\n a pathologist. A clinician's note discussing the pathology is not this.\n\n7. IMAGING_REPORT: a radiologist's read of a study: MRI brain or spine, CT, PET, ultrasound,\n with technique, findings, and impression. Includes staging and surveillance studies. A\n neuro-oncology note summarizing the MRI is not this.\n\n8. GENETICS_DOCUMENT: the document is about the patient's germline or inherited risk:\n clinical genetics or genetic counseling note, germline test result or panel report,\n cancer predisposition assessment, family pedigree. Tumor-only molecular results attached\n to a pathology accession are PATHOLOGY_REPORT, not this.\n\n9. TREATMENT_ADMINISTRATION_RECORD: a structured record of what was given rather than a\n narrative note: medication administration record, chemotherapy infusion or treatment\n flowsheet, chemotherapy order set or treatment plan/roadmap with doses and cycle days,\n pharmacy verification, stem-cell infusion record. If it has a narrative assessment and\n plan, it is a note, not this.\n\n10. TUMOR_BOARD_NOTE: a multidisciplinary tumor board or neuro-oncology conference\n summary: case presentation, integrated review of pathology, molecular, imaging and\n staging, and the consensus recommendation.\n\n11. RADIATION_ONCOLOGY_NOTE: any note authored by radiation oncology: consultation,\n simulation or planning note, on-treatment visit, end-of-treatment or completion\n summary, radiation follow-up. Includes notes recommending against or deferring\n radiation.\n\n12. NEUROSURGERY_NOTE: any non-operative note authored by neurosurgery: consultation,\n admission H&P, pre-operative and post-operative visits, inpatient progress, clinic\n follow-up, shunt or hydrocephalus management.\n\n13. ONCOLOGY_NOTE: any note authored by oncology, neuro-oncology, or hematology/oncology\n that is not one of the types above: new-patient consultation, admission H&P for\n chemotherapy, daily inpatient progress note, clinic visit, treatment planning note,\n interval history, off-therapy or survivorship visit, telephone or nurse-practitioner\n oncology note. This is the default for the treating team's own documentation.\n\n14. NONE_OF_THE_ABOVE: none of the types above. Either a clinical encounter note from\n any other service or setting (emergency department, PICU or critical care, general\n pediatrics or hospitalist, rehabilitation, physical or occupational or speech therapy,\n nutrition, endocrinology, ophthalmology, neurology, nursing, social work, psychology,\n anesthesia, ED discharge note, nursing discharge instructions), or not a clinical\n document at all or unclassifiable (administrative or billing note, consent unrelated\n to research, patient education, immunization record, medication list without\n administration data, telephone encounter with no clinical content, fax cover, records\n request, empty or unreadable document).\n"
44
+ },
45
+ "confidence": {
46
+ "anyOf": [
47
+ {
48
+ "maximum": 1.0,
49
+ "minimum": 0.0,
50
+ "type": "number"
51
+ },
52
+ {
53
+ "type": "null"
54
+ }
55
+ ],
56
+ "default": null,
57
+ "description": "Confidence in the document-type classification from 0.0 to 1.0. Use lower values when title, authoring service, and body point to different types.",
58
+ "title": "Confidence"
59
+ }
60
+ },
61
+ "required": [
62
+ "has_mention",
63
+ "spans"
64
+ ],
65
+ "title": "DocumentTypeMention",
66
+ "type": "object"
67
+ }
68
+ },
69
+ "description": "PCX document-type classification for one clinical document.",
70
+ "properties": {
71
+ "document_type": {
72
+ "$ref": "#/$defs/DocumentTypeMention"
73
+ }
74
+ },
75
+ "required": [
76
+ "document_type"
77
+ ],
78
+ "title": "DocumentTypeAnnotation",
79
+ "type": "object"
80
+ }