Got feedback or spotted a mistake?

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

Configuring Tasks & Workflows

Who can configure workflows?

  1. Super Admins can configure workflows for different groups based on their SOPs by default

  2. Institute admins have the authority to create and update workflows created by users within their respective institute

  3. Users with "manage workflows" permission in their profile can create or update workflows, limited to those created by users within their institute

This approach ensures workflow configuration is efficiently distributed among users with relevant expertise and understanding of their institute's workflows. By tailoring workflows to each user group's specific needs, OpenSpecimen maximizes efficiency and effectiveness in specimen management and research processes.

Workflow configuration

A workflow comprises a JSON file, tasks, and one or more JS files. 

Workflow JSON

JSON file: The JSON file is named ‘workflow.json’. This file consists of all the tasks that are to be added within the workflow. 

If tasks in your workflow are related to adding specimen events like clotting, spun events, frozen events, etc., it can be configured within the JSON file.

The below table explains the various components of the workflow JSON file:

Attribute

Description

Required?

Attribute

Description

Required?

"name"

Name of the workflow. This has to be unique across the system

Example: hep-process

You cannot change the workflow's name once you import it.

Yes

"title"

Title of the workflow. This will be displayed on the UI

Yes

"shortCode"

Short Code for the workflow. This will be displayed on the UI

Yes

"activityStatus"

Activity status of the workflow

No, can be left blank. The system will add it.

"instanceNameFormat"

Name format to be used for the batches created within the workflow

Yes

"creationTime"

The time when the workflow is created

No, can be left blank. The system will add it.

"updateTime"

The time when the workflow is last updated

No, can be left blank. The system will add it.

"hasManifestTemplate"

If you are attaching any workflow manifest, the value for this should be - true. Else it is - false

No, can be left blank. The system will add it.

"description"

Description or SOP of the workflow

No

"cps"

Collection Protocols to be used for this workflow

When you add the CP in the workflow, you need to only mention either the CP ID OR CP Short title. The rest of the details will be filled up by the system

No

  • If there is no CP added to the workflow, you can scan specimens from any CP across the system. It will allow you to process them under the workflow, provided there are no additional workflow rules set up.

  • The specimens will not get added to the waiting queue, as there is no specific CP used for such workflows.

"rule"

Restrictions on specimens as to which types of specimens you wish to process under the workflow

No

"notifUserGroups"

Notifies the users from the added user group when there are any specimens added to the waiting queue for their workflows once a day

No

"tasks"

Configure all the tasks within this section

Yes

"type"

Type of the task

Yes

"name"

Name of the task

Yes

"title"

The title of the task, and will be displayed on the UI

Yes

"shortDescription"

Short description of the task that needs to be displayed along with the title

Yes

"activityStatus"

Activity status of the task

No, can be left blank. The system will add it.

"longDescription"

Detailed description of the task and steps to follow

No

"jsonConfig"

Indicates if the task is configured within the JSON file or not. Below are the accepted values:

  • false

  • true

Yes

"starterTask"

Indicates if this is the first task in workflow or not. Below are the accepted values:

  • false

  • true 

Yes

"optional"

Indicates if this task is mandatory or not. Below are the accepted values:

  • false

  • true 

Yes

"onSkipAction"

Adds a skip button to the task. Using this button, you can skip the specific task by mentioning the reason for the deviation. Below are the accepted values:

  • "COPY_INPUT" : Skips only that task, and the input is copied from the previous task over to the next task

  • "SKIP_DEPENDENTS" : Skips the depending on tasks too

Yes, if you select "optional" as “true“

"inputs"

Specify the input for each task

Yes

"userGroups"

You need to specify the user groups who would be using this workflow. If not added, the users will not have access to the workflow

Yes

Workflow JS

JS files: Each action performed on a specimen has its own task specific configuration regarding what fields should be displayed, setting default values for fields, etc.

The below table explains the various components of the workflow JS file:

Attribute

Description

Required?

Attribute

Description

Required?

defaultValues

To specify the default values within the task

No

fields

Fields to be displayed on the overview page for the task

Yes

"name"

Name of the fields

