generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
163 lines (139 loc) · 5.75 KB
/
project.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
version: "3.0"
expectations:
population_size: 1000
actions:
generate_study_population_population:
run: cohortextractor:latest generate_cohort --study-definition study_definition_population --index-date-range "2019-01-01 to 2023-05-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_population*.feather
join_ethnicity_population:
run: >
cohort-joiner:v0.0.46
--lhs output/input_population_20*.feather
--rhs output/input_ethnicity.feather
--output-dir output/joined
needs: [generate_study_population_population, generate_study_population_ethnicity]
outputs:
highly_sensitive:
cohort: output/joined/input_population_20*.feather
get_moved_count:
run: python:latest python analysis/population_count.py
needs: [join_ethnicity_population]
outputs:
moderately_sensitive:
text: output/move*.json
generate_study_population_1:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2019-01-01 to 2019-12-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_*.feather
generate_study_population_2:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2020-01-01 to 2020-12-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input*.feather
generate_study_population_3:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2021-01-01 to 2021-06-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/inpu*.feather
generate_study_population_4:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2021-07-01 to 2021-12-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/in*.feather
generate_study_population_5:
run: cohortextractor:latest generate_cohort --study-definition study_definition --index-date-range "2022-01-01 to 2023-05-01 by month" --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/i*.feather
generate_study_population_ethnicity:
run: cohortextractor:latest generate_cohort --study-definition study_definition_ethnicity --output-dir=output --output-format=feather
outputs:
highly_sensitive:
cohort: output/input_ethnicity.feather
join_ethnicity:
run: python:latest python analysis/join_ethnicity.py
needs:
[
generate_study_population_1,
generate_study_population_2,
generate_study_population_3,
generate_study_population_4,
generate_study_population_5,
generate_study_population_ethnicity,
]
outputs:
highly_sensitive:
cohort: output/inp*.feather
get_patient_count:
run: python:latest python analysis/get_patients_counts.py
needs: [join_ethnicity]
outputs:
moderately_sensitive:
text: output/patient_count.json
get_practice_count:
run: python:latest python analysis/get_practice_count.py
needs: [join_ethnicity]
outputs:
moderately_sensitive:
text: output/practice_count.json
generate_measures:
run: cohortextractor:latest generate_measures --study-definition study_definition --output-dir=output
needs: [join_ethnicity]
outputs:
moderately_sensitive:
measure_csv: output/measure_*_rate.csv
generate_measures_cleaned:
run: python:latest python analysis/clean_measures.py
needs: [generate_measures]
outputs:
moderately_sensitive:
measure_csv: output/measure_cleaned_*.csv
generate_notebook:
run: jupyter:latest jupyter nbconvert /workspace/analysis/sentinel_measures.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs:
[
generate_measures,
generate_measures_cleaned,
get_practice_count,
get_patient_count,
]
outputs:
moderately_sensitive:
notebook: output/sentinel_measures.html
subplots: output/sentinel_measures_subplots.png
code_tables: output/code_table_*.csv
events_count: output/event_count.json
generate_notebook_updating:
run: jupyter:latest jupyter nbconvert /workspace/analysis/sentinel_measures_updating.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs:
[
generate_measures,
generate_measures_cleaned,
get_practice_count,
get_patient_count,
]
outputs:
moderately_sensitive:
notebook: output/sentinel_measures_updating.html
code_tables: output/code_table*.csv
practices: output/num_practices_included*.csv
run_tests:
run: python:latest python -m pytest --junit-xml=output/pytest.xml --verbose
outputs:
moderately_sensitive:
log: output/pytest.xml
measures_ehrql:
run: ehrql:v0 generate-measures analysis/dataset_definition.py --output output/measures.csv
outputs:
moderately_sensitive:
measure_csv: output/measures.csv
generate_notebook_updating_ehrql:
run: jupyter:latest jupyter nbconvert /workspace/analysis/sentinel_measures_updating_ehrql.ipynb --execute --to html --template basic --output-dir=/workspace/output --ExecutePreprocessor.timeout=86400 --no-input
needs:
[measures_ehrql]
outputs:
moderately_sensitive:
notebook: output/sentinel_measures_updating_ehrql.html