Versions Compared

Key

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

...

Code Block
languagejs
{
      "name" : "visit.extensionDetail.attrsMap.DP13",
      "caption" : "COVID-19 Test Date",
      "type" : "date",
      "dateOnly" : true,
      "optional" : true,
      "showIf" : {
        "op" : "AND",
        "rules" : [ {
          "field" : "visit.visitDate",
          "op" : ">=",
          "value" : "1579717800000"
        } ]
      },
      "showInOverviewIf" : "useShowIf"
    }
"1579717800000" is the number of milliseconds elapsed since Unix time Epoch on 23/01/2020 at 00:00:00 hrs UTC.
The number can be obtained from the sites likeĀ https://currentmillis.com/

...

Example 4: Show 'Upload image' specimen custom field when it's primary specimen (lineage is 'New') and type is 'Whole Blood'.


Code Block
 {
   "name" : "specimen.extensionDetail.attrsMap.FU2",
   "caption" : "Upload image",
   "type" : "file",
   "optional" : true,
   "showInOverviewIf" : "useShowIf",
   "showIf" : {
           "op" : "OR",
           "rules" : [ {
             "field": "specimen.lineage",
             "op": "==",
             "value": "'New'"
           },{
             "field" : "Specimen.type",
             "op" : "==",
             "value" : "'Whole Blood'"
         } ]
       }
 },
The field looks like below on the specimen overview page.
Image Added