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 3 Next »

By default, OpenSpecimen data entry pages display fields one field per line during add or edit operation. This takes a lot of space for small fields like quantity. It is useful to group smaller fields together in one line. 

Using REST API workflow configuration, users can:

  1. Group fields per row
  2. Group fields as sections with a section header
  3. Set criteria to show/hide sections 

This grouping of fields can be done on Participant, Visit and Specimen add/edit pages.

Example: 

Below code block has to be configured in workflow JSON within the 'Dictionary' section after 'Fields'. 

Example
"layout": [
        {
          "rows": [
         [
            "cpr.registrationDate",
            "cpr.participant.birthDate"
          ],
          [
            "cpr.participant.firstName",
            "cpr.participant.lastName"
         ],
         [
            "cpr.participant.gender",
            "cpr.participant.extensionDetail.attrsMap.NT3"
         ],
         [
           "cpr.participant.pmis"
         ],

         [
           "visit.name",
           "visit.surgicalPathologyNumber"
         ],
         [
           "visit.clinicalDiagnoses",
           "visit.extensionDetail.attrsMap.DD3"
         ],
         [
           "visit.site",
           "visit.extensionDetail.attrsMap.ST7"
         ],
         [
           "visit.visitDate",
           "visit.extensionDetail.attrsMap.DP5",
           "visit.extensionDetail.attrsMap.DP6"
         ],
         [
           "visit.eventLabel"
         ],
         [
           "visit.extensionDetail.attrsMap.TA4",
           "visit.comments"
         ],
         [
           "specimen.type"
         ],
         [
           "specimen.initialQty",
           "specimen.availableQty"
         ],
         [
           "specimen.extensionDetail.attrsMap.MLB4",
           "specimen.extensionDetail.attrsMap.DD20"
         ],
         [
            "specimen.comments"
         ]
       ]
     },
     {
       "title": "Tissue Details",
       "showIf": {
         "op": "AND",
         "rules": [
           {
             "field": "specimen.type",
             "op": "==",
             "value": "'Fresh Tissue'"
           }
         ]
       },
       "rows": [
         [
           "specimen.extensionDetail.attrsMap.NT8",
           "specimen.extensionDetail.attrsMap.NT9"
         ],
         [
           "specimen.anatomicSite",
           "specimen.pathology"
         ],
         [
           "specimen.extensionDetail.attrsMap.DD22",
           "specimen.laterality"
         ]
       ]
       },
       {
         "title": "Collection & Received Event Details",
         "rows": [
         [
           "specimen.collectionEvent.time",
           "specimen.extensionDetail.attrsMap.DP27",
           "specimen.receivedEvent.time",
           "specimen.createdOn"
         ],
         [
           "specimen.receivedEvent.user",
           "specimen.extensionDetail.attrsMap.DD29"
         ],
         [
          "specimen.extensionDetail.attrsMap.DD23",
           "specimen.extensionDetail.attrsMap.DD19",
           "specimen.extensionDetail.attrsMap.DD24"
         ],
         [
           "specimen.extensionDetail.attrsMap.FC3",
           "specimen.extensionDetail.attrsMap.DP5",
           "specimen.extensionDetail.attrsMap.TA2"
         ]
       ]
     }
   ]

Grouping on participant page:

Grouping of fields on visit page:

Grouping of fields on specimen page along with section(For example: Collection & Received Event section)

Grouping of fields on specimen page along with conditional show/hide section(For example: Tissue Details section)

The section highlighted in red is displayed only when 'Fresh Tissue' is selected based on the code above:

Example JSON

Download



  • No labels