Configure Specimen Collection Page (nth Step)


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 as shown below:

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

  1. 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:

  • 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).

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 { "name": "specimenCollection", "data": { "visitFields": { "title": "Visit Details", "fields": [ [ { "name": "", "baseField": "", "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": "" }, { "name": "events.SpecimenFrozenEvent.user", "baseField": "" }, { "name": "events.SpecimenFrozenEvent.frozenMethod", "baseField": "" } ] } ] } }

The below table explains different sections of the nth step: 






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.


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


Title of each section/table in the nth step.


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

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


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.

Hide table code snippet

1 2 3 4 5 6 7 8 9 10 11 12 13 { "title": "Aliquots: Processing Details", "criteria": { "rules": { ... } }, "enableCofrc": false, "hideTable": true, "fields": [ ... ] }

Hide column code snippet

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 { "title": "Frozen Details", "criteria": { "rules": { ... } }, "enableCofrc": false, "fields": [ { "name" : "events.SpecimenFrozenEvent.frozenMethod", "baseField" : "", "caption" : "Frozen Method", "defaultValue" : "Not Specified", "hideColumn" : true }, ... ] }

Example: The processing event information for child specimens needs to be derived from its parent specimen automatically. Previously, to achieve that, you 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.

See the below example screenshot:

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

  • After hiding the 'Aliquot: Processing Details'.

Example JSON


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


  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, you will collect different times in the nth step.

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

1 2 3 4 5 6 7 8 9 10 11 { "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" : "current_date", // defaults collection date to current 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:





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