{
  "form": {
    "title": "Color Fundus Grading Form",
    "description": "Diabetic retinopathy lesion grading form for color fundus images",
    "defaults": {
      "is_gradable": "",
      "pres_MA": "",
      "pres_MA_contour": "",
      "pres_HMA": "",
      "pres_HMA_contour": "",
      "pres_H": "",
      "pres_H_contour": "",
      "pres_CWS": "",
      "pres_CWS_contour": "",
      "pres_HE": "",
      "pres_HE_contour": "",
      "pres_IRMA": "",
      "pres_IRMA_contour": "",
      "pres_VB": "",
      "pres_VB_contour": "",
      "pres_NVE": "",
      "pres_NVE_contour": "",
      "pres_NVD": "",
      "pres_NVD_contour": "",
      "pres_FPE": "",
      "pres_FPE_contour": "",
      "pres_FPD": "",
      "pres_FPD_contour": "",
      "pres_PRH": "",
      "pres_PRH_contour": "",
      "pres_VH": "",
      "pres_VH_contour": "",
      "pres_FL": "",
      "pres_FL_contour": "",
      "pres_PRP": "",
      "pres_PRP_contour": "",
      "FUNDUS_complete": "",
      "notes": ""
    },
    "fields": [
      {
        "key": "is_gradable",
        "type": "radio",
        "label": "COLOR FUNDUS - Is this image gradable for at least 1 lesion?",
        "requiredWhenVisible": true,
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_MA",
        "type": "radio",
        "label": "Presense of MA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "is_gradable"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "is_gradable"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_MA_contour",
        "type": "radio",
        "label": "Completed drawing MA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_MA"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_MA"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_HMA",
        "type": "radio",
        "label": "Presence of HMA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_MA_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_MA_contour"
                  },
                  "possible"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_MA"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_MA"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_HMA_contour",
        "type": "radio",
        "label": "Completed drawing HMA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_HMA"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HMA"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_H",
        "type": "radio",
        "label": "Presence of H?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_HMA_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HMA"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HMA"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_H_contour",
        "type": "radio",
        "label": "Completed drawing H?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_H"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_H"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_CWS",
        "type": "radio",
        "label": "Presence of CWS?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_H_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_H"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_H"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_CWS_contour",
        "type": "radio",
        "label": "Completed drawing CWS?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_CWS"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_CWS"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_HE",
        "type": "radio",
        "label": "Presence of HE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_CWS_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_CWS"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_CWS"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_HE_contour",
        "type": "radio",
        "label": "Completed drawing HE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_HE"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HE"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_IRMA",
        "type": "radio",
        "label": "Presence of IRMA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_HE_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HE"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_HE"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_IRMA_contour",
        "type": "radio",
        "label": "Completed drawing IRMA?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_IRMA"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_IRMA"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_VB",
        "type": "radio",
        "label": "Presence of VB?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_IRMA_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_IRMA"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_IRMA"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_VB_contour",
        "type": "radio",
        "label": "Completed drawing VB?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_VB"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VB"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_NVE",
        "type": "radio",
        "label": "Presence of NVE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_VB_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VB"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VB"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_NVE_contour",
        "type": "radio",
        "label": "Completed drawing NVE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_NVE"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVE"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_NVD",
        "type": "radio",
        "label": "Presence of NVD?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_NVE_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVE"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVE"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_NVD_contour",
        "type": "radio",
        "label": "Completed drawing NVD?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_NVD"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVD"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_FPE",
        "type": "radio",
        "label": "Presence of FPE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_NVD_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVD"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_NVD"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_FPE_contour",
        "type": "radio",
        "label": "Completed drawing FPE?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FPE"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPE"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_FPD",
        "type": "radio",
        "label": "Presence of FPD?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FPE_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPE"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPE"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_FPD_contour",
        "type": "radio",
        "label": "Completed drawing FPD?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FPD"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPD"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_PRH",
        "type": "radio",
        "label": "Presence of PRH?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FPD_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPD"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FPD"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_PRH_contour",
        "type": "radio",
        "label": "Completed drawing PRH?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_PRH"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_PRH"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_VH",
        "type": "radio",
        "label": "Presence of VH?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_PRH_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_PRH"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_PRH"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_VH_contour",
        "type": "radio",
        "label": "Completed drawing VH?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_VH"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VH"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_FL",
        "type": "radio",
        "label": "Presence of FL?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_VH_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VH"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_VH"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_FL_contour",
        "type": "radio",
        "label": "Completed drawing FL?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FL"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FL"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "pres_PRP",
        "type": "radio",
        "label": "Presence of PRP?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_FL_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FL"
                  },
                  "no"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_FL"
                  },
                  "ungradable"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "possible",
            "label": "Possible"
          },
          {
            "value": "no",
            "label": "No"
          },
          {
            "value": "ungradable",
            "label": "Ungradable"
          }
        ]
      },
      {
        "key": "pres_PRP_contour",
        "type": "radio",
        "label": "Completed drawing PRP?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_PRP"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "pres_PRP"
                  },
                  "possible"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "FUNDUS_complete",
        "type": "radio",
        "label": "Drawing Complete For FUNDUS?",
        "requiredWhenVisible": true,
        "visible": [
          {
            "or": [
              {
                "===": [
                  {
                    "var": "pres_PRP_contour"
                  },
                  "yes"
                ]
              },
              {
                "===": [
                  {
                    "var": "is_gradable"
                  },
                  "no"
                ]
              }
            ]
          }
        ],
        "options": [
          {
            "value": "yes",
            "label": "Yes"
          },
          {
            "value": "no",
            "label": "No"
          }
        ]
      },
      {
        "key": "notes",
        "type": "text",
        "label": "Additional Notes",
        "requiredWhenVisible": false
      }
    ]
  },
  "esignature_config": null
}
