{
  "id": "student_registration_form",
  "title": "Student Registration Form",
  "description": "Student bio-data capture form converted from the Excel/VBA userform.",
  "version": "1.0",
  "storage_file": "student_records.json",
  "reference_date_for_age": "2024-06-30",
  "class_age_rules": {
    "Creche": {
      "min_age": 1,
      "max_age": 3
    },
    "Nursery 1": {
      "min_age": 2,
      "max_age": 4
    },
    "Nursery 2": {
      "min_age": 3,
      "max_age": 5
    },
    "KG 1": {
      "min_age": 4,
      "max_age": 6
    },
    "KG 2": {
      "min_age": 5,
      "max_age": 7
    },
    "Primary 1": {
      "min_age": 6,
      "max_age": 8
    },
    "Primary 2": {
      "min_age": 7,
      "max_age": 9
    },
    "Primary 3": {
      "min_age": 8,
      "max_age": 10
    },
    "Primary 4": {
      "min_age": 9,
      "max_age": 11
    },
    "Primary 5": {
      "min_age": 10,
      "max_age": 12
    },
    "Primary 6": {
      "min_age": 11,
      "max_age": 13
    },
    "JHS 1": {
      "min_age": 12,
      "max_age": 15
    },
    "JHS 2": {
      "min_age": 13,
      "max_age": 16
    },
    "JHS 3": {
      "min_age": 14,
      "max_age": 17
    }
  },
  "sections": [
    {
      "id": "student_identity",
      "title": "Student Details",
      "type": "standard",
      "items": [
        {
          "id": "first_name",
          "label": "First Name",
          "type": "text",
          "required": true,
          "min_length": 2,
          "transform": "sentence_case_letters_spaces_hyphen"
        },
        {
          "id": "surname",
          "label": "Surname",
          "type": "text",
          "required": true,
          "min_length": 2,
          "transform": "sentence_case_letters_spaces_hyphen"
        },
        {
          "id": "other_name",
          "label": "Other Name",
          "type": "text",
          "required": false,
          "min_length": 2,
          "transform": "sentence_case_letters_spaces_hyphen"
        },
        {
          "id": "sex",
          "label": "Sex",
          "type": "select",
          "required": true,
          "options": [
            "Male",
            "Female"
          ]
        },
        {
          "id": "basic_class",
          "label": "Basic Class",
          "type": "select",
          "required": true,
          "options": [
            "Creche",
            "Nursery 1",
            "Nursery 2",
            "KG 1",
            "KG 2",
            "Primary 1",
            "Primary 2",
            "Primary 3",
            "Primary 4",
            "Primary 5",
            "Primary 6",
            "JHS 1",
            "JHS 2",
            "JHS 3"
          ]
        },
        {
          "id": "dob",
          "label": "Date of Birth",
          "type": "date",
          "required": true,
          "display_format": "d F Y",
          "calculated_field": "age"
        },
        {
          "id": "ghana_card_number",
          "label": "Ghana Card Number",
          "type": "text",
          "required": false,
          "placeholder": "GHA-123456789-1",
          "validation": {
            "pattern": "^GHA-[0-9]{9}-[0-9]{1}$",
            "message": "Please enter a valid Ghana Card Number in the format GHA-123456789-1."
          }
        },
        {
          "id": "age",
          "label": "Age",
          "type": "calculated",
          "required": false,
          "readonly": true
        }
      ]
    },
    {
      "id": "guardian_details",
      "title": "Parent / Guardian Details",
      "type": "standard",
      "items": [
        {
          "id": "parent_name",
          "label": "Parent / Guardian Name",
          "type": "text",
          "required": false,
          "min_length": 3,
          "helper_text": "Optional",
          "transform": "sentence_case_letters_spaces_hyphen"
        },
        {
          "id": "parent_phone",
          "label": "Parent / Guardian Phone Number",
          "type": "text",
          "required": false,
          "validation": {
            "pattern": "^0[0-9]{9}$",
            "message": "Please enter a valid 10-digit phone number starting with 0."
          }
        }
      ]
    },
    {
      "id": "disability_details",
      "title": "Disability Information",
      "type": "standard",
      "items": [
        {
          "id": "disability_status",
          "label": "Does the student have a disability?",
          "type": "select",
          "required": true,
          "options": [
            "No",
            "Yes"
          ]
        },
        {
          "id": "disability_types",
          "label": "Type of Disability",
          "type": "multiselect",
          "required": false,
          "options": [
            "Visual Impairment",
            "Hearing Impairment",
            "Speech Impairment",
            "Physical Disability",
            "Intellectual Disability",
            "Autism Spectrum Disorder",
            "Learning Difficulty",
            "Other"
          ],
          "show_when": {
            "field": "disability_status",
            "equals": "Yes"
          }
        }
      ]
    }
  ]
}