Passing test results/values

Issue #224 resolved
Philip Parsons created an issue


is it possible to pass test results/values between test lists in the same test list cycle?

I'd like to be able to (for example) pass the average reading results from an output dose calculation test list and use that in another test list for calculating ratios (without needing to re-enter the average results manually).

Or for example, putting the pressure in for a 6MV output test and then having it fill in the 10MV output test in the same test list cycle. Ideally, it would be possible to change this value, but to have it auto-fill would be very useful.

Thanks again, Phil.

Comments (3)

  1. Philip Parsons reporter

    Actually, I think I've solved it from the Google pages!

    from django.utils import timezone from import TestInstance

    try: exists = TestInstance.objects.filter( unit_test_infotestslug="pressure", unit_test_infounitnumber=META["unit_number"], #test_list_instancetest_listname="weeklyphotonoutput6mv",


    except TestInstance.DoesNotExist: exists = None

    if exists is None: todaysPressure = 0 # default value else: todaysPressure = exists.value

  2. Randle Taylor

    Hi Philip,

    Looks like your on the right track...currently the only way to grab the data is to query the database directly like that although we may provide a nicer API for stuff like this in the future.

    At this point it's not possible to autofill and make the value modifiable.

    If you need help getting your query correct, please feel free to post in the Google forum :)

    Cheers, Randy

  3. Log in to comment