Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Introduction

OpenSpecimen allows specimens to be collected as per a specific event calendar for clinical trial based protocols. This allows you to pre-define specimens in CP and collect planned specimens using the as shown below screen:

...

However, this page does not have all fields that might be required for a specific protocol. Using CP workflows configuration, the administrator you can configure additional fields to be captured after this step. 

  1. Steps to add Refer to the wiki page for information on adding workflow at the CP level-Collection Protocol Level Configuration section.

  2. Example JSON to configure the setup that is shown in the screenshot below.

View file
namenth_step.json

Once the workflow is uploaded, refresh your browser page once and then collect samples. After the specimen collection page, the below page appears.

  1. :

...

  • The subform field is not supported in the nth step. This is because the sub-form is a 1:many relation with the main form, and it is not possible to display the 1:many field in the nth step.

  • A radio button is not supported on the nth step.

...

  • Once the workflow is uploaded, refresh your browser page once and then collect samples.

  • The nth step page will appear after the default specimen collection page.

Example: Show ‘Processed By' and ‘Processed Time’ fields only for 'PBMC’ and 'Plasma' samples.

...

Configure

...

Visit Fields on nth Step

...

The visit fields - 'Clinical Diagnoses', 'Clinical Status', 'Surgical Pathology Number' etc. are not displayed on the specimen collection page when collecting planned samples. The specimen collection page is currently not configurable to add visit level fields. These fields can be configured on the nth step (page after specimen collection).

Info

...

'visitFields' section is used to add visit fields on the specimen collection page.

Expand
titleClick here to see the JSON code..
Code Block
languagejson
{
    "name": "specimenCollection",
    "data": {
      "visitFields": {
        "title": "Visit Details",
        "fields": [
          [
            {
              "name": "visit.name",
              "baseField": "visit.name",
              "type": "span",
              "width": "150px"
            },
            {
              "name": "visit.clinicalDiagnoses",
              "baseField": "visit.clinicalDiagnoses",
              "width": "200px"
            },
            {
              "name": "visit.comments",
              "baseField": "visit.comments",
              "width": "200px"
            }
          ]
        ]
      },
      "fieldGroups": [
        {
          "title": "Frozen Event",
          "criteria": {
            "op": "AND",
            "rules": [
              {
                "field": "specimen.specimenClass",
                "op": "==",
                "value": "'Tissue'"
              }
            ]
          },
          "fields": [
            {
              "name": "specimen.label",
              "baseField": "specimen.label",
              "type": "span"
            },
            {
              "name": "specimen.type",
              "baseField": "specimen.type",
              "type": "span"
            },
            {
              "name": "events.SpecimenFrozenEvent.time",
              "baseField": "specimen.events.SpecimenFrozenEvent.time"
            },
            {
              "name": "events.SpecimenFrozenEvent.user",
              "baseField": "specimen.events.SpecimenFrozenEvent.user"
            },
            {
              "name": "events.SpecimenFrozenEvent.frozenMethod",
              "baseField": "specimen.events.SpecimenFrozenEvent.frozenMethod"
            }
          ]
        }
      ]
    }
  }

The below table explains different sections of the nth step: 

Section

Details

visitFields

If visit fields need to be displayed on the nth step, this section needs to be added. There will be only one section of this displaying one row for a visit being collected.

fields

Within visitFields section, include all fields to be displayed in a table format within the 'fields' section of JSON. 

title

Title of each section/table in the nth step.

fieldGroups

If fields need to be displayed in separate sections or tables, there multiple sections can be multiple sections within fieldGroups.

For example: 'Primary Specimen details', 'Aliquot details' etc. Each section can have a title, criteria and set of fields.

criteria

This defines conditions for displaying fields in each section. For example 'Centrifuge event details' section can be displayed only for 'Whole Blood' & 'Primary' specimens.

Screenshot after specimen collection page configuration:

Hide

...

Fields/Table on

...

Specimen Collection Page (v7.1)

The idea is to allow CP admins to hide the columns/tables whose values are derived from the other field values displayed on the screen and submit them to the backend/API.

Expand
titleClick here to check the code snippet...

Hide table code snippet

Code Block
languagejson
{
      "title": "Aliquots: Processing Details",
      "criteria": {
        "rules": {
          ...
        }
      },
      "enableCofrc": false,
      "hideTable": true,
      "fields": [
        ...
      ]
    }

Hide column code snippet

Code Block
languagejson
{
      "title": "Frozen Details",
      "criteria": {
        "rules": {
          ...
        }
      },
      "enableCofrc": false,
      "fields": [
      {
        "name" : "events.SpecimenFrozenEvent.frozenMethod",
        "baseField" : "specimen.events.SpecimenFrozenEvent.frozenMethod",
        "caption" : "Frozen Method",
        "defaultValue" : "Not Specified",
        "hideColumn" : true
      },
        ...
      ]
    }

Example: In the screenshot below, the The processing event information for child specimens needs to derive be derived from its parent specimen automatically. Previously, to achieve that, you need would have to show that fields/table in the step. As a resolution, now you will be able to hide the fields and tables on the step.

...

  • Before hiding the 'Aliquot: Processing Details' section in the speciemenCollection page.

    Image Removed
  • Image Added
  • After hiding the 'Aliquot: Processing Details'.

  • Image RemovedImage Added
  • Download example JSON to see the above configuration.

View file
nameHide_table_Column.json

...

Example JSON

Download

Show/Hide Visit, Collection and Received Event Fields (v7.1)

Use-Cases

  1. Sometimes specimens are collected in the clinic but not yet received by the biobank when the clinic staff enters the details. So the received event is not needed on the specimen collection page.

  2. Collection times are different for each primary specimen. So instead of collecting one time for all, the user you will collect diff different times in the nth step.

The options are to be added in the specimenCollection section of the workflows JSON as illustrated below:

Code Block
languagejson
     ...
  {
  "name": "specimenCollection",

    "data": {
       "showVisitDetails": false,
 
     "showCollectionEvent": false,
       "showReceivedEvent": true,
 
     "defReceiveQuality": "To be Received",  //defaults received qualtity to 'To be Received'

      "defCollectionStatus" : "Collected",    //defaults collection status to 'Collected'
       "defCollectionDate" : "nonecurrent_date",           // defaults collection date to blankcurrent date. The supported values are none, current_date and visit_date
       ...
    } }

The above configuration hides visit fields, collection event fields and displays the received event fields. When the above configuration is not present, all the fields are displayed by default.

...

From v8.1, the collection and receive dates would be blank by default. You can set the collection and receive dates as below:

Code

Description

defCollectionDate = 'visit_date'

...

The common collection and

...

receive dates will be the same as whatever is populated in the visit date field.

...

defCollectionDate = 'current_date'

...

The collection and

...

receive dates will be the current/present date/time.

...

defCollectionDate = 'none'

...

You are forced to select a date for collection and received fields.

Screenshot before configuration:

...

Screenshot after configuration:

...

...

Example JSON

...

Download