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:
- I don’t know how to access that specific data object from the html/plone template.
- 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.
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)
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
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…
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?
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)
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?
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).
to_html is a short function in our own add-on. Its only purpose is replacing linebreaks with
This might not be necessary for you, so simplyfied
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.
I wasn’t getting the analysis service object first. All the objects have remarks, so it’s a bit hard to track.