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.
Fixes #1136
Overview
Largely extends work already done on EpilepsyCause. The main reason for the PR was to add the list of requested causes detailed in issue #1136
In the process the workflow for updating causes and maintaining up to date lists of causes has been improved
Code changes
general_functions/epilepsy_causes.py
: adds two new functions, the first which dumps the active list of epilepsy causes as a file to the root, either as markdown, json or csv. The second accepts a list of python objects with a the structure{'preferredTerm': 'preferredTerm', 'conceptId': 'conceptId', 'term': 'term'}
and saves to the database. It logs a list to the console of success and failures. If the conceptId is provided it will look up for the snomed server and persist in that wayDocumentation changes (done or required as a result of this PR)
The workflow for adding new causes has been clarified and updated in the developer docs. The next step will be to expose these new functions to the Epilepsy12 team, but there needs to be robust clinical oversight of this beforehand.
In addition, there is a new page in the clinician docs with the list of causes and syndromes for users to see.
Related Issues
closes #1136