Versions Compared

Key

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

You can configure the derivative/aliquot page based on the different criteria. This helps you eliminate the unwanted fields that are not needed on derivative/aliquot pages.

OpenSpecimen allows you to configure the derivative/aliquot page at the 'Collection Protocol' level and 'System Level'.

Table of Contents

Protocol-level configuration

If you want to configure the derivative/aliquot page for a specific collection protocol, use CP level workflow JSON.

Refer to the 'Protocol Level Configuration' page to set the JSON file to the specific CP.

Derivative Page Configuration

To configure the derivative page user needs to add the "derivedSpecimens" section in the "data" block mentioned in the below JSON.

...

Screenshot: Create a derivative page after JSON configured columns. 

Aliquot Page Configuration

To configure the aliquot page user needs to add the "aliquotsCollection" section in the "data" block mentioned in the below JSON.

...

Screenshot: Create aliquot page after JSON configured columns

System-level configuration

...

Refer to the 'System-Level Configuration' page to set the System- Level Workflow.

...

Screenshot: Create derivatives and aliquots from the cart page

Image RemovedImage Added

Screenshot:  Cart view page → Create Derivative Page

Image RemovedImage Added

Screenshot:  Cart view page → Create Aliquot Page

Image RemovedImage Added

Extra features in creating derived and aliquot page

Hide 'Copy first to all' link on derivative and aliquot pages

...

There is a button 'Copy first to all' on the aliquots and derivatives pages, which will allow creating similar aliquots and derivatives at once. Some users do not need this as a similar type of children are generally created in a single row, and 'Copy first to all' might be confusing.

...

Code Block
{
    ...
    "aliquotsCollection": [
      ...
      {
        "title": ...,
        ...,
        "hideCopyFirstToAll": true
        ...
      },
      ...
    ],

   "derivedSpecimens": [
      ...
      {
        "title": ...,
        ...,
        "hideCopyFirstToAll": true
        ...
      },
      ...
    ],
    ...
  }

Before configuring the JSON, the "Copy first to all" button is present on Create derivative page:

Image RemovedImage Added

After configuring the JSON, "Copy first to all" button is hidden on Create derivative page:

Image RemovedImage Added

After configuring the JSON, "Copy first to all" button is hidden on Create aliquot page:

Image RemovedImage Added

Add ability to create aliquots from the 'Create Derivatives' page

Added an option to allow users to create aliquots when creating unplanned derivatives. The default system workflow includes the option to create aliquots.

...

Code Block
titleCode:
{
      "name": "specimen.createAliquots",
      "caption": "Create Aliquots?",
      "icon": "fa fa-share-alt",
      "type": "toggle-checkbox",
      "width": "30px"
    }


Image RemovedImage Added

Example JSON:

Code Block
titleExample JSON
collapsetrue
{
  "name" : "common",
  "view" : null,
  "ctrl" : null,
  "data" : {
    "derivedSpecimens" : [ {
      "title" : "Derived Specimens",
      "criteria" : {
        "rules" : [ {
          "field" : "specimen.parent.id",
          "op" : "exists"
        } ]
      },
      "enableCofrc" : false,
      "fields" : [ {
        "name" : "specimen.parent.label",
        "caption" : "Parent Specimen",
        "type" : "span",
        "url" : "specimen({specimenId: specimen.parent.id})"
      }, {
        "name" : "specimen.parent.type",
        "caption" : "Parent Type",
        "type" : "span"
      }, {
        "name" : "specimen.label",
        "caption" : "Label",
        "type" : "text",
        "optional" : false,
        "showIf" : {
          "tabMode" : true,
          "op" : "OR",
          "rules" : [ {
            "field" : "viewCtx.inputLabels",
            "op" : "==",
            "value" : "true"
          } ]
        },
        "copyValueFn" : "function(firstRowVal, currentVal) { if (!!currentVal) { return currentVal; } else { return ''; } }"
      }, {
        "name" : "specimen.parent.availableQty",
        "caption" : "Parent Quantity",
        "type" : "span",
        "width" : "120px"
      }, {
        "name" : "specimen.type",
        "caption" : "Type",
        "type" : "specimen-type",
        "specimen" : "specimen",
        "optional" : false,
        "width" : "185px"
      }, {
        "name" : "specimen.initialQty",
        "caption" : "Quantity",
        "type" : "specimen-quantity",
        "specimen" : "specimen",
        "optional" : true,
        "width" : "100px"
      }, {
        "name" : "specimen.createdOn",
        "caption" : "Created On",
        "type" : "date",
        "optional" : true,
        "defaultValue" : "current_date"
      }, {
        "name" : "specimen.createdBy",
        "caption" : "Created By",
        "type" : "user",
        "defaultValue" : "current_user",
        "optional" : true,
        "listSource" : {
          "queryParams" : {
            "static" : {
              "excludeType" : "CONTACT"
            }
          }
        }
      }, 
      {
        "name" : "specimen.storageLocation",
        "caption" : "Location",
        "type" : "storage-position",
        "optional" : true,
        "cpId" : "specimen.cpId",
        "entity" : "specimen",
        "width" : "240px",
        "copyValueFn" : "function(firstRowVal, currentVal) { if ((!!currentVal && !!currentVal.reservationId) && (!!firstRowVal && 					!!firstRowVal.reservationId)) { return currentVal;} else if (firstRowVal) { return { id: '', name: firstRowVal.name, mode: firstRowVal.mode, positionX: '', positionY: '', position: '', reservationId: '' };} else { return {}; }}"
      }, {
        "name" : "specimen.createAliquots",
        "caption" : "Create Aliquots?",
        "icon" : "fa fa-share-alt",
        "type" : "toggle-checkbox",
        "width" : "30px"
      }, {
        "name" : "specimen.printLabel",
        "caption" : "Print",
        "icon" : "fa fa-print",
        "type" : "toggle-checkbox",
        "width" : "30px"
      }, {
        "name" : "specimen.closeParent",
        "caption" : "Close Parent",
        "icon" : "fa fa-ban",
        "type" : "toggle-checkbox",
        "width" : "30px",
        "defaultValue" : false
      } ]
    } ]
  }
}, 

...