Hello everyone, I'm a newbie using SENAITE and I would like you to please help me with a question I have. I want to export customer data, samples, etc, but I can't find any solution. I know that there is an option to generate reports, but unfortunately it is very limited. I have reviewed many topics in the forum, but none give a clear solution. I would like to know if any of you know how to do it to date? I am very interested in using this LIMS, but the reports are very important to me. Thanks a lot
@Chenderin There are multiple ways to export data depending on whether you need raw data or a PDF.
For all Reports/PDFs, you should use the Senaite.Impress addon in addition to senaite.core and senaite.lims. You can customize your own report templates based on TAL/METAL expressions (as a lot of Plone is done). I don't believe Senaite.Impress has Chameleon support, but I could be wrong :)
For raw data, it is best to use the Senaite API if you can. The code lives inside the senaite.core project, but there is an old git repo for the API specifically that has the documentation. The other primary method is to include the senaite.jsonapi addon and get a lot of relevant data in an HTTP request.
is there any fast way tutorial how to set up senaite on a raspberry
@toedtling Senaite on a Pi should be similar to running Senaite/Plone any other Linux distro, but your Pi needs to meet Plone's minimum requirements.
Alternatively, you could put Docker on your Pi, and simply run a Senaite container. There should be a few images available, but Ramonski's is the official one I believe (and should be labelled as such).
Your Pi might be powerful enough to host the site, but not to additionally run the browser needed to view it. If resources are limited, ensure your Pi is on a network and navigate to YOUR_PI_IP:8080 in your browser.
The lab I'm working for controls the weight of each standard before and after a QC run or analysis. They wish to be able to track the use of each standard and get a warning when they're running low. How difficult would it be to add this functionality to Reference Samples, for example?
@gonzalohd_gitlab That would depend on your familiarity with Plone Development. Senaite was built following most of Plone's conventions to allow multiple Add-Ons to work together. A custom Plone Add-On that modifies the reference samples and does all the bookkeeping/notifications you want should be incredibly feasible!
Unfortunately, Plone is a pretty steep learning curve, so if you're brand new to it I would plan on learning for a bit first. There is a pretty good Plone Training on learning to create Add-Ons for Plone. However, you'll need to keep in mind that Senaite is a combination of a few Add-Ons that are already created, so your modifications wouldn't be the same as they would for a brand new site. For that you'll need to read the GitHub Repositories themselves, browser the Senaite Community Forums, and read some of the old conversations here on Gitter ^^^
Does anyone know how to Override a View Class when the view is specifically for the default view?
We would like to override some of the browser view classes like BatchFolderContentsView, but we cannot seem to get the changes to appear unless we manually enter a @@ style url for whatever the
name= field is in our configure.zcml .
However, (for the BatchFolder example specifically) we have tried using the naming conventions:
(Default) with no success in changing which view is rendered by default.
This is what we have for it so far in our addon:
browser/configure.zcml we added:
<!-- Override BatchFolder View Class --> <browser:page name="BatchFolder" class=".batchfolder.CustomBatchFolderContentsView" permission="cmf.ListFolderContents" for="bika.lims.interfaces.IBatchFolder" layer="nal.lims.interfaces.INalLimsLayer" />
And then in our
browser/batchfolder.py we added:
from bika.lims.browser.batchfolder import BatchFolderContentsView #Some other imports class CustomBatchFolderContentsView(BatchFolderContentsView): #Our customized BatchFolder view class
If we navigate to
localhost:8080/oursenaitesite/.../@@BatchFolder we successfully see our custom view. We would like this to be the Default
However, with the name field set to
name='base_edit' which is the name senaite aliases the (Default) view as, we don't get our custom view and ONLY get the Senaite default.
@mikejmets Thank you for that information! We have tried overriding the other package, but now cannot even get a new view.
Thus far we have added an
overrides.zcml file to our root that includes the browser directory:
<configure xmlns="http://namespaces.zope.org/zope" xmlns:browser="http://namespaces.zope.org/browser" i18n_domain="nal.lims"> <include package=".browser" /> </configure>
We then included this file in our main
configure.zcml file with:
<include file="overrides.zcml" />
We then added a
browser/overrides.zcml with the new browser:page registration according to the documentation linked about.
<configure xmlns="http://namespaces.zope.org/zope" xmlns:browser="http://namespaces.zope.org/browser" i18n_domain="nal.lims"> <!-- Override BatchFolder View Class --> <configure package="bika.lims.browser.batchfolder"> <browser:page for="bika.lims.interfaces.IBatchFolder" class="nal.lims.browser.batchfolder.CustomBatchFolderContentsView" name="base_edit" layer="nal.lims.interfaces.INalLimsLayer" permission="cmf.ListFolderContents" /> </configure> </configure>
Nevermind, we figured it out!
It worked following the official Overriding a View Class documentation, but with the exception that we needed some Senaite interfaces to get everything working correctly.
The solution was using these interfaces instead of the
IDefaultPloneLayer for our root level interface layer.
from senaite.impress.interfaces import ILayer as ISenaiteImpressLayer from senaite.lims.interfaces import ISenaiteLIMS from bika.lims.interfaces import IBikaLIMS #Layer our custom views bind to class INalLimsLayer(ISenaiteImpressLayer, ISenaiteLIMS, IBikaLIMS): """Marker interface that defines a browser layer."""
Does anyone know how to get the Navigation to re-load the name for a folder?
During install, my addon changes both the Factory Type
title field, as well as the top level folder from "Methods" to "SOPs". The folder title field is changed using the API:
def post_install(context): """Post install script""" # Do something at the end of the installation of this package. site = api.get_portal() #Change 'Methods' folder title to 'SOPs' site.methods.title = "SOPs"
and the FTI is changed using a purging property:
<?xml version="1.0"?> <object name="Methods" meta_type="Factory-based Type Information with dynamic views" xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="my.addon"> <property name="title" purge="True">SOPs</property> </object>
but the Navigation portlet doesn't register the change unless I create an entirely new folder. It looks correct in the ZMI, in the navigation control panel at:
http://localhost:8080/senaite/@@navigation-controlpanel, and in the Breadcrumbs, but not in the Navigation portlet itself.
Is it possible to retract/modify results in a worksheet after they have been verified? We made a mistake in data entry and did not realize it until the publish stage. Need to revise that result in the worksheet but its stuck in "verified" state. Thanks
I believe by default, samples must be invalidated and retested if they've made it all the way the the Verified state. They cannot be 'unverified' since that sort of implies they were not truly verified in the first place. A workflow for that could be added via an add-on though.
Hi, we have more than one lab and are trying to find out how to to limit what is visible/accessible to the separate lab managers to only what they create.Is this possible?
For example, LabManagerA can only see clients and interact with samples they create. LabManagerB is unable see/edit any of LabManagerA's clients/samples etc
Is there a straightforward way to change the Toolbar Logo in Senaite v2.x? It seems to function much differently than v1.3
If anyone is interested, Ramonski gave and answer to this question, and we have verified it works! We did notice that Mr. Developer automatically creates a renamed location for the static resources though, so we needed to use
default_methodto a AT Adapter? We have adapters that modify AnalysisRequests, but every time we try a default method we get a
OUR_CUSTOM_FIELD.default_method is neither a method of <class 'bika.lims.content.analysisrequest.AnalysisRequest'> nor a callableerror
@NEWAGE-Labs Thanks for reply on Verified state. I'll need to program capability to downgrade the state because as we are less than 100% prefect in verification. This particular batch of samples had >500 analysis results and one was incorrect. Due to inability to downgrade verification, had to start over at the beginning and re-enter all of them with new AR identifications etc. Huge chore and now the AR IDs don't match our bench sheets. That's a big problem.
@Jeff-DFWEnv Did you try the
Invalidate workflow? It should at least give you a new sample ID that matches with an addition -R1 added to indicate it is a retest. While it does not match the bench sheets exactly, there is an auditable trail inside Senaite linking the original sample to the retested sample. I believe the original results get moved over by default as well, but in an earlier state.
New to gitter, you could have guessed :)
I'm currently collecting information about communication between a LIS and instruments. I've seen that a few years ago you drafted a project called FROID that was based on OpenHIM and FHIR. Can you share why this kind of approach was not used (as far as I can tell) in Senaite ?
@phb95 Not sure if this is actually the answer you were looking for, but This post may be of interest to you.
Hello everyone, I am a new user of SENAITE I am trying to modify the design of the report issued by software so I am trying to connect crystal report to the datasource of software but I couldnt find it so is there any information how to find it or if there are better idea for report design modification I will appreciate your help
In our custom Add-On, we wanted to renamed the type 'Sample Point' to 'Sample Location'. We did this by adding the SamplePoint factory type to our GenericSetup profile types.xml file, and changing only the title in SamplePoint.xml like so:
<?xml version="1.0"?> <object name="SamplePoint" meta_type="Factory-based Type Information with dynamic views" xmlns:i18n="http://xml.zop.org/namespaces/i18n" i18n:domain="nal.lims"> <property name="title" i18n:translate="">Sample Location</property> </object>
@elirabalison You can with a Multi-Report like we did in one of ours.
Pretty much wrap the pages you want the header in inside a
tal:repeat TAL tag, and then iterate over the collection passed to the multi-report. Note The name of the report needs to begin or end with the word 'multi'. Not 100% where the code is that controls that, but I believe it is currently built in.
@NEWAGE-Labs thank you. I tried what you sait but it doesn't work. It only appear on the first page. :( I need to make the logo appear in all page on single and multi report.
How is your report set up?
For a Single report it should be straightforward if you are manually outlining each page in HTML anyway, so you just need to throw the header onto each page.
For the multi-report, you should have at least one
tal:repeat tag or attribute in the report. Everything inside of that tag is being repeated which is what creates the seperate pages. If you add your header HTML immediately inside of that element, it will be repeated as well.
When I try to add senaite.lims at eggs in buildout.cfg and run buildout, I get the following error:
usrlcl@RoADN-Test:~/Plone/zinstance$ PYTHONHTTPSVERIFY=0 bin/buildout
Couldn't find index page for 'senaite.lims' (maybe misspelled?)
Getting distribution for 'senaite.lims'.
Couldn't find index page for 'senaite.lims' (maybe misspelled?)
Getting distribution for 'senaite.lims'.
Error: Couldn't find a distribution for 'senaite.lims'.
Please advice. Thank you.