Versions Compared

Key

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

...

Code Block
{
     "name" : "cpr.participant.gender",
     "caption" : "Sex",                                                                                       // Rename 'Gender' to 'Sex'
     "type" : "radio",
     "options" : ["Male","Female","Unknown","Undifferentiated"],
     "attr" : "gender",
     "optional" : true
}

...

Note

Fields that are by default mandatory in OpenSpecimen has have to be mandatory in the dictionary too. 


Code Block
{
     
      "name" : "cpr.site",
     
      "caption" : "Registration Site",
      "type" : "dropdown",
      "typeoptional" : "dropdown"false,              "optional" : false,        // Mark the field mandatory
"listSource" : {    "listSource" : {
        "apiUrl" : "collection-protocols/{{cp.id}}/sites",
     
        "displayProp" : "name",
     
        "selectProp" : "name",
     
        "queryParams" : {        }
      }
        
   } }

Image RemovedImage Added

4. Set default values. Example: "defaultValue": "current_date".

...