Got feedback or spotted a mistake?

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

Additional Components

In OpenSpecimen, we have features like auto-allocation, data validation (edit checks), etc. Some of these are also supported in workflows.

Container Auto-allocation

You must choose between the two allocation strategies and set them at the protocol level to use auto allocation in workflows. Refer to the wiki page for more details.

Once the auto-allocation is set up at the CP level, you need to add the below code in your workflow JSON:

enableAutoContainerAllocation: true,

Below is a JS file for reference:

Group assigner

You can add a group assigner within your workflow for respective tasks.

Example 1: User scans a total number of 4 specimen tubes (1 is SST, and 3 are EDTA). EDTA tubes should go for ficoll isolation, and SST should go for clotting.

Code to be added within workflow JSON:

{     "type" : "group-assigner",     "name" : "task-assigner-1",     "title" : "Select Next Task",     "shortDescription" : "Assign tubes for next tasks",     "activityStatus" : "Active",     "longDescription" : "Points to consider when receiving specimens: <ul> <li> Send SST tubes for clotting </li> </ul><ul> <li> Send EDTA tubes for ficoll isolation </li> </ul><ul> <li> Send Citrate tubes for seperating out plasma and buffy coat </li> </ul>",     "jsonConfig" : false,     "starterTask" : false,     "optional" : false,     "inputs" : [ {       "sourceTask" : {         "type" : "update-specimens",         "name" : "receive-specimens",         "title" : "Receive Specimens",         "shortDescription" : "Receive the whole blood tubes that have to be processed",         "activityStatus" : "Active"       },       "sourceKey" : null     } ],     "userGroups" : [ ]   }

Below is the JS file:

Example 2: If the anatomic site of fresh tissue is the ‘Thyroid gland', it should go for the pool specimens step, and if the anatomic site is the 'Parathyroid gland’, it should go for the fixation step.

Code to be added within workflow JSON:

{ "type" : "group-assigner", "name" : "task-assigner", "title" : "Next Task Assigner", "shortDescription" : "Assign next task to tissue samples", "activityStatus" : "Active", "longDescription" : "Decide if you want to pool the fresh tissue specimens and then process them further or directly start processing the samples as is.", "jsonConfig" : false, "starterTask" : false, "optional" : false, "inputs" : [ { "sourceTask" : { "type" : "update-specimens", "name" : "receive-specimens", "title" : "Obtain a fresh specimen", "shortDescription" : "Obtaining fresh specimens from collection centers", "activityStatus" : "Active" }, "sourceKey" : null } ], "userGroups" : [ ] }

Below is the JS file:

Skip Tasks

When defining your workflow, you configure it based on the standard procedure. However, there may be deviations for some batches of specimens where you do not perform specific tasks. In such cases, you will be able to skip those tasks. 

When a task is skipped, you must specify its reason, and a ‘Deviation Event’ is added to the specimens.

Code

Description

"onSkipAction" : "SKIP_DEPENDENTS"

The dependent tasks are skipped too.

"onSkipAction" : "COPY_INPUT"

The input of the last task is copied over to the next task.

 

Below is the example code:

Remove Specimens

Once you start a batch, there are chances that you want to remove one or more specimens from the batch due to any of the reasons stated below:

  1. One of the specimens got damaged as it fell on the ground, and the tube broke.

  2. The quantity received was insufficient.

  3. The blood tube had blood clots.

  4. The tube received was already frozen.

  5. An incorrect specimen was selected from the waiting queue and added to the batch.

Skip Mode

You can remove the specimens from a batch/task and specify the reason for it. A deviation event will be added to that specimen.

NOTE: The skip mode will behave differently based on the type of task, as stated below:

Task Type

Behavior

Task Type

Behavior

"type" : "update-specimens"

You will get an option asking if you want to ‘Skip only this task' or 'Skip all remaining tasks’. You can select one and specify the reason.

"type" : "create-derivatives

It will not give you an option and will only ask for a reason for removing the specimens.

"type" : "form-data-entry"

You will get an option asking if you want to ‘Skip only this task' or 'Skip all remaining tasks’. You can select one and specify the reason.

