Can Sample/Patient Related Attributes Used in Calculations Formula

Is it possible to use sample/patient related attributes in Calculations formula?

i.e.
if [SampleType] = ‘Serum’: return [Ca]*10 elif [SampleType] = ‘Plasma’: return [Ca]*3
or
if [Sex] = ‘Female’: return [Ca]*10 elif [Sex] = ‘Male’: return [Ca]*3

Thanks in advance.

Hi @erikking,

you can do so with an external calculation:

TLDR; You get the parent from the analysis (which is the sample) and find out the patient sex from there.

If you would like to have specifications based on a patient sex/age/ethnicity etc., you would probably want to have a dynamic analysis specification adapter implemented:

Hope this helps,
best regards
Ramon

Thanks a lot for helping. I think I got your point. Since the calculation is called from there

should get parent (analysis) information easily.

I will do a try for that. Thanks again, it helps.