Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
ckgathi
@ckgathi
i am trying to pull data out of the system and push to an excel file
example result for an analysis request
i will look at the documentation you provided above
Ramon Bartl
@ramonski
Hi @ckgathi, although Excel is kind-of capable to use external resources and read JSON/XML, you will probably be better adviced to write a short Script (Python) to export the relevant data into CSV format.
See here: https://github.com/ridingbytes/it-training/blob/master/docs/scripting.md#export-analysis-requests-to-csv
ckgathi
@ckgathi
i will have a look and try this out
thanks @ramonski and @xispa
pioneerpathan
@pioneerpathan

Hello All,

I am moving test server DB to live server and I want to remove/delete all the test data like "AnalysisRequests" etc. but not master data like SampleTypes, AnalysisService etc.

How I can achieve this ?

kimmu
@kimmu
also, how can we contribute to the documentation? like is there a gdrive or somethin or we make our own docu?
Ramon Bartl
@ramonski
Hi @kimmu, we are working at the moment on a user-documentation at https://github.com/senaite/senaite2.com. Contributing is therefore possible with the usual GitHub workflow and Pull Requests. However, it is at the moment heavily under work, so better wait with contributing PRs until we have officially published the site.
kimmu
@kimmu
Thank you @ramonski !
pioneerpathan
@pioneerpathan

Hello All,

I am moving test server DB to live server and I want to remove/delete all the test data like "AnalysisRequests" etc. but not master data like SampleTypes, AnalysisService etc.

How I can achieve this ?

I know there is security enhancement implemented in latest release of senaite.core that even admin can't delete the objects.

But there is a scenario in which as stated in quoted caption I want to know that how it can be achieved. I think there should be a mechanism to achieve this. If i want to allow "admin" to delete ARs, what code changes may require ? where I need to tinker the code ?

I also want to reset ID for ARs after deleting ARs from ID-server functionality. How it is possible?

Ramon Bartl
@ramonski
@pioneerpathan: The only possibility to delete objects and reset the ID Server is through a Python Script or via the Debug shell (bin/instance debug). Both variants require in depth knowledge of the Code and the architecture of the content objects.
Therefore, there is no easy step-by-step guide how to achieve this.
Best option you can do is to manually carry-over the setup configuration from your test instance to your productive instance.
pioneerpathan
@pioneerpathan
Thanks @ramonski. I will do it manually. But this could be a ideal situation for many others. we should have exhaustive solution of it. It would also help in maintenance and support activity as well in production environment.
Jordi Puiggené
@xispa
@pioneerpathan this functionality you are asking for will probably never be implemented in senaite lims. Amongst other reasons, Senaite is a LIMS and as such, needs to be aligned with the rules and policies from ISO, GLP, etc. If senaite had this functionality, then what about integrity of data? what about traceability?
Think about an accountancy program. Don't think they allow you to entirely remove the invoices. If you wanted to do so, you'd probably ask a skilled sql developer to "inspect" the database, remove the records you want to boil out and also add some logic (as reset the id of invoices to prevent gaps when new invoices are created).
You see, almost the same is what you have to consider for this to be done in Senaite.
If you just only want to test functionalities to find-out what's the best approach for your lab, then I strongly recommend to setup a pilot instance and maybe, maybe (if it becomes too tedious for you to "replicate" the "structure"), use jsonapi to recreate "setup" objects in the production one later.
Jordi Puiggené
@xispa
Other thing is that you or others create and add-on, not integrated in core, for this specific purpose
pioneerpathan
@pioneerpathan

Thanks @xispa for your detailed view about the functionality. My intention to provided such facility was through ZMI which is accesible by Plone Admin only not by ordinary users. Because, through ZMI Plone Admin can do various critical and important activities like managing catalog and indexes etc. which can be considered as job DBA (Database Administrator).

In ZMI one can register/add python script. And using python script it was possible to delete the objects. The script is now not able delete the objects because the implementation of enhanced security to maintain integrity of system. I completely agree about integrity and consistency of the system. I was making point in different context.

Anyway, I will find out the other way to meet the requirement. Sorry, for embarrassing. you and thanks a lot for showing the roadmap of senaite lims.

