senaite.health icon indicating copy to clipboard operation
senaite.health copied to clipboard

Rejected sample report is not showing patient demographics

Open lawrence02 opened this issue 5 years ago • 3 comments

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

lawrence02 avatar Sep 03 '19 21:09 lawrence02

@xispa noted.

lawrence02 avatar Sep 05 '19 18:09 lawrence02

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 avatar Apr 04 '20 16:04 xispa

@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.

lawrence02 avatar Apr 05 '20 11:04 lawrence02