{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/DrivingViolation",
  "definitions": {
    "DrivingViolation": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/CodeableConcept",
          "description": "Type of violation (speeding, DUI, at-fault-accident, etc.)"
        },
        "date": {
          "type": "string",
          "description": "Date the violation occurred.",
          "format": "date"
        },
        "points": {
          "type": "number",
          "description": "Number of points assessed"
        },
        "atFault": {
          "type": "boolean",
          "description": "Whether the driver was at fault"
        },
        "description": {
          "type": "string",
          "description": "Free-text description of the violation"
        }
      },
      "required": [
        "type"
      ],
      "additionalProperties": false,
      "description": "A driving violation or incident on a driver's record.",
      "examples": [
        {
          "type": {
            "text": "Speeding"
          },
          "date": "2024-06-15",
          "points": 2,
          "atFault": false
        }
      ]
    },
    "CodeableConcept": {
      "type": "object",
      "properties": {
        "coding": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Code(s) from formal code systems"
        },
        "text": {
          "type": "string",
          "description": "Plain text representation of the concept"
        }
      },
      "additionalProperties": false,
      "description": "A concept with a coding and optional text. Wraps one or more Coding values with a human-readable summary."
    },
    "Coding": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "description": "The code system URI that defines the code.",
          "format": "uri"
        },
        "code": {
          "type": "string",
          "description": "The code value from the code system"
        },
        "display": {
          "type": "string",
          "description": "Human-readable display text for the code"
        }
      },
      "required": [
        "code"
      ],
      "additionalProperties": false,
      "description": "A coded value from a defined code system. Used throughout BIND for standardized enumerations.",
      "examples": [
        {
          "system": "https://bind.codes/line-of-business",
          "code": "GL",
          "display": "General Liability"
        }
      ]
    }
  },
  "$id": "https://bind-standard.org/schema/DrivingViolation",
  "title": "DrivingViolation"
}
