senaite.health
senaite.health copied to clipboard
Rejected sample report is not showing patient demographics
Description
The sample rejection report is not showing patient demographics.
Reproduction guide
Select the sample you want to reject. Specify the rejection reasons and then reject. The report will then be generated without the patient demographic information.
Observed behaviour
The rejected sample report used to show patient demographics but it stopped after an upgrade a while ago.
Expected behaviour
The rejected sample report should show patient demographics:
- Patient name
- Gender
- Age
Versions
-
OS: Linux
-
senaite.core:
master
Traceback
<<BACKTRACE IF RELEVANT>>
Screenshot
@xispa noted.
These patient-specific fields in rejection report (pdf) were coded in senaite.core rather than in senaite.health a long time ago. See https://github.com/senaite/senaite.core/pull/857
These changes need to be ported to health, requiring the function get_rejection_pdf
from core to look for adapters that provide custom views/templates for such report and fallback to default's AnalysisRequestRejectPdfView
if no custom view/template is found.
https://github.com/senaite/senaite.core/blob/master/bika/lims/utils/analysisrequest.py#L513-L516
The function get_rejection_mail
from core must be considered too. Although the body of the email is customizable via "Setup", health-specific wildcards are not supported:
https://github.com/senaite/senaite.core/blob/master/bika/lims/utils/analysisrequest.py#L536-L541
Moved this issue to milestone 1.2.4, cause the resolution requires changes in core, but we want 1.2.3 to pin core's 1.3.3.
@xispa Thank you for the comments. Currently I am manually adding the path with the demographics every time we do an update. I hope we will not forget to customize the report in the specified versions above.