Modularising code and adding measures framework #3
+105
−99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The initial code looked like a great start! Here the main changes I tried to implement in this PR.
Some other things I noticed or added:
Currently you're only looking at whether someone has a coded ADHD event. There is also Attention Deficit Hyperactivity Disorder in remission Codelist that you could look at. For example, rule 2 of the
LDOB091
indicator (see Learning Disabilities data 2019-2020 business rules version 3.0) is defined as:I removed your analysis script
report.py
for now as I wasnt sure the content was still needed. We can explore in our next session what analysis would be good to run as a first testI categoried age into age bands so that this can be used as a
group_by
in the measures for the prevalence following this example in our docs.My main aim with these changes was to make it easier for us to execute code in the secure environment soon and also to introduce ehrQL concepts you hadn't used before. See what you think and let's discuss later this week.