generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
project.yaml
675 lines (589 loc) · 29.6 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
version: '3.0'
expectations:
population_size: 5000
actions:
# Contemporary comparison data management:
# # Before matching data management:
generate_long_covid_exposure_dataset:
run:
ehrql:v0 generate-dataset
analysis/dataset_definition_unmatched_exp_lc.py
--output output/dataset_exp_lc_unmatched.csv
outputs:
highly_sensitive:
cohort: output/dataset_exp_lc_unmatched.csv
generate_list_gp_use_long_covid_dx:
run:
ehrql:v0 generate-dataset
analysis/dataset_definition_lc_gp_list.py
--output output/dataset_lc_gp_list.csv
outputs:
highly_sensitive:
cohort: output/dataset_lc_gp_list.csv
generate_dataset_comparator_exclude_gp_no_long_covid:
needs: [generate_list_gp_use_long_covid_dx]
run:
ehrql:v0 generate-dataset
analysis/dataset_definition_unmatched_comparator.py
--output output/dataset_comparator_unmatched.csv
outputs:
highly_sensitive:
cohort: output/dataset_comparator_unmatched.csv
# # OS matching
test_matching:
run:
python:latest python analysis/match_test.py
needs: [generate_dataset_comparator_exclude_gp_no_long_covid, generate_long_covid_exposure_dataset]
outputs:
highly_sensitive:
matched_cases: output/matched_cases_stp.csv
matched_matches: output/matched_matches_stp.csv
matched_all: output/matched_combined_stp.csv
moderately_sensitive:
matching_report: output/matching_report_stp.txt
# # After matching data management
import_matched_exposure_drug_cost:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_matched_cases_drug_costs.py
--output output/matched_cases_with_drug_costs.csv.gz
needs: [test_matching]
outputs:
highly_sensitive:
cohort: output/matched_cases_with_drug_costs.csv.gz
import_matched_controls_drug_costs:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_matched_control_drug_costs.py
--output output/matched_control_with_drug_costs.csv.gz
needs: [test_matching]
outputs:
highly_sensitive:
cohort: output/matched_control_with_drug_costs.csv.gz
# # After matching data management: for new version of data
import_matched_exposure_update:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_matched_cases_updated.py
--output output/matched_cases_with_ehr_update.csv.gz
needs: [test_matching]
outputs:
highly_sensitive:
cohort: output/matched_cases_with_ehr_update.csv.gz
import_matched_control_updates:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_matched_control_updated.py
--output output/matched_control_with_ehr_update.csv.gz
needs: [test_matching]
outputs:
highly_sensitive:
cohort: output/matched_control_with_ehr_update.csv.gz
# Historical comparison data management:
# # Before matching data management:
generate_historical_exp_data:
run:
ehrql:v0 generate-dataset analysis/dataset_definition_hx_unmatched_exp_lc.py
--output output/hx_unmatched_exp.csv
outputs:
highly_sensitive:
hx_cohort: output/hx_unmatched_exp.csv
generate_historical_comp_data_exclude_gp_no_long_covid:
needs: [generate_list_gp_use_long_covid_dx]
run:
ehrql:v0 generate-dataset analysis/dataset_definition_hx_unmatched_com_no_lc.py
--output output/hx_dataset_comp_unmatched.csv
outputs:
highly_sensitive:
hx_cohort: output/hx_dataset_comp_unmatched.csv
# # OS matching
historical_matching:
run:
python:latest python analysis/match_historical.py
needs: [generate_historical_exp_data, generate_historical_comp_data_exclude_gp_no_long_covid]
outputs:
highly_sensitive:
matched_cases: output/matched_cases_historical.csv
matched_matches: output/matched_matches_historical.csv
matched_all: output/matched_combined_historical.csv
moderately_sensitive:
matching_report: output/matching_report_historical.txt
# # After matching data management
import_matched_historical_exposure:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_hx_matched_exp_lc.py
--output output/hx_matched_cases_with_ehr.csv.gz
needs: [historical_matching]
outputs:
highly_sensitive:
cohort: output/hx_matched_cases_with_ehr.csv.gz
import_matched_historical_controls:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_hx_matched_comp.py
--output output/hx_matched_control_with_ehr.csv.gz
needs: [historical_matching]
outputs:
highly_sensitive:
cohort: output/hx_matched_control_with_ehr.csv.gz
# Checking the secondary cost data distribution
checking_cost_data_distribution:
run:
ehrql:v0
generate-dataset analysis/dataset_definition_cost_data_description.py
--output output/qc_cost_by_year.csv.gz
outputs:
highly_sensitive:
huge_cost_data: output/qc_cost_by_year.csv.gz
qc_check_all_cost_data:
needs: [checking_cost_data_distribution]
run:
r:latest analysis/qc03_00_check_cost_distribution.R
outputs:
moderately_sensitive:
summarised_all_cost_data: output/qc03_00_cost_data_desc_stat.csv
qc_check_queried_cost_data_dist:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/qc03_01_now_cost_data_distribution.R
outputs:
moderately_sensitive:
summarised_queried_all_cost_data: output/qc03_01_study_all_cost_distribution.csv
# Reporting: demographic distribution
# Contemporary comparison:
report01_matched_datasets:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st01_report_matched.R
outputs:
moderately_sensitive:
matched_table: output/st01_matched_numbers_table.csv # Table 1
explore_fu_time: output/st01_matched_numbers_check_fu.csv # check the incorrect follow-up time
explore_vax_fig: output/st1_exporing_vax_index_date.png # Check vax date
missing_table: output/missing_distribution_table.csv # Missing pattern tab
missing_pattern: output/missing_pattern_current.png # Missing patter plot
# Contemporary comparison
# Two part hurdle model:
# # Main results: all healthcare utilisation
report_02_01_all_visits_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_01_now_total_visit_hurdel.R
outputs:
moderately_sensitive:
total_reg_summary: output/st02_01_total_reg_summary.txt
binomial_visits: output/st02_01_total_binomial.csv
hurdle_all_visits: output/st02_01_total_hurdle.csv
predicted_visits: output/st02_01_total_predicted_counts.csv
total_visit_bi_model_count: output/st02_01_total_binomial_model_counts.csv
total_visit_hurdle_count: output/st02_01_total_hurdle_model_counts.csv
# # Visulize main outcome:
report_02_06_plot_main_visit_outcomes:
needs: [report_02_01_all_visits_hurdle]
run:
r:latest analysis/st02_06_visualise_total_outcome.R
outputs:
moderately_sensitive:
outcomes_plots: output/st02_06_total_healthcare_visits.png
# # Total primary care utilisation - hurdle
report_02_02_primary_care_visit_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_02_now_primarycare_visits_hurdel.R
outputs:
moderately_sensitive:
gp_reg_summary: output/st02_02_gp_reg_summary.txt
gp_binomial: output/st02_02_gp_binomial.csv
gp_hurdle: output/st02_02_gp_hurdle.csv
predicted_gp_visits: output/st02_02_gp_predicted_counts.csv
gp_visit_bi_model_count: output/st02_02_gp_binomial_model_counts.csv
gp_visit_hurdle_model_count: output/st02_02_gp_hurdle_model_counts.csv
# Prescription visits:
report_02_02_01_prescription_visit_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_02_01_now_durg_visits_hurdel.R
outputs:
moderately_sensitive:
drug_reg_summary: output/st02_02_01_drug_reg_summary.txt
drug_binomial: output/st02_02_01_drug_binomial.csv
drug_hurdle: output/st02_02_01_drug_hurdle.csv
predicted_drug_visits: output/st02_02_01_drug_predicted_counts.csv
drug_visit_bi_model_count: output/st02_02_01_drug_binomial_model_counts.csv
drug_visit_hurdle_model_count: output/st02_02_01_drug_hurdle_model_counts.csv
# gp visits:
report_02_02_02_gp_only_visit_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_02_02_now_gp_only_visits_hurdel.R
outputs:
moderately_sensitive:
drug_reg_summary: output/st02_02_02_gponly_reg_summary.txt
drug_binomial: output/st02_02_02_gponly_binomial.csv
drug_hurdle: output/st02_02_02_gponly_hurdle.csv
predicted_drug_visits: output/st02_02_02_gponly_predicted_counts.csv
drug_visit_bi_model_count: output/st02_02_02_gponly_binomial_model_counts.csv
drug_visit_hurdle_model_count: output/st02_02_02_gponly_hurdle_model_counts.csv
# Visualise gp and prescription visits separately:
report_02_02_03_visualise_gp_and_prescription_visits:
needs: [report_02_02_01_prescription_visit_hurdle, report_02_02_02_gp_only_visit_hurdle]
run:
r:latest analysis/st02_02_03_visualise_gp_drug_visits.R
outputs:
moderately_sensitive:
gp_only_visits: output/st02_02_03_gp_only_visits.png
prescription_visits: output/st02_02_03_prescription_visits.png
# # Hospital admission - hurdle
report_02_03_now_hospital_admin_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_03_now_hospital_hurdel.R
outputs:
moderately_sensitive:
hos_binomial: output/st02_03_hos_binomial.csv
hos_hurdle: output/st02_03_hos_hurdle.csv
hos_reg_summary: output/st02_03_hos_reg_summary.txt
predicted_hos_admin_counts: output/st02_03_hos_predicted_counts.csv
hos_visit_bi_model_count: output/st02_03_hos_binomial_model_counts.csv
hos_visit_hurdle_model_count: output/st02_03_hos_hurdle_model_counts.csv
# # A&E visits - hurdle
report_02_04_now_ane_visits_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_04_now_ane_visits_hurdel.R
outputs:
moderately_sensitive:
ane_binomial: output/st02_04_ane_binomial.csv
ane_hurdle: output/st02_04_ane_hurdle.csv
ane_reg_summary: output/st02_04_ane_reg_summary.txt
predicted_ane_visits: output/st02_04_ane_predicted_counts.csv
ane_visit_bi_model_count: output/st02_04_ane_binomial_model_counts.csv
ane_visit_hurdle_model_count: output/st02_04_ane_hurdle_model_counts.csv
# # OPA visits - hurdle
report_02_05_now_opa_visits_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st02_05_now_opa_visits_hurdel.R
outputs:
moderately_sensitive:
opa_binomial: output/st02_05_opa_binomial.csv
opa_hurdle: output/st02_05_opa_hurdle.csv
opa_reg_summary: output/st02_05_opa_reg_summary.txt
predicted_opa_visits: output/st02_05_opa_predicted_counts.csv
opa_visit_bi_model_count: output/st02_05_opa_binomial_model_counts.csv
opa_visit_hurdle_model_count: output/st02_05_opa_hurdle_model_counts.csv
# # Visulize different type of outcomes:
report_02_07_plot_different_type_outcomes:
needs: [report_02_02_primary_care_visit_hurdle, report_02_03_now_hospital_admin_hurdle, report_02_04_now_ane_visits_hurdle, report_02_05_now_opa_visits_hurdle]
run:
r:latest analysis/st02_07_visualise_outcomes_by_types.R
outputs:
moderately_sensitive:
primary_care_plots: output/st02_07_parimary_care_visits.png
hos_admin_plots: output/st02_07_hospitalisations.png
a_and_e_visit_plots: output/st02_07_a_and_e_visits.png
opa_visit_plots: output/st02_07_opa_visits.png
# Main outcome: total Costs using twopart model
report_03_03_total_costs_twopart:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_03_now_total_cost_twopart.R
outputs:
moderately_sensitive:
total_cost_reg_summary: output/st03_03_total_reg_summary.txt
total_cost_binary: output/st03_03_total_cost_binary.csv
total_cost_tpm: output/st03_03_total_cost_gammaglm.csv
predicted_total_costs: output/st03_03_total_cost_predicted_costs.csv
total_cost_bi_model_check: output/st03_03_total_cost_binomial_model_counts.csv
total_cost_gamma_model_check: output/st03_03_total_cost_gamma_model_counts.csv
# # Visulize main cost outcome:
report_03_08_plot_main_cost_outcomes:
needs: [report_03_03_total_costs_twopart]
run:
r:latest analysis/st03_08_visualise_total_cost_outcomes.R
outputs:
moderately_sensitive:
total_cost_outcomes_plots: output/st03_08_total_cost.png
# Total primary care costs: run two part model and predict costs
report_03_04_gp_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_04_now_gp_cost_twopart.R
outputs:
moderately_sensitive:
gp_cost-binomial: output/st03_04_now_gp_cost_binomial_output.csv
gp_cost_twopm: output/st03_04_now_gp_cost_twopm_output.csv
gp_cost_tpm_reg_summary: output/st03_04_now_gp_reg_summary.txt
gp_predicted_costs: output/st03_04_predict_gp_cost_tpm.csv
gp_cost_bi_model_check: output/st03_04_gp_binomial_model_counts.csv
gp_cost_gamma_model_check: output/st03_04_gp_gamma_model_counts.csv
# APC costs: run two part model and predict costs
report_03_05_apc_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_05_now_apc_cost_twopart.R
outputs:
moderately_sensitive:
apc_cost_binomial: output/st03_05_now_apc_cost_binomial_output.csv
apc_cost_twopm: output/st03_05_now_apc_cost_twopm_output.csv
apc_cost_reg_summary: output/st03_05_now_apc_cost_reg_summary.txt
apc_predicted_costs: output/st03_05_predict_apc_cost_tpm.csv
apc_cost_bi_model_check: output/st03_05_apc_binomial_model_counts.csv
apc_cost_gamma_model_check: output/st03_05_apc_gamma_model_counts.csv
# A&E costs: run two part model and predict costs
report_03_06_a_and_e_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_06_now_ane_cost_twopart.R
outputs:
moderately_sensitive:
ane_cost_binomial: output/st03_06_ane_cost_binomial_output.csv
ane_cost_twopm: output/st03_06_ane_cost_twopm_output.csv
ane_cost_reg_summary: output/st03_06_ane_reg_summary.txt
ane_predicted_costs: output/st03_06_predict_ane_cost_tpm.csv
ane_cost_bi_model_check: output/st03_06_ane_binomial_model_counts.csv
ane_cost_gamma_model_check: output/st03_06_ane_gamma_model_counts.csv
# OPA costs: run two part model and predict costs
report_st03_07_opa_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_07_now_opa_cost_twopart.R
outputs:
moderately_sensitive:
opa_cost_binomial: output/st03_07_opa_cost_binomial_output.csv
opa_cost_twopm: output/st03_07_opa_cost_twopm_output.csv
opa_cost_reg_summary: output/st03_07_opa_reg_summary.txt
opa_predicted_costs: output/st03_07_predict_opa_cost_tpm.csv
opa_cost_bi_model_check: output/st03_07_opa_binomial_model_counts.csv
opa_cost_gamma_model_check: output/st03_07_opa_gamma_model_counts.csv
# # Visulize different types of cost outcome:
report_03_09_plot_types_cost_outcomes:
needs: [report_03_04_gp_cost_twopm, report_03_05_apc_cost_twopm, report_03_06_a_and_e_cost_twopm, report_st03_07_opa_cost_twopm]
run:
r:latest analysis/st03_09_visualise_type_cost_outcomes.R
outputs:
moderately_sensitive:
gp_cost_plot: output/st03_09_gp_costs.png
apc_cost_plot: output/st03_09_apc_costs.png
ane_cost_plot: output/st03_09_ane_costs.png
opa_cost_plot: output/st03_09_opa_costs.png
# Historical: data distribution
report05_hx_matched_data_distribution:
needs: [import_matched_historical_exposure, import_matched_historical_controls]
run:
r:latest analysis/st05_report_matched_historical_records.R
outputs:
moderately_sensitive:
historical_table_1: output/st05_hx_matched_numbers_table.csv
crude_visits_distribution: output/st05_hx_crude_vistis_exp_time.csv
hx_now_smooth_line: output/st05_historical_smooth.jpg
# # Historical: difference-in-difference model with two-part model
report_05_did_tpm_model:
needs: [import_matched_historical_exposure, import_matched_historical_controls]
run:
r:latest analysis/st05_did_twopart.R
outputs:
moderately_sensitive:
did_crude_plot: output/st05_did_crude.png
did_adj_plot: output/st05_did_adj.png
did_reg_table: output/st05_did_tpm_predicted.csv
did_reg_summary: output/st05_did_reg_summary_output.txt
# Supplementary materials ===========================
# Supplementary 1-1 fig: outcome distribution
report_04_01_supp1_outcome_dist:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_01_outcome_distribution_plots.R
outputs:
moderately_sensitive:
outcome_distribution_plot: output/st04_01_total_outcome_distribution.png
zero_percent_fig: output/st04_01_explore_zero_percentage.png
monthly_oucome_tb: output/st04_01_monthly_outcome_distribution.csv
visit_explore: output/st04_01_cat_visits_summary.csv
# Supplementary 1-2 table: checking data dispersion
report_04_02_supp2_dispersion_checking:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_01_sup_02_check_visit_overdispersion.R
outputs:
moderately_sensitive:
model_dispersion: output/st04_02_supp_02_checking_dispersion.csv
# # Supplementary 2: factors associated with high healthcare use among LC
report_04_02_associated_factors:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_02_now_associated_factors.R
outputs:
moderately_sensitive:
all_factors_bi_or: output/st04_02_all_factors_binomial.csv
all_factors_hurdle_rr: output/st04_02_all_factors_hurdle.csv
lc_only_bi_visits: output/st04_02_lc_only_factor_binomial.csv
lc_only_hurdle_visits: output/st04_02_lc_only_factor_hurdle.csv
nolc_bi_or: output/st04_02_nolc_factor_binomial.csv
nolc_hurdle_rr: output/st04_02_nolc_factor_hurdle.csv
sub_predicted_visits_lc_nolc_all: output/st04_02_factors_predicted_visits.csv
sub_reg_summary: output/st04_02_associated_factor_reg_summary.txt
sub_all_lc_no_model_count: output/st04_02_factors_bi_model_counts.csv
sub_all_lc_no_hurdle_count: output/st04_02_factors_hurdle_model_counts.csv
# # visualise subgroup lc only outputs:
report_04_03_visualise_associated_factors:
needs: [report_04_02_associated_factors]
run:
r:latest analysis/st04_03_now_visualise_associated_factors.R
outputs:
moderately_sensitive:
all_factor_forest_plot: output/st04_03_all_factors.png
lc_only_forest_plot: output/st04_03_lc_factors.png
nolc_forest_plot: output/st04_03_nolc_factors.png
predicted_subgroups_visits: output/st04_03_sub_all_subset_predicted_visits.png
# # Supplementary 3: stratified by hospitalisation, sex, age - hurdle
report_04_04_stratified_by_cov:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_04_stratum_by_cov_hurdle.R
outputs:
moderately_sensitive:
previous_hospitalisation_stratum: output/st04_04_stratum_hospitalisation.csv
sex_stratum: output/st04_04_stratum_sex.csv
age_cat_stratum: output/st04_04_stratum_age.csv
predict_subgoups_visits: output/st04_04_stratum_predicted_value.csv
# Visualise the stratum specific outcomes:
report_04_05_visualise_stratum:
needs: [report_04_04_stratified_by_cov]
run:
r:latest analysis/st04_05_stratified_visualisation.R
outputs:
moderately_sensitive:
previous_hos_stratum_plot: output/st04_05_stratum_hos_visits.png
sex_stratum_plot: output/st04_05_stratum_sex_visits.png
age_stratum_plot: output/st04_05_stratum_age_visits.png
# # Sensitivity analyses: main analyses among people who had GP registeration and visits
# 1 year before study started.
report04_06_sens_gp1y_all_visits_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_06_sens_reg_gp1y_total_visit_hurdel.R
outputs:
moderately_sensitive:
sens_gp1y_total_reg_summary: output/st04_06_sens_gp1y_total_reg_summary.txt
sens_gp1y_binomial_visits: output/st04_06_sens_gp1y_total_binomial.csv
sens_gp1y_hurdle_all_visits: output/st04_06_sens_gp1y_total_hurdle.csv
sens_gp1y_predicted_visits: output/st04_06_sens_gp1y_total_predicted_counts.csv
sens_gp1y_total_visit_bi_model_count: output/st04_06_sens_gp1y_total_binomial_model_counts.csv
sens_gp1y_total_visit_hurdle_count: output/st04_06_sens_gp1y_total_hurdle_model_counts.csv
# Visualise sensitivity analyses outcomes: registered subgroup
report04_06_plot_sens_gp1y_all_visits:
needs: [report04_06_sens_gp1y_all_visits_hurdle]
run:
r:latest analysis/st04_06_02_plot_visualise_sens_gp1y_outcome.R
outputs:
moderately_sensitive:
sens_gp1y_plot: output/st06_02_plot_sens_total_healthcare_visits.png
# # Sensitivity analyses: main analyses among people who had positive covid before follow-up
report04_07_sens_covid_positive_all_visits_hurdle:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st04_07_sens_covid_pos_now_total_visit_hurdel.R
outputs:
moderately_sensitive:
sens_covid_p_total_reg_summary: output/st04_07_sens_covid_pos_total_reg_summary.txt
sens_covid_p_binomial_visits: output/st04_07_sens_covid_pos_total_binomial.csv
sens_covid_p_hurdle_all_visits: output/st04_07_sens_covid_pos_total_hurdle.csv
sens_covid_p_predicted_visits: output/st04_07_sens_covid_pos_total_predicted_counts.csv
sens_covid_p_total_visit_bi_model_count: output/st04_07_sens_covid_pos_total_binomial_model_counts.csv
sens_covid_p_total_visit_hurdle_count: output/st04_07_sens_covid_pos_hurdle_model_counts.csv
# Visualise sensitivity analyses outcomes: covid positive group
report04_07_plot_sens_covid_positive_all_visits:
needs: [report04_07_sens_covid_positive_all_visits_hurdle]
run:
r:latest analysis/st04_07_02_plot_visualise_cov_positive_outcome.R
outputs:
moderately_sensitive:
sens_gp1y_plot: output/st04_07_plot_sens_covid_plus_total_healthcare_visits.png
# Sensitivity analyses: inpute missing costs
# Inputed total cost outcomes:
report_03_03_v2_total_costs_twopart:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_03_v2_now_inputed_total_cost_twopart.R
outputs:
moderately_sensitive:
inpute_total_cost_reg_summary: output/st03_03_v2_total_inputed_cost_reg_summary.txt
inpute_total_cost_binary: output/st03_03_v2_inputed_total_cost_binary.csv
inpute_total_cost_tpm: output/st03_03_v2_inputed_total_cost_gammaglm.csv
inpute_inpute_predicted_total_costs: output/st03_03_v2_inputed_total_cost_predicted_costs.csv
inpute_total_cost_bi_model_check: output/st03_03_v2_inputed_total_cost_binomial_model_counts.csv
inpute_total_cost_gamma_model_check: output/st03_03_v2_inputed_total_cost_gamma_model_counts.csv
# # Visulize the inputed main cost outcome:
report_03_08_v2_plot_main_inputed_cost_outcomes:
needs: [report_03_03_v2_total_costs_twopart]
run:
r:latest analysis/st03_08_v2_visualise_inputed_total_cost_outcomes.R
outputs:
moderately_sensitive:
total_cost_outcomes_plots: output/st03_08_v2_inputed_total_cost.png
# inpute APC cost
report_03_05_v2_input_apc_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_05_v2_now_inpute_apc_cost_twopart.R
outputs:
moderately_sensitive:
input_apc_cost_binomial: output/st03_05_v2_now_inputed_apc_cost_binomial_output.csv
input_apc_cost_twopm: output/st03_05_v2_now_inputed_apc_cost_twopm_output.csv
input_apc_cost_reg_summary: output/st03_05_v2_now_inputed_apc_cost_reg_summary.txt
input_apc_predicted_costs: output/st03_05_v2_inputed_predict_apc_cost_tpm.csv
input_apc_cost_bi_model_check: output/st03_05_inputed_apc_binomial_model_counts.csv
input_apc_cost_gamma_model_check: output/st03_05_inputed_apc_gamma_model_counts.csv
# Inpute A&E version
report_03_06_v2_inpute_a_and_e_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_06_v2_now_inputed_ane_cost_twopart.R
outputs:
moderately_sensitive:
inpute_ane_cost_binomial: output/st03_06_v2_inputed_ane_cost_binomial_output.csv
inpute_ane_cost_twopm: output/st03_06_v2_inputed_ane_cost_twopm_output.csv
inpute_ane_cost_reg_summary: output/st03_06_v2_inputed_ane_reg_summary.txt
inpute_ane_predicted_costs: output/st03_06_v2_inputed_predict_ane_cost_tpm.csv
inpute_ane_cost_bi_model_check: output/st03_06_v2_inputed_ane_binomial_model_counts.csv
inpute_ane_cost_gamma_model_check: output/st03_06_v2_inputed_ane_gamma_model_counts.csv
# Inpute OPA version
report_st03_07_v2_inputed_opa_cost_twopm:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/st03_07_v2_now_inputed_opa_cost_twopart.R
outputs:
moderately_sensitive:
inpute_opa_cost_binomial: output/st03_07_v2_inputed_opa_cost_binomial_output.csv
inpute_opa_cost_twopm: output/st03_07_v2_inputed_opa_cost_twopm_output.csv
inpute_opa_cost_reg_summary: output/st03_07_v2_inputed_opa_reg_summary.txt
inpute_opa_predicted_costs: output/st03_07_v2_inputed_predict_opa_cost_tpm.csv
inpute_opa_cost_bi_model_check: output/st03_07_v2_inputed_opa_binomial_model_counts.csv
inpute_opa_cost_gamma_model_check: output/st03_07_v2_inputed_opa_gamma_model_counts.csv
# QC steps: -----------
# # # QC step:
qc_01examine_unmatched_data:
needs: [generate_dataset_comparator_exclude_gp_no_long_covid, generate_long_covid_exposure_dataset]
run:
r:latest analysis/qc01_unmatched_control.R
outputs:
moderately_sensitive:
cohort: output/qc01_check_unmatched.csv
# # # QC step:
qc_02examine_historical_unmatched_data:
needs: [generate_historical_exp_data, generate_historical_comp_data_exclude_gp_no_long_covid]
run:
r:latest analysis/qc02_hx_unmatched_check.R
outputs:
moderately_sensitive:
cohort: output/qc02_hx_check_unmatched.csv
# Check 2nd care inputation
qc03_03_compare_2nd_care_inputation:
needs: [import_matched_exposure_update, import_matched_control_updates, import_matched_exposure_drug_cost, import_matched_controls_drug_costs]
run:
r:latest analysis/qc03_03_compare_2nd_care_inputation.R
outputs:
moderately_sensitive:
inputation_summary: output/qc03_03_compare_2nd_care_inputation.csv