Skip to content

Commit

Permalink
Update study_definition.py
Browse files Browse the repository at this point in the history
  • Loading branch information
a-d-brown authored Jan 30, 2023
1 parent 743282a commit 88f036a
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions analysis/study_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,39 @@
"incidence": 0.5,
},
),



ethnicity=patients.with_these_clinical_events(
codelist=ethnicity_codes_snomed_16,
returning="category",
find_last_match_in_period=True,
include_date_of_match=False,
return_expectations={
"category": {
"ratios": {
"1": 0.0625,
"2": 0.0625,
"3": 0.0625,
"4": 0.0625,
"5": 0.0625,
"6": 0.0625,
"7": 0.0625,
"8": 0.0625,
"9": 0.0625,
"10": 0.0625,
"11": 0.0625,
"12": 0.0625,
"13": 0.0625,
"14": 0.0625,
"15": 0.0625,
"16": 0.0625,
}
},
"incidence": 0.75,
},



# Age Band
age_band=patients.categorised_as(
{
Expand Down Expand Up @@ -590,4 +622,4 @@
denominator="population",
group_by="serious_mental_illness",
),
]
]

0 comments on commit 88f036a

Please sign in to comment.