generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
project.yaml
93 lines (81 loc) · 2.77 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
version: '3.0'
expectations:
population_size: 3000
actions:
generate_study_population:
run: >
cohortextractor:latest generate_cohort
--study-definition study_definition
--index-date-range "2019-04-01 to 2022-03-01 by month"
--output-format='csv.gz'
outputs:
highly_sensitive:
cohort: output/input_*.csv.gz
generate_ethnicity_cohort:
run: >
cohortextractor:latest generate_cohort
--study-definition study_definition_ethnicity
--output-format='csv.gz'
outputs:
highly_sensitive:
cohort: output/input_ethnicity.csv.gz
join_cohorts:
run: >
cohort-joiner:v0.0.44
--lhs output/input_20*.csv.gz
--rhs output/input_ethnicity.csv.gz
--output-dir output/joined
needs: [generate_study_population, generate_ethnicity_cohort]
outputs:
highly_sensitive:
cohort: output/joined/input_*.csv.gz
## generate Structured Medication Review Measures and plots
generate_measures_all_reviews:
run: >
cohortextractor:latest generate_measures
--study-definition study_definition
--output-dir=output/joined
needs: [join_cohorts]
outputs:
moderately_sensitive:
measure_csv: output/joined/measure_*_*_rate.csv
generate_deciles_charts:
run: >
deciles-charts:v0.0.33
--input-files output/joined/measure_*_practice_rate.csv
--output-dir output/joined
config:
show_outer_percentiles: false
tables:
output: true
charts:
output: true
needs: [generate_measures_all_reviews]
outputs:
moderately_sensitive:
deciles_charts: output/joined/deciles_*_*.*
redact_and_round:
run: python:latest python analysis/redact_and_round.py
needs: [generate_measures_all_reviews]
outputs:
moderately_sensitive:
cohort: output/redacted/redacted_measure_*.csv
generate_plots:
run: python:latest python analysis/plots.py
needs: [generate_measures_all_reviews, redact_and_round]
outputs:
moderately_sensitive:
cohort: output/figures/*_*_rate.jpeg
generate_table_1:
run: python:latest python analysis/table_1.py --study_def_paths="output/joined/input_*.csv.gz" --demographics="age_band,sex,region,imdQ5,ethnicity,learning_disability,care_home_type" --outcome "had_smr"
needs: [join_cohorts]
outputs:
moderately_sensitive:
counts: output/table_1.csv
had_outcome: output/table_1_had_outcome.csv
generate_codeuse_output:
run: python:latest python analysis/code_use_summary.py --study_def_paths="output/joined/input_*.csv.gz" --codelistfile="user-chriswood-medication-review.csv"
needs: [join_cohorts]
outputs:
moderately_sensitive:
code_counts: output/codeuse.csv