"type" : "create-pooled"

There is no option of remove specimens from this task. If you wish to skip the task, you can add the ‘Skip' button for this step. Refer to 'Skip Tasks’ section.

"type" : "create-aliquots"

It will not give you an option and will only ask for a reason for removing the specimens.

Skip only this task

If you want to remove the specimen only from a specific task, select the 'Skip only this task' option and specify the reason:

Skip all remaining tasks

If you intend to skip all the tasks for a specimen, select the 'Skip all remaining tasks' option and specify the reason:

Remove from batch (v10.0)

If you added a specimen accidentally to the batch, you can remove it. This specimen will now get added back to the waiting queue.

  • This option will only be available at the starter task.

  • The specimens will go back to the waiting queue only if they were selected from the waiting queue to start a batch.

Dispose Specimen (v10.1)

Sometimes after receiving a specimen or after creating multiple aliquots, the tube may get damaged or broken by falling on the floor or spilling of the sample. As a result, you might want to remove the specimens from the batch and mark them as disposed/closed.

Calculations based on various parameters

We have supported calculations based on multiple parameters within the workflows' module to make the data entry easy and avoid errors. This section will walk you through multiple calculation examples.

Live Calculation

To get a total cell count, you must multiply it by the cell count per ml with the dilution factor. It becomes difficult to manually calculate it on a calculator and then enter it in OpenSpecimen, leading to errors.

To avoid manual data entry errors and save time, we have added this feature where the calculation is done based on two fields (default and custom fields; both are supported).

Serum aliquots count & quantity based on primary specimen quantity

Usually, the quantity and count of aliquots are standard based on the parent specimen quantity. For example, a whole blood specimen of 10ml collected in a serum separator vacutainer should produce 6 aliquots of 0.5ml each, and a 3.5ml should produce 2 aliquots of 0.5ml.

PBMC aliquots count & quantity based on parent quantity

The number of PBMC aliquots to be created, and the quantity can be calculated based on its parent (derivative quantity). The calculation should be done as below:

Parent Quantity (millions)

No. of PBMC aliquots

Quantity of aliquots

Parent Quantity (millions)

No. of PBMC aliquots

Quantity of aliquots

128

9 aliquots → 8 + 1

8 aliquots of 10 million

1 aliquot of 48 million

1000

23 aliquots → 8 + 15

8 aliquots of 10 million

15 aliquots of 50 million

44.5

4

4 aliquots of 11.125 million

Calculate Spun Time based on Received Time and Spun Duration

Calculate Spun Time based on Clotting Time and Spun Duration

Edit Checks (Data Validation)

Data validation is used to enter high-quality data. This ensures that the user does not violate any data entry rules while entering the data. Refer to the wiki page for more details.

Pool Specimens Task

Pooling is the process of merging one or more specimens of the same patient or multiple patients into a single specimen. Refer to the wiki page for more details.

Workflow Manifest

Manifests are PDF files that can be downloaded or printed while processing specimens or after specimen collection. Refer to the wiki page for more details.

Configure participant fields within tasks (v10.0)

Use case: Within a batch, there can be specimens from multiple participants. Just having a PPID for each task is not helpful, as it is just a unique identifier that the lab users do not understand. Having PHI data like D.O.B and Participant’s Name on each task will help them in distinguishing which patient's specimen they are dealing with and help in the reduction of errors. To configure participant fields in your workflow, refer to the JavaScript files of the tasks on this wiki page (Example 6).

Form View Mode (v10.1)

When you start a batch, all the specimens in the batch might have the same values for certain fields within the form or update tasks. For example, if you have four whole blood tubes that undergo a wash step, the dilution volume and the date and time for all tubes will be constant. In such cases, it is easier if you can do it in a form mode where you need to enter the data only once, which will then copy the same values on all specimens within the task.

Remove Queued Specimens

If you have a similar set of rules for multiple workflows, a specimen gets added to the waiting queue multiple times for each workflow. When you pick the specimen from the waiting queue to start a new batch, you would want that specimen to be removed from the queue and no longer be used for other workflows.

Got feedback or spotted a mistake?

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