Versions Compared

Key

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

Table of Contents

When the list of permissible value is long, and the user needs to display only a few values in a particular dropdown , below is an option to do so.

Example 1: Visit site dropdown to show only a few sites and not all the sites from the instance. Add values in options like below.

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

Screenshot: After configuring in the JSON workflow, the 'Site' drop-down shows only selected sites.

Image Added

Example 2: List only 2 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"}
      ]
}

Screenshot: After configuring the JSON workflow, the 'Gender' drop-down shows only 2 genders, "Male" and "Female."

Image Added

Example 3: List only 'Whole Blood' value under 'Fluid' and 'Fixed Tissue Block' under Tissue. The other class and type values will not be displayed.

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"
    }
  ]
}

Screenshot: After configuring the JSON workflow, the 'Type' drop-down shows only the selected specimen type.

Image Added

Subset user dropdown

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

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

Code Block
{
            "name": "specimen.extensionDetail.attrsMap.FC15",
            "caption": "Biobank Technician",
            "type": "user",
            "selectProp": "id",
            "listSource": {
              "options": [
                {
                  "id": 12,
                  "firstName": "Cora",
                  "lastName": "Mariano"
                },
                {
                  "id": 13,
                  "firstName": "Emily",
                  "lastName": "Lin"
                },
                {
                  "id": 382,
                  "firstName": "Nurul",
                  "lastName": "Alhamid"
                },
                {
                  "id": 166,
                  "firstName": "Enmily",
                  "lastName": "Hernandez"
                },
                {
                  "id": 248,
                  "firstName": "Jessica",
                  "lastName": "Kenney"
                },
                {
                  "id": 418,
                  "firstName": "Priscilla",
                  "lastName": "McNeil"
                }
              ]
            }
          },

...

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

Image RemovedImage Added