Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

The specimens that are displayed in the table view are arranged according to their lineage. The fields that are displayed in the specimen table are configurable. The same table is displayed on the visit and specimen overview pages.

Using JSON workflow below can be configured:

  1. Fields to be displayed in the table.
  2. Content of the description column.
  3. To what level should the tree be expanded or collapsed.

As you have seen in the above screenshot, you can configure the fields(Add/remove) in the specimen table. Refer to the below code to add/remove fields.

...

Note
titleDescription Field

Fields In Table: To add the fields in the above specimen table, you need to define them in specimenTree under fields sections.(Refer below Code)


Code Block

{
    "name": "common",
    "view": null,
		"ctrl": null,
    "data": {
     "spmnDescTmpl": "<span><span ng-if=\"specimen.lineage == 'New'\">{{specimen.type}} </span> <span ng-if=\"specimen.lineage == 'Derived'\"> Derived {{specimen.type}} </span> <span ng-if=\"specimen.lineage == 'Aliquot'\"> Aliquot {{specimen.type}}</span></span> "
   }
},
{
  "name": "specimenTree",
  "data": {
    "defaultExpandDepth": 0,
   "fields": [
     {
       "name": "specimen",
       "caption": "Description",
       "type": "specimen-description",
       "width": "40%"
     },{
       "name": "specimen.type",
       "baseField": "specimen.type"
     },
     {
       "name": "specimen.label",
       "baseField": "specimen.label"
     }
   ]
  }
}


Example JSON:Download: Specimen Table Configuration.json

Specimen Tree

The specimen tree can be opened by clicking on the tree icon. By default, the tree displays <label> (<barcode>) and can be configured as needed. 

Configure Specimen Tree

In the example below, the fields included in the table are 'Description', 'Location' and 'Lab Number'. In the tree on the left, the fields displayed are specimen labels and specimen type abbreviations in the bracket. The specimen hierarchy is displayed in a collapsed view. That is, it shows only the first level of specimens like primary and its children. Any hierarchy below this will be collapsed.

Info
  1. One single block "specimenTree" can be used to configure the tree and the table.
  2. The code has to be configured in workflow JSON in the new section "specimenTree".

...

Example: On using the above JSON, below are pages where the changes will be reflected:

1. Specimens tab on the participant detail page with all the specimens for that particular participant:

2. Visit overview page: 

3. Specimen overview page:

...