-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TN-3291 implement caching of research data, for performance improvement #4382
base: develop
Are you sure you want to change the base?
Conversation
@@ -370,7 +370,8 @@ def quote_double_quote(value): | |||
answer['valueCoding'].get('text') | |||
) | |||
|
|||
text_and_coded_answers.append({'valueString': text_answer}) | |||
if text_answer is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivan-c this change was necessary to get tests to pass, as some results after posting an update to a questionnaire response, would show valueString: None
. i can't imagine it would ever be worth saving a valueString
with a value of None
in a questionnaire response, would it?
those were showing up as differences in the following test:
py.test tests/test_assessment_engine.py::TestAssessmentEngine::test_update_assessment
…ionnaire-response: questionnaire-bank association.
…n the research_data table.
3c97fdf
to
696a4df
Compare
Reports from the field - the generation of research_data has become unreliable due to time it takes to build report.
Now retaining a table of cached values, one row per questionnaire response, for a responsive report generation.
Primary concern will be with cache-invalidation, especially on an org change of research protocol or a user's consent date change.
There is now a scheduled job that runs daily, to seek out any overlooked QNRs missing from this new cache table
research_data
. A dry run of the prod db:thereafter, it will generally find zero, as we immediately update on QNR put/post.