Versions Compared

Key

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

Table of Contents

Introduction

...

Code Block
titleExample code
{
      "name" : "specimen.extensionDetail.attrsMap.made_method",
      "caption" : "Made Method",
      "type" : "dropdown",
      "showInOverviewIf": "useShowIf",
        "showIf": {
          "op": "AND",
          "rules": [
            {
              "field": "specimen.lineage",
              "op": "==",
              "value": "'Aliquot'"
            },
            {
              "field" : "specimen.type",
              "op" : ".search('RNA|DNA')!=",
              "value" : "-1"
        }
          ]
        },
      "optional" : true,
      "listSource" : {
        "apiUrl" : "forms/permissible-values",
        "selectProp" : "value",
        "displayProp" : "value",
        "queryParams" : {
          "dynamic" : { },
          "static" : {
            "formName" : "epidemiology_specimen_custom_form",
            "controlName" : "made_method"
          }
        }
      }
    },


Show/Hide custom field

...

Using Regex Matching


Code Block
titleExample code
{
  "name": "cpr.participant.extensionDetail.attrsMap.lived_name",
  "caption": "Lived Name",
  "type": "text",
  "optional": "true",
  "showIf": {
    "op": "AND",
    "rules": [
      {
        "field": "cpr.ppid",
        "op": ".search('^J') !=",  // Modify the regex in single quote as per requirement. 
        "value": "-1"
      }
    ]
  }
}


Example JSON

Download