Yes

"label"

Label of the field to be displayed on UI

Yes

"type"

Type of field (span, datePicker, etc.)

Yes

"showTime"

To display time

Yes, if you wish to show the time

"validations": {
"required": {
"message": "Initial Qty is mandatory" // Message to be displayed if the user forgets to enter the value for mandatory fields
}
}

Specify validations within the task, such as making a field mandatory

No

"enableCopyFirstToAll"

Enable Copy First to all for the columns

No

readOnly

To make the fields read-only. Below are the supported values:

  • true

  • false

No

"uiStyle": {
"min-width": "80px"
}

To set the width of columns

No

The above screenshot shows the list of files to configure the heparin blood processing workflow

Fields Configuration:

Participant Level Fields

Field Name

Edit

Read Only

Field Name

Edit

Read Only

1

CP Short Title

{ "name": "cpr.cpShortTitle", "label": "Collection Protocol", "type": "cp-list", "lookup": true, "listSource": { "selectProp": "shortTitle" }, "validations": { "required": { "message": "Collection Protocol is mandatory" } } }
{ "name": "cpr.cpShortTitle", "label": "Collection Protocol", "type": "span" }
2

Name

{ "name": "cpr.participant.firstName", "label": "First Name", "type": "text", "lookupResult": true }, { "name": "cpr.participant.middleName", "label": "Middle Name", "type": "text", "lookupResult": true }, { "name": "cpr.participant.lastName", "label": "Last Name", "type": "text", "lookupResult": true }
3

Registration Date

4

Registration Site

Will Add Soon

Will Add Soon

5

PPID

6

eMPI

7

External Sub ID

8

Social Security Number

Will Add Soon

Will Add Soon

9

MRN

Will Add Soon

10

Birth Date

11

Gender

Will Add Soon

12

Vital Status

Will Add Soon

13

Death Date

14

Race

Will Add Soon

Will Add Soon

15

Ethnicity

Will Add Soon

Will Add Soon

16

Email Address

Will Add Soon

Will Add Soon

Visit Level Fields

Field Name

Edit

Read Only

Field Name

Edit

Read Only

1

CP Short Title

Not Possible

2

Participant PPID

Not Possible

3

Event Label

4

Name

5

Visit Date

6

Visit Site

7

Status

Will Add Soon

8

Clinical Status

9

Cohort

10

Surgical Pathology Number

11

Missed Reason

12

Clinical Diagnosis

Will Add Soon

13

Comments

Specimen Level Fields

Field Name

Edit

Read Only

Field Name

Edit

Read Only

1

CP Short Title

Not Possible

2

Participant PPID

Will Add Soon

Will Add Soon

3

Visit Name

Will Add Soon

Will Add Soon

4

Label

5

Labels

(For Aliquots data-entry)

Not Possible

6

Barcode

7

Lineage

Not Possible

8

Collection Status

9

Type

10

Anatomical Site

11

Laterality

12

Pathology Status

13

Initial Quantity

14

Available Quantity

15

Concentration

16

Parent Specimen Label

Not Possible

17

Biohazards

 

 

18

Location

 

19

Created On

20

Created By

Will Add Soon

21

Freeze Thaw Cycles

22

Increment parent specimen's Freeze/Thaw cycles?

 

 

23

Comments

24

Collection Date & Time

25

Collector

Will Add soon

26

Collection Container

27

Collection Procedure

 

 

28

Receiver

Will Add Soon

29

Received Date & Time

30

Received Quality

31

External Name and External Value

Custom Fields

Form/Event Fields

 

Distribution Level Fields

Supported Tasks

A workflow comprises multiple specimen actions, each of which has a specific type.

Managing Workflow (In Progress)

Create

 

Import File

Sharing Workflows with Users

Adding Specimen Rules and Waiting Queue

When you create a workflow with specific rules, ONLY the specimens matching the criterion will be allowed to use the workflow and will also get added to the waiting queue.

Configure SOP

You can add a detailed SOP as mentioned below in your workflow.json file:

Screenshot of the output:

Example JSON

 

Got feedback or spotted a mistake?

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