Add "Significant symptoms reported" to session read page#1392
Add "Significant symptoms reported" to session read page#1392swebberuk wants to merge 2 commits intoDTOSS-12818-highlight-symptomfrom
Conversation
| "caption": "Review images", | ||
| "images": images, | ||
| "presented_medical_information": CheckMedicalInformationPresenter( | ||
| "check_medical_information_presenter": CheckMedicalInformationPresenter( |
There was a problem hiding this comment.
Template uses CheckMedicalInformationPresenter for "Medical summary" and MedicalInformationPresenter for "Significant symptoms reported". Renamed presented_medical_information to check_medical_information_presenter to make clearer.
214fb41 to
ff38833
Compare
ff38833 to
f4f94c2
Compare
| def test_formats_symptoms_summary_list(self): | ||
| appointment = AppointmentFactory.create() | ||
|
|
||
| def _create_default_symptoms(self, appointment): |
There was a problem hiding this comment.
Added this function so could share between tests of test_symptom_rows, test_read_only_symptom_rows and test_significant_symptom_rows.
There was a problem hiding this comment.
If they don't depend on each other, you could make each one a fixture. Then pull them in as needed. It's a bit more concise that way.
MatMoore
left a comment
There was a problem hiding this comment.
LGTM, just a suggestion regarding the macros (not blocking)
| {% macro symptoms_content(presented_medical_info, read_only=false) %} | ||
| {% set symptom_rows = presented_medical_info.read_only_symptom_rows if read_only else presented_medical_info.symptom_rows %} | ||
| <p {%- if not read_only and not symptom_rows %} class="nhsuk-u-margin-bottom-3"{% endif %}>Any problems or symptoms, including lumps, swelling, rashes or nipple changes</p> | ||
| {% macro symptoms_content(presented_medical_info, read_only=false, significant_only=false) %} |
There was a problem hiding this comment.
I feel like we're crossing the streams here by reusing the macro from medical information. There's a lot of conditionals here that make it hard to read.
Could we create a separate macro instead?
There was a problem hiding this comment.
Good idea. Thanks.
I've reverted this change. For significant symptoms all this macro did was call summaryList - so now do directly from read_image.jinja instead.
| def test_formats_symptoms_summary_list(self): | ||
| appointment = AppointmentFactory.create() | ||
|
|
||
| def _create_default_symptoms(self, appointment): |
There was a problem hiding this comment.
If they don't depend on each other, you could make each one a fixture. Then pull them in as needed. It's a bit more concise that way.
No longer use symptoms_content from read_image.jinja
|



Description
Add "Significant symptoms reported" section to the session read page.
These changes build on changes made in #1386, which is awaiting approval.
Jira link
https://nhsd-jira.digital.nhs.uk/browse/DTOSS-12827