Advanced container auto-allocation
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

Advanced container auto-allocation

Administrators can configure auto-allocations based on any specimen field via JSON. E.g. specimen quantity, type, etc.

Use cases:

  1. Store 1 mL tube serum in one freezer versus 5 mL in another freezer.

  2. Store the first nine aliquots in one freezer vs the last aliquot in the backup freezer

Below JSON code allocates specimens to different boxes based on the event label, quantity, specimen requirement code and container type

{ "name": "auto-allocation", "data": { "rules": [ { "criteria": "specimen.eventLabel == 'Baseline' && specimen.initialQty == 1 && specimen.type == 'Plasma' && ['EP01', 'LP01'].indexOf(specimen.reqCode) != -1", "name": "ContainerType", "params": { "name": "-10G_Box" } }, { "criteria": "specimen.initialQty == 0.1 && specimen.type == 'Serum' && ['S02', 'S03', 'S04'].indexOf(specimen.reqCode) != -1", "name": "ContainerType", "params": { "name": "-10G_Box" } }, { "criteria": "specimen.initialQty == 0.1 && specimen.type == 'Serum' && ['S18', 'S19'].indexOf(specimen.reqCode) != -1 && visit.site == 'USB Biobank'", "name": "ContainerType", "params": { "name": "-10R_Box" } } } } ] }

In the screenshot below all the serum specimens with code S02 to S06 have assigned to box type 10G

Screenshot 2025-07-28 at 8.13.29 AM.png

 

Example use cases

Use Case

JSON Configuration

Use Case

JSON Configuration

Allocates specimens with codes S01, S02, and S03 to containers of type ‘-10S_Box’.

{ "criteria": "specimen.type == 'Serum' && ['S01', 'S02', 'S03'].indexOf(specimen.reqCode) != -1", "name": "ContainerType", "params": { "name": "-10S_Box" } }

Allocate all specimens with a requirement code containing R to ‘-10R_Box’ containers.

{ "criteria": "specimen.reqCode.indexOf('R') != -1", "name": "ContainerType", "params": { "name": "-10R_Box" } }

Allocate specimens with the requirement code U1 to '-10U_Box' containers.

{ "criteria": "specimen.reqCode == ['U1']", "name": "ContainerType", "params": { "name": "-10U_Box" } }

Auto-allocate based on custom field

You can auto-allocate the specimens to different containers based on a custom field

The user can set the default value for the custom field at the SR level.

  1. Aliquot 1 has analysis_type set as ‘Genomics’.

    Screenshot 2025-07-26 at 2.58.05 PM.png
  2. Aliquot 2 has no value set for this field.

    Screenshot 2025-07-26 at 2.57.52 PM.png
  3. Please refer to this wiki page for more details.

  4. On setting up the below JSON code, the specimens will be stored in the respective containers

    Screenshot 2025-07-26 at 2.57.28 PM.png
  5. If the analysis_type is Genomics then store the specimens in boxes with container type as ‘-80 Box 9x9’

    Screenshot 2025-07-26 at 3.22.15 PM.png
  6. If the analysis_type is not ‘Genomics’ then store the specimens in boxes with container type as ‘-20 Box’

    Screenshot 2025-07-26 at 3.21.24 PM.png
[ { "name" : "auto-allocation", "view" : null, "ctrl" : null, "data" : { "rules" : [ { "criteria" : "specimen.extensionDetail.attrsMap.analysis_type == 'Genomics'", "name" : "ContainerType", "params" : { "name" : "-80 Box 9x9" } }, { "criteria" : "specimen.extensionDetail.attrsMap.analysis_type != 'Genomics'", "name" : "ContainerType", "params" : { "name" : "-20 Box" } } ] } } ]
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com