Andrew Eliasz
@andywel_gitlab
I am working on a set of Python 3 Plone modules ... to prepare for the eventual migration of Senaite to a Python 3 based version of Plone ... Any pointers as to where the Python 2 to Python 3 migration effort concerning Senaite / BIKA Lims is heading ?
Jordi Puiggené
@xispa
Hi @andywel_gitlab , here you can find some of the most important steps we have in mind to follow for the migration: https://github.com/senaite/senaite.core/blob/master/P8_UPGRADE_GUIDE.md#roadmap
As you can see, we are also planning to use six library for Python 2/3 compatibility during the migration. First steps towards Python3 will start next week, but we'll do little by little. The idea is to start with the easiest Archetype content types first - e.g. Method, AnalysisCategory, SampleType - and continue gradually with those that have more complexity. This will allow us to face the challenges we may encounter little by little until the whole dance is done. We also plan to setup a migration utility that we will keep updating at the same pace we are porting things to Py3
Zed Harold
@zed_harold_twitter
Hello everyone. I have seen that there are around 39 supported data interfaces of instruments for automatic importing of results in Senaite LIMS. May I ask which python codes are designated for the instrument integration? Would it be possible to add other data interfaces (e.g. Illumina Sequencers) to the system? Thank you very much.
Jordi Puiggené
@xispa
Hi @zed_harold_twitter , interfaces for instruments can be found here: https://github.com/senaite/senaite.core/tree/master/bika/lims/exportimport/instruments
For instance, this is the python code of the instrument import interface for Abbott m2000rt: https://github.com/senaite/senaite.core/blob/master/bika/lims/exportimport/instruments/abbott/m2000rt/m2000rt.py
Note these interfaces rely on files (mostly CSV). In case you want to integrate instruments through serial with ASTM protocol, an add-on for that is undergoing and will probably be ready for public use in a a few days.
ckgathi
@ckgathi

@here

I am trying to create an analysis request from another system using the jsonapi, is there a piece of code somewhere where i can see the plone json api being used or some project where i can see examples of a create, view, delete...being done even if its in senaite.jsonapi

i was looking at this but not sure i am on the right track https://www.npmjs.com/package/axios#example
Jordi Puiggené
@xispa
Hi @ckgathi note the creation of Samples (aka AnalysisRequest) through JSON API is not supported atm: senaite/senaite.jsonapi#31
Jordi Puiggené
@xispa
JSON API hould support it, but there was no active development since a while and because of this issue reported recently, we realized 3d ago this functionality is atm not working
Ramon Bartl
@ramonski
Just a note, because this is confusing:
We have senaite.jsonapi, which was initially planned as successor for the internal JSON API that ships currently with senaite.core. The Sample creation does currently not work with the internal JSON API only, but should work with senaite.jsonapi.
ckgathi
@ckgathi
ok all the above noted
@ramonski are you saying i should be able to use senaite.jsonapi to create a sample
?
Ramon Bartl
@ramonski
Well, it worked once: https://github.com/bikalims/bika.lims/pull/2021#issuecomment-297084266
But there was not much development since quite a while
Zed Harold
@zed_harold_twitter
@xispa @ramonski Thank you very much for the answers. We greatly appreciate the quick responses.
Ramon Bartl
@ramonski
@pioneerpathan: If you like you can test senaite/senaite.core#1463 to export the base content structure from your testing to the productive instance. It is still in prototype phase, so your feedback would be welcome.
pioneerpathan
@pioneerpathan
Sure @ramonski . I will test the export functionality for base content structure and revert back with my feedback. Thanks for considering me.
kimmu
@kimmu
hi guys, where can i look into the guideline compliance of senaite? (like HIPAA compliance for health, ISO, etc) ... and is there some sort of development for electronic signature/validation? because we're planning to make an add-on if ever?
Jordi Puiggené
@xispa
Hi @kimmu ,you might find this document useful: https://community.senaite.org/t/21-cfr-part-11-compliance-gap-analysis/321
kimmu
@kimmu
Thanks @xispa! Perfect. This is what I've been lookin for.
kiwi3007
@kiwi3007
image.png
Hello, is the above a bug? We don't seem to be able to batch submit results.
Pau Soliva
@Espurna
@kiwi3007 I am not aware of this, can you specify your Senaite version?
kiwi3007
@kiwi3007
@Espurna How would I check this? The installation was last Friday, I suspect its the most current version.
Pau Soliva
@Espurna
I deduce that you are not using the source code, hence you are running Senaite 1.3.1
Can you submit all of them separetly?
Ramon Bartl
@ramonski
@kiwi3007: This is a know bug senaite/senaite.core#1250
Anyhow, we will likely remove the results entry from bachbooks (or the batchbooks themselves) completely.
kiwi3007
@kiwi3007
They can be submitted separately, but not via the batch book section, only through each individual sample page.
Ramon Bartl
@ramonski
Yes, that is the supported way.
or via Worksheets
kiwi3007
@kiwi3007
Will there be an option for batch results entry? This would change how we set up our analysis.
I'm still figuring out worksheets. That may be the best option for us if it allows batch entry.
Ramon Bartl
@ramonski
At the moment none of our clients is requesting this, so there is no funding to invest efforts in this section.
We usually continue with removing dysfunctional code like this from the core.
Worksheets operate on Analysis level and the selection of Analyses currently does not support filtering by batches. However, they support selecting Analyses by their Request ID and Client. So I would recommend to introduce all results in Worksheets, because it also allows you to import results from instruments.