{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/License",
  "definitions": {
    "License": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string",
          "description": "State or jurisdiction of the license (two-letter state code)"
        },
        "licenseNumber": {
          "type": "string",
          "description": "License number assigned by the state"
        },
        "lineOfAuthority": {
          "$ref": "#/definitions/CodeableConcept",
          "description": "Line of authority covered by this license."
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive",
            "expired",
            "suspended",
            "revoked"
          ],
          "description": "Current status of the license"
        },
        "expirationDate": {
          "type": "string",
          "description": "License expiration date.",
          "format": "date"
        },
        "issueDate": {
          "type": "string",
          "description": "Date the license was issued.",
          "format": "date"
        }
      },
      "required": [
        "state",
        "licenseNumber",
        "status"
      ],
      "additionalProperties": false,
      "description": "An insurance license held by a person. Tracks state-level licensing, lines of authority, and license status.",
      "examples": [
        {
          "state": "CT",
          "licenseNumber": "LIC-2345678",
          "status": "active",
          "lineOfAuthority": {
            "text": "Property & Casualty"
          },
          "expirationDate": "2026-12-31"
        }
      ]
    },
    "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/License",
  "title": "License"
}
