"Remarks" field from Analysis Services on Report

We have the certification number for each Analysis Service saved in the Remarks field and would like that to show up on the Report – in the summary or sample table. I’m new to Plone, so figuring out the report templating has been slow; currently I’m working from the MultiDefault template and struggling to access that particular data field.

My issues are:

  1. I don’t know how to access that specific data object from the html/plone template.
  2. I don’t know how to uniquify the results so I don’t post redundant certification numbers (Remarks). There are some examples of this already in the template, so I might be able to solve it once I understand how to access the data object.

Thanks for any help. I can post snippets if it would be useful.

Hi @doylejg

Welcome to the Senaite Community!

How is the number generated? Senaite Reports (Certificate Of Analysis [COA]) are designed in the Senaite Impress add-on and the COA number is auto-generated. Changes to the report have to be made in Senaite Impress.

If my memory saves me right, the Remarks field is not visible to clients (more of internal lab notes field)

1 Like

Have a look at the BIKA Labs COA GitHub for more examples and customizations.

You can find some information on the Senaite Impress ReadMe about custom reports: GitHub - senaite/senaite.impress: HTML to PDF Rendering Engine for SENAITE

Hi @doylejg

we made the analysis remarks in our reports visible, too.

you can use this term

tal:content="structure python:view.to_html(analysis.Remarks, wrap='span')

e.g. immediately after the analysis results to display them…

HTH

3 Likes

It is also beneficial for us to use the remarks field on the report result screen in the genetics laboratory workflow.
Thanks for helps @grulisco

So, how can we add the remarks field with the Tiny editor, “page break” and “insert image” plugins?

Hi @ngslabex,
supposedly it’s not a fundamental problem, that the “remarks” could contain html elements.
It would be a some labor to extend this input field with the capability of TinyMCE in gui (e.g. sample view, worksheet view, multiresults view).

I suggest to open an issue at GitHub - senaite/senaite.core: Enterprise Open Source Laboratory System (LIMS), as this wish might be useful for many users. (Me too)

1 Like

Thanks, sorry for the late reply, didn’t see the responses come in my email for a while.

I tried this, but got an error error: 'MultiReportView' object has no attribute 'to_html'. I’m not familiar enough with the Impress/Zope stuff (or whatever is going on) to fully understand the scope of variables accessible. I tired it in the sample table, where the analysis object is accessible, as well as in the summary section. (This makes less sense, since the remarks are specific to each analysis).

Can you see an obvious issue? Otherwise, would it be possible share a larger snippet of your template?

Thanks!

Hi @ronaldm, thanks for the reply, sorry for the delayed response.

So the certification number is entered by hand into the Remarks field. To be clear, this is the number granted by the certifying body, not the ID of the COA.

Remarks not being accessible by clients is okay, the employees are generating the reports with the Remarks field on it (hopefully).

Hi @doylejg,

I see…
to_html is a short function in our own add-on. Its only purpose is replacing linebreaks with <br>-tags.

This might not be necessary for you, so simplyfied

tal:content="structure python:analysis.Remarks"

should do.

This field is blank as well. Is there something special about the remarks in the analysis service? I set the remarks in the settings, so they should apply each time a service was selected. I thought

Okay, finally figured it out.

structure python:analysis.AnalysisService.Remarks

I wasn’t getting the analysis service object first. All the objects have remarks, so it’s a bit hard to track.

Thanks everyone!