There appears to be a bit of a discrepancy with how the BioTrackTHC system handles the QA results.

Sometimes it shows the results are there and keeps the association with the parent ID.

In other cases that relationship seems to be lost and one must know a sub-lot of a sub-lot ID to find the results.

Oh, and in that specific case one API call shows no results and another API call does provide QA results.

WTF.

Here is a brief of the data sets we are working with for these two cases.

Case One

6035 0432 0000 0179 - Flower Lot
- inventory_qa_check_all - returns full results
    [barcode_id] => 6035043200000179
    [parent_id] => 6035043200000179
    [sample_id] => 3139613752727644
- inventory_qa_check - returns full results

    + Sub Lot: 3139 6137 5272 7644 - the QA Sample
    -- inventory_qa_check_all - returns full results
        [barcode_id] => 3139613752727644
        [parent_id] => 6035043200000179
        [sample_id] => 3139613752727644
    -- inventory_qa_check - returns full results

Case Two

6033 5961 3000 0548 - Flower Lot
- inventory_qa_check_all - empty results
    [barcode_id] => 6033596130000548
    [parent_id] => 6033596130000548
    [sample_id] => 2067405476952591
- inventory_qa_check - "results have not yet been filed"

    + Sub Lot: 2067 4054 7695 2591 - Flower Lot / Not Created in WeedTraQR
    - inventory_qa_check_all - empty results, points
        [barcode_id] => 2067405476952591
        [parent_id] => 6033596130000548
        [sample_id] => 2067405476952591
    -inventory_qa_check - "results have not yet been filed"

        ++ Sub Lot: 9478 8580 0427 1386 - Flower Lot / QA Sample
        - inventory_qa_check_all - empty results
            [barcode_id] => 9478858004271386
            [parent_id] => 6033596130000548
            [sample_id] => 2067405476952591

Summary

In Case #1

This is the one we’re calling the normal case.

In Case #2

This is the one we’re calling the abnormal case.

In some cases inventory_qa_check_all by Parent is returning results and in others it is not.

In some cases inventory_qa_check by Parent shows results, other times it errantly indicates results are not filed.

In some cases inventory_qa_check_all by Sample provides results; in other cases it provides empty results and NO POINTER to the actual sub-log

In some cases inventory_qa_check by the Sample Sub Lot indicates there are no results and then inventory_check_qa for the same identifier returns results.

This inconsistent method of handling QA results and the QA result relationships concerns us.