generated from opensafely/research-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into reviewer-updates
- Loading branch information
Showing
36 changed files
with
44,804 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ analysis/.DS_Store | |
.DS_Store | ||
!.gitkeep | ||
untitled folder/local run.do | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) University of Oxford | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
metadata/* | ||
output/measure* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Table of contents | ||
|
||
* [.gitignore](.gitignore) | ||
* output | ||
* [output/append_cohorts.txt](output/append_cohorts.txt) | ||
* [output/competing_events.txt](output/competing_events.txt) | ||
* [output/cox_models.txt](output/cox_models.txt) | ||
* [output/matching_report_general_population.txt](output/matching_report_general_population.txt) | ||
* output/tabfig | ||
* [output/tabfig/an_descriptiveTable_covid.txt](output/tabfig/an_descriptiveTable_covid.txt) | ||
* [output/tabfig/an_descriptiveTable_covid_community.txt](output/tabfig/an_descriptiveTable_covid_community.txt) | ||
* [output/tabfig/an_descriptiveTable_gen_population.txt](output/tabfig/an_descriptiveTable_gen_population.txt) | ||
* [output/tabfig/an_descriptiveTable_pneumonia.txt](output/tabfig/an_descriptiveTable_pneumonia.txt) | ||
* [output/tabfig/an_descriptiveTable_pre_covid_discharged.txt](output/tabfig/an_descriptiveTable_pre_covid_discharged.txt) | ||
* [output/tabfig/an_descriptiveTable_pre_pneum_discharged.txt](output/tabfig/an_descriptiveTable_pre_pneum_discharged.txt) | ||
* [output/tabfig/cox_model_summary.csv](output/tabfig/cox_model_summary.csv) | ||
* [output/tabfig/cox_model_summary_time_strat.csv](output/tabfig/cox_model_summary_time_strat.csv) | ||
* [output/tabfig/cumInc_aki_cens_gp.svg](output/tabfig/cumInc_aki_cens_gp.svg) | ||
* [output/tabfig/cumInc_dvt_cens_gp.svg](output/tabfig/cumInc_dvt_cens_gp.svg) | ||
* [output/tabfig/cumInc_heart_failure_cens_gp.svg](output/tabfig/cumInc_heart_failure_cens_gp.svg) | ||
* [output/tabfig/cumInc_mi_cens_gp.svg](output/tabfig/cumInc_mi_cens_gp.svg) | ||
* [output/tabfig/cumInc_pe_cens_gp.svg](output/tabfig/cumInc_pe_cens_gp.svg) | ||
* [output/tabfig/cumInc_stroke_cens_gp.svg](output/tabfig/cumInc_stroke_cens_gp.svg) | ||
* [output/tabfig/fine_gray_summary.csv](output/tabfig/fine_gray_summary.csv) | ||
* [output/tabfig/fine_gray_summary_time_strat.csv](output/tabfig/fine_gray_summary_time_strat.csv) | ||
* [output/tabfig/fine_gray_summary_time_strat_age_sex.csv](output/tabfig/fine_gray_summary_time_strat_age_sex.csv) | ||
* [output/tabfig/follow_up_summary.csv](output/tabfig/follow_up_summary.csv) | ||
* [output/tabfig/outcomes_in_hosp_covid.csv](output/tabfig/outcomes_in_hosp_covid.csv) | ||
* [output/tabfig/outcomes_in_hosp_pneumonia.csv](output/tabfig/outcomes_in_hosp_pneumonia.csv) | ||
* [output/tabfig/rate_graphs_all.svg](output/tabfig/rate_graphs_all.svg) | ||
* [output/tabfig/rate_graphs_cens_gp.svg](output/tabfig/rate_graphs_cens_gp.svg) | ||
* [output/tabfig/rate_graphs_no_gp.svg](output/tabfig/rate_graphs_no_gp.svg) | ||
* [output/tabfig/rates_summary_covid.csv](output/tabfig/rates_summary_covid.csv) | ||
* [output/tabfig/rates_summary_covid_community.csv](output/tabfig/rates_summary_covid_community.csv) | ||
* [output/tabfig/rates_summary_gen_population.csv](output/tabfig/rates_summary_gen_population.csv) | ||
* [output/tabfig/rates_summary_pneumonia.csv](output/tabfig/rates_summary_pneumonia.csv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
------------------------------------------------------------------------------- | ||
name: <unnamed> | ||
log: /workspace/output/append_cohorts.txt | ||
log type: text | ||
opened on: 13 Jun 2021, 10:04:50 | ||
|
||
. | ||
. * Gen flag for covid patients (case = 1) | ||
. use $outdir/cohort_rates_covid, replace | ||
|
||
. gen case = 1 | ||
|
||
. append using $outdir/cohort_rates_pneumonia, force | ||
(label diabcat already defined) | ||
(label reduced_kidney_function_cat2lab already defined) | ||
(label cancer already defined) | ||
(label bpcat already defined) | ||
(label asthmacat already defined) | ||
(label obese4cat already defined) | ||
(label bmicat already defined) | ||
(label agegroup already defined) | ||
(label region_7 already defined) | ||
(label region_9 already defined) | ||
(label ethnicity_lab already defined) | ||
(label smoke already defined) | ||
(label imd already defined) | ||
(label sexLab already defined) | ||
|
||
. replace case = 0 if case ==. | ||
(127,715 real changes made) | ||
|
||
. | ||
. * count patients from pneumonia group who are among Covid group | ||
. bysort patient_id: gen flag = _n | ||
|
||
. safecount if flag == 2 | ||
3,535 | ||
|
||
. | ||
. noi di "number of patients in both cohorts is `r(N)'" | ||
number of patients in both cohorts is 3535 | ||
|
||
. | ||
. drop flag | ||
|
||
. save $outdir/combined_covid_pneumonia.dta, replace | ||
(note: file /workspace/output/combined_covid_pneumonia.dta not found) | ||
file /workspace/output/combined_covid_pneumonia.dta saved | ||
|
||
. | ||
. | ||
. | ||
. ***************************************************************************** | ||
> *** | ||
. * Append covid/gen pop. cohorts | ||
. | ||
. * Gen flag for covid patients (case = 1) | ||
. use $outdir/cohort_rates_covid, replace | ||
|
||
. gen case = 1 | ||
|
||
. append using $outdir/cohort_rates_gen_population, force | ||
(label diabcat already defined) | ||
(label reduced_kidney_function_cat2lab already defined) | ||
(label cancer already defined) | ||
(label bpcat already defined) | ||
(label asthmacat already defined) | ||
(label obese4cat already defined) | ||
(label bmicat already defined) | ||
(label agegroup already defined) | ||
(label region_7 already defined) | ||
(label region_9 already defined) | ||
(label ethnicity_lab already defined) | ||
(label smoke already defined) | ||
(label imd already defined) | ||
(label sexLab already defined) | ||
|
||
. replace case = 0 if case ==. | ||
(0 real changes made) | ||
|
||
. | ||
. | ||
. * count patients from pneumonia group who are among Covid group | ||
. bysort patient_id: gen flag = _n | ||
|
||
. safecount if flag == 2 | ||
1,404 | ||
|
||
. | ||
. noi di "number of patients in both cohorts is `r(N)'" | ||
number of patients in both cohorts is 1404 | ||
|
||
. | ||
. drop flag | ||
|
||
. save $outdir/combined_covid_gen_population.dta, replace | ||
(note: file /workspace/output/combined_covid_gen_population.dta not found) | ||
file /workspace/output/combined_covid_gen_population.dta saved | ||
|
||
. | ||
. | ||
. | ||
. | ||
. log close | ||
name: <unnamed> | ||
log: /workspace/output/append_cohorts.txt | ||
log type: text | ||
closed on: 13 Jun 2021, 10:04:54 | ||
------------------------------------------------------------------------------- |
Oops, something went wrong.