Got feedback or spotted a mistake?

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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

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

Subset PVs

Example 1: Visit site dropdown to show only required sites

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

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

Example 2: List only two values for gender

{
  "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' drop-down shows only 2 genders, "Male" and "Female":

Example 3: List only 'Whole Blood' value under 'Fluid' and 'Fixed Tissue Block' under Tissue class

{
  "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' drop-down shows only the selected specimen type:

Subset user dropdown

You can configure a user list. This feature helps you to speed up the data entry. If there are only 4-5 users to select from, 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 field 'Biobank Technician' only has 4-5 users to select. Instead of searching from the list of all the users, you can create a subset of the users that belong to the biobank technician.

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

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

Example JSON

Download

  • No labels