Subset PVs & User Dropdown
Got feedback or spotted a mistake?

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

Subset PVs & User Dropdown

This feature is useful when a dropdown has a long list of values, but you want to show only a limited set of options for a specific study.

Subset PVs

Please find the examples below to show the specific/restricted values in the field dropdown for the PV fields.

Show few sites in visit site dropdown

It is possible to restrict the visit site to show only a few sites as per the user needs.

Use the below code block example and add it in the dictionary

{ "name": "visit.site", "caption": "Site", "type": "dropdown", "multiple": false, "optional": false, "listSource": { "options": [ { "value": "Test Ankita v8.1", "displayValue": "Test Ankita v8.1" }, { "value": "Training Site Ankita", "displayValue": "Training Site Ankita" }, { "value": "Testing v8.1", "displayValue": "Testing v8.1" } ], "displayProp": "displayValue", "selectProp": "value" }, "showIf": { "op": "AND", "rules": [ { "field": "visit.status", "op": "!=", "value": "Missed Collection" } ] } }

After configuring the JSON workflow, the 'Site' dropdown shows only selected sites:

image-20250723-060635.png

Display only two values for gender

Restrict dropdown values for gender up to two ‘Male’ and ‘Female’.

Use the below code block example and add it in the dictionary

{ "name": "cpr.participant.gender", "caption": "Gender", "type": "dropdown", "optional": true, "defaultValue": "Female", "listSource": { "options": [ { "value": "Male", "conceptCode": "M" }, { "value": "Female", "conceptCode": "F" } ], "displayProp": "value", "selectProp": "value" } }

After configuring the JSON workflow, the 'Gender' dropdown shows only two genders, "Male" and "Female":

image-20250723-061754.png

Show 'Whole Blood' value under 'Fluid' and 'Fixed Tissue Block' under 'Tissue' class

Restrict specimen type to specific class.

Use the below code block example and add it in the dictionary

{ "name": "specimen.type", "caption": "Type", "type": "specimen-type", "specimen": "specimen", "optional": false, "defaultValue": "Whole Blood", "options": [ { "specimenClass": "Fluid", "type": "Whole Blood" }, { "specimenClass": "Tissue", "type": "Fixed Tissue Block" } ] }

After configuring the JSON workflow, the 'Type' dropdown shows only the selected specimen type:

image-20250723-062404.png

Subset User Dropdown

You can configure a limited user list to simplify and speed up data entry. If only 4–5 users need to be selected, this avoids the need to search through the entire list of users each time.

List a subset of users in biobank technician dropdown

It is possible to restrict ‘Biobank Technician’ dropdown values to 4-5 users for easy search.

Use the below code block example and add it in the dictionary

{ "name": "specimen.extensionDetail.attrsMap.biobank_technician", "caption": "Biobank Technician", "type": "dropdown", "optional": true, "listSource": { "options": [ { "id": 6042, "fullName": "1Oncolife IA RP" }, { "id": 5963, "fullName": "2 Testing" }, { "id": 6041, "fullName": "2OncoLife IA RP" } ], "selectProp": "id", "displayProp": "fullName" } }

After configuring the user subset in the JSON workflow, the 'Biobank Technician' user dropdown shows only listed users:

image-20250723-063856.png

Restrict 'Collector' list based on the Institute

Based on Institute they belong to, ‘Collector’ user list can be restricted.

Collector - The code below is only applicable for unplanned collections (with the +Add Specimen button). It won't affect the planned specimen collection page.

Use the below code block example and add it in the dictionary

{ "name" : "specimen.collectionEvent.user", "caption" : "Collector", "type" : "user", "defaultValue" : "current_user", "listSource": { "queryParams": { "static": { "institute": "Columbia University(CUMC)" } } },"showIf": { "op": "AND", "rules": [ { "field": "specimen.lineage", "op": "==", "value": "'New'" }, { "field" : "specimen.status", "op" : "==", "value" : "'Collected'" } ] }, "subFields": [ { "name": "emailAddress", "caption": "Collector Email Address" } ] }
image-20250723-065201.png

Display restricted values in Cohort field

Use the below code block example and add it in the dictionary

{ "name" : "visit.cohort", "caption" : "GCT Cohort", "type" : "dropdown", "optional" : "true", "selectProp": "value", "showIf" : { "op" : "AND", "rules" : [ { "field" : "visit.status", "op" : "!=", "value" : "Missed Collection" } ] }, "listSource": { "options": [ { "value": "BEP C1D1" }, { "value": "BEP C2D1" }, { "value": "BEP C3D1" }, { "value": "EP C1D1" }, { "value": "EP C2D1" }, { "value": "EP C3D1" }, { "value": "EP C4D1" }, { "value": "VIP C1D1" }, { "value": "VIP C2D1" }, { "value": "VIP C3D1" }, { "value": "VIP C4D1" }, { "value": "CAV/IE C1D1" }, { "value": "CAV/IE C2D1" }, { "value": "CAV/IE C3D1" }, { "value": "CAV/IE C4D1" }, { "value": "HDCT C1D1" }, { "value": "HDCT C2D1" }, { "value": "C1D1" }, { "value": "C2D1" }, { "value": "C3D1" }, { "value": "C4D1" }, { "value": "Pre-Surgery" }, { "value": "Post-Surgery" } ], "displayProp": "value", "selectProp": "value" } },
Got feedback or spotted a mistake?

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