Versions Compared

Key

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

...

Level

Case and Description

Example JSON

Participant

Shows forms on the basis of CP’s field at the participant level.

In JSON Code, "XYZ Form" is a form name.

Code Block
 "participant" :  [ 
{
    "when" : "cp.shortTitle == 'Testing rule CP'",
    "forms" : ["XYZForm"]
}
]

Participant

Shows forms on the basis of the participant's core fields at the participant level.

Code Block
"participant" :  [ 
{
      "when" : "cpr.participant.gender == 'Male'",
      "forms" : [ "smokingHistoryForm" ]
 }, 
 {
      "when" : "cpr.participant.gender == 'Female'",
      "forms" : [ "pregnancyTestForm" ]
 },
 {
      "when" : "cpr.participant.vitalStatus == 'Alive'",
      "forms" : [ "participantFamilyHistory" ]
 }
]

Participant

Shows forms on the basis of the participant's custom fields at the participant level.

Add multiple conditions with the help of 'AND(&&)' and 'OR (||)' operators.


Code Block
"participant" :  [ 
{
    "when" : "cpr.participant.extensionDetail.attrsMap.DD2 == 'Married'",
    "forms" : [ "partnerSDetails" ]
},
{
    "when" : "cpr.participant.extensionDetail.attrsMap.DD2 == 'Married' && cpr.participant.gender == 'Female'",
    "forms" : [ "partnerSDetails" ]
}
]

Participant

Shows forms on the basis of user role at the participant level.

Code Block
"participant" : [
      {
        "when": "user.hasRole('Coordinator')",
        "forms": ["participantRuleForm"]
      }
]


Participant

Show forms on the basis of value exist or not in another field.

Code Block
"participant" : [
      {
        "when": "cpr.participant.gender != null",
        "forms": ["XYZForm"]
      },
      {
        "when": "cpr.participant.gender == null",
        "forms": ["ABCForm"]
      }
]

Visit

Shows forms on the basis of CP’s field at the visit level.

Code Block
"visit" :  [ 
    {
       "when" : "cp.shortTitle == 'Testing rule CP'",
       "forms" : ["XYZForm"]
    }
]

Visit

Shows forms on the basis of participant's and visit's core fields at the visit level.

Code Block
"visit" :  [ 
    {
      "when": "visit.status == 'Complete'",
      "forms": ["visitFormRule"]
    },
    {
       "when": "cpr.participant.gender == 'Male'",
       "forms": ["visitInfoCollectedByCoordinator"]
    }
]

Visit

Shows forms on the basis of the visit's custom fields at the visit level.

Code Block
"visit" :  [ 
      {
        "when": "visit.extensionDetail.attrsMap.CB8 == 'Yes'",
        "forms": ["visitInfoCollectedByCoordinator"]
      }
]

Visit

Shows forms on the basis of user role at the visit level.

Code Block
"visit" :  [ 
    {
        "when" : "user.hasRole('Coordinator'),
        "forms" : [ "visitInfoCollectedByCoordinator" ]
    }
]

Specimen

Shows forms on the basis of participant’s, visit's and specimen's core fields at the specimen level.

Add multiple conditions with the help of 'AND(&&)' and 'OR (||)' operators


Code Block
"specimen" :  [ 
  {
        "when": "specimen.type == 'Whole Blood'",
        "forms": ["fluidInfoForm"]
  },
  {
        "when": "specimen.type == 'DNA' || specimen.type == 'RNA'",
        "forms": ["fluidInfoFormsupport_6200", "cPOneSpecimenForm"]
  },
  {
        "when": "cpr.participant.gender == 'Female'",
        "forms": ["specimenAdditionalRule"]
  },
  {
        "when": "visit.clinicalStatus == 'Follow-up'",
        "forms": ["fluidInfoForm"]
  },
  {
        "when": "specimen.lineage == 'New'",
        "forms": ["techSpecimenForm"]
  },
  {
        "when": "cpr.participant.gender == 'Female' && visit.clinicalStatus == 'Follow-up' && specimen.lineage == 'New'",
        "forms": ["specimenAdditionalRule","fluidInfoForm","techSpecimenForm"]
  }
]

Specimen

Shows forms on the basis of the specimen's custom fields at the specimen level.

Code Block
"specimen" :  [ 
   {
        "when": ""specimen.extensionDetail.attrsMap.DD4 == 'A' ",
        "forms": ["fluidInfoForm"]
    }
]

Specimen

Shows forms on the basis of user role at the specimen level.

Code Block
  "specimen" :  [ 
   {
        "when": "user.hasRole('Technician') && specimen.lineage == 'New'",
        "forms": ["techSpecimenForm"]
   }
]

Specimen

Shows forms on the basis of a range of availability field.

Code Block
"specimen" :  [ 
    {
        "when": "specimen.availableQty > 5",
        "forms": ["specimenAdditionalRule"]
    }
]

Specimen Event

Case:
If CP collects the tissue samples from the participants then that CP has the 'Tissue Review Event' form under the specimen.

Code Block
"specimenEvent": [
    {
        "when": "specimen.specimenClass == 'Tissue'",
        "forms": ["SpecimenTissueReviewEvent"]
    }
]

Specimen Event

Shows forms on the basis of participant's, visit's and specimen's core fields at the specimen event level.

Add multiple conditions with the help of 'AND(&&)' and 'OR (||)' operators

Code Block
"specimenEvent": [
    {
        "when": "cpr.participant.gender == 'Female' && visit.clinicalStatus == 'Follow-up' && specimen.specimenClass == 'Tissue'",
        "forms": ["SpecimenTissueReviewEvent"]
    }
]

No Forms

Does not show any forms at derivative level

Code Block
  "specimen" : [
    {
      "when" : "specimen.lineage == 'Derived'",
      "forms" : [ "" ]
    } ]

Visit

Show form based on event label

Code Block
{
    "name": "formDataEntryRules",
    "data": {
  
      "visit": [
	{
      "when": "visit.status == 'Complete' && visit.eventLabel == 'BASELINE'",
      "forms": ["rde_visit_testing"]
    },
    {
      "when": "visit.status == 'Complete'",
      "forms": [""]
    }
      ]

    
    }
  },

Consent

Case:
Consent forms should be displayed to those who have access to the consent form. For example, ‘Consent Collector’

Code Block
"participant" :  [ 
    {
        "when": "user.hasRole('Consent Collector')",
        "forms": ["consentForm"]
    } 
]

...