The user can use the 'showIf' and 'showInOverviewIf' conditions to hide specific fields from all participant/visit/specimen pages. Additionally, these conditions allow you to hide or display fields based on the value of another field.
showIf → condition applies for edit page
showInOverviewIf → condition applies to overview page
How to remove the fields from data entry and overview pages?
The fields like the anatomic site, pathology status, and laterality can be hidden from the add/edit and overview pages by removing them from the dictionary section. Sometimes lab do not collect the samples which needs this information to be stored, so instead of showing those fields in the data entry/overview page, the user can remove it from JSON.
Note: These fields are defaulted to 'Not Specified' on the backend.
Serach for “dictionary“ section and remove the fields that are not needed. Note: Make sure you need to remove those fields from all the places like List page if those are added in that section.
Import the JSON back and refresh the page to reflect the changes.
Hide fields on Parent/Child specimen pages
Example 1: The quantity for the parent specimen is not recorded, since they are processed and stored as aliquots. Therefore, the quantity field will not be displayed for specimens with the lineage 'New' (parent) on the unplanned specimens' add, edit, or overview pages.
Code:
{
"name": "specimen.initialQty",
"caption": "Initial Quantity",
"showInOverviewIf": "useShowIf", //Hides field from overview pages as well if the showif conditions are not met
"type": "specimen-quantity",
"specimen": "specimen",
"optional": true,
"showIf": {
"op": "AND",
"rules": [
{
"field": "specimen.lineage",
"op": "!=",
"value": "'New'"
}
]
}
}, {
"name": "specimen.availableQty",
"caption": "Available Quantity",
"showInOverviewIf": "useShowIf",
"type": "specimen-quantity",
"specimen": "specimen",
"optional": true,
"showIf": {
"op": "AND",
"rules": [
{
"field": "specimen.lineage",
"op": "!=",
"value": "'New'"
}
]
}
}
Before adding the Configuration:
After adding the Configuration:
Screenshot for the parent specimen's overview page, where the fields for quantity are hidden in edit and overview page.
Both the fields will be displayed for the child specimens (lineage: derived/aliquot).
Example 2:Display specimen type field only for primary and derived overview page, and not on the aliquot overview page.
Specimen type field displayed on parent specimen overview page:
Specimen type field not displayed on child specimen overview page:
Hide/Set default value to mandatory fields
By using the "defaultValue": "<value>" option, you can set a default value for any specimen field.
Add the below-mentioned code block in the dictionary.
In the below example, we have set the default value 'Abdomen, NOS' for the anatomic site. Also, hide the 'Anatomical Site' field from the aliquot overview page using the "showInOverviewIf": "useShowIf" function.