Versions Compared

Key

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

When

Table of Contents

You can use this feature when the list of permissible value of permissible values for a dropdown is long and user needs you want to display only a few values few values in a particular dropdown, below is an option to do so.specific study.

Subset PVs

Example 1: Visit site dropdown to show only

...

required sites

Code Block
{
  "name": "visit.site",
  "caption": "Visit Site",
  "type": "dropdown",
  "multiple": false,
  "optional": false,
        "listSource": {
          "defaultValue": "Stanford Hospital"options": [
          	"Test Ankita v8.1",
              "Training Site Ankita",
              "Testing v8.1"
                     ]
                      },
           "listSourceshowIf": {
             "op": "AND",
             "optionsrules": [
               {
           	"Stanford Hospital",       "field": "visit.status",
                 "op": "!=",
           	"Glenfield Hospital"       "value": "'Missed Collection'"
               }
         ]
                      }
}

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

Image Added

Example 2:

...

Display only

...

two values for gender

Code Block
{
  "name": "cpr.participant.gender",
  "caption": "Gender",
  "type": "pvs",
  "attr": "gender",
  "optional": true,
  "defaultValue": "Female Gender",
    "options": [
          {"value": "Male Gender", "conceptCode": "M"},
          {"value": "Female Gender", "conceptCode": "F"}
               ]
}

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

Image Added

Example 3:

...

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

...

' class

Code Block
{
  "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"
    }
  ]
}

Subset user dropdown

...

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

Image Added

Subset User Dropdown

You can configure a user list with a few selected the user.This features help user This feature helps you to speed up the data entry. If there are only 4-5 users to select from, then user you don't have to search every time from the list of all users.

Example: List the subset of the users that belongs to the biobank technician

The user drop-down dropdown field 'Biobank Technician' is only having the has 4-5 users to select, instead . Instead of searching from the users' list of all the users, the user is able to create the , you can create a subset of the users which belongs that belong to the biobank technician.Add the below-mentioned code block to create the subset of users.

Code Block
{
            "name": "specimen.extensionDetail.attrsMap.FC15biobank_technician",
            "caption": "Biobank Technician",
            "type": "user",
            "selectProp": "id",
            "listSource": {
              "options": [
                {
                  "id": 126042,
                  "firstName": "Cora1Oncolife",
                  "lastName": "MarianoIA RP"
                },
                {
                  "id": 135963,
                  "firstName": "Emily2",
                  "lastName": "LinTesting"
                },
                {
                  "id": 3826041,
                  "firstName": "Nurul2OncoLife",
                  "lastName": "AlhamidIA RP"
                },
              ]
       {     }
          }

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

Image Added

Example JSON

Download

Example 4: Restrict Collector user list based on the Institue they belong to


Info
titleCollector

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


Code Block
{
  				"idname" : 166"specimen.collectionEvent.user",
  				"caption" : "Collector",
  				"type" : "user",
  				"defaultValue" : "current_user",
   "firstName				"listSource": {
    			"EnmilyqueryParams",: {
      			"static": {
         	"lastNameinstitute": "Hernandez"
 Columbia University"
      }
    }
  },"showIf": {
              },
"op": "AND",
             "rules": [
               {
                  "idfield": 248"specimen.lineage",
                  "firstNameop": "Jessica==",

                 "lastNamevalue": "Kenney'New'"

               },

               {

                 "idfield" : 418"specimen.status",
                  "firstNameop" : "Priscilla==",
                  "lastNamevalue" : "McNeil"'Collected'"
               }
             ]
           },
           "subFields": [
             {
           ]    "name": "emailAddress",
               "caption": "Collector Email Address"
             }
          },

Screenshot: After configuring the user subset in the JSON workflow, in the 'Biobank Technician' user drop-down shows only listed users.

...

 ]

}