Senaite v2.5.0 calculations applied to more than one result per analysis?

I have an analysis that has three results: x, y, and z where x is the “main” result, y and z are additional result variables under the Results options tab.

I’m using an external calculation that returns the values for x, y and z as a tuple ( I can make this a list for indexing) . For example (36.7, 26.1, 50.3)

Is there a way that I can specify the x as the first index, y as the 2nd index and z as the 3rd index?

Or could I structure the data to use a dictionary with the result variable keywords as keys?

Basically, I would like the calculation to calculate and input the result and the 2 results variables, is this possible?

Thanks in advance!

I don’t fully understand your topic:

You’re somehow calculating x,y,z outside the lims and entering them manually as results into the lims using the one described analysis service.
Do you want another calculation inside the lims using x,y,z as input to compute a fourth result?

First of all, thank you for your response and my apologies for my question not being clear.

I’ve made a “Test” Analysis Service with two additional result variables: Result X and Result Y

And I created a calculation using an external python module called hpc and the function get_mpn_value()

Here is a test sample result entry:

I wanted the user to enter an interim result in “Test”, and have the calculation populate the Result X, Result Y and Result fields. My get_mpn_value() function would return a list [x, y, z].

I think I was being too ambitious without understanding all of the underlying code. I ended up creating individual Analysis Services for Result X and Result Y, and found a less elegant but functional solution. It should work for our purposes and give me time to try to learn more about Senaite.

Again, thanks to you and everyone who is contributing to this project!