{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/Claimant",
  "definitions": {
    "Claimant": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Name of the claimant"
        },
        "role": {
          "$ref": "#/definitions/CodeableConcept",
          "description": "Role of the claimant in the loss."
        },
        "contact": {
          "$ref": "#/definitions/Address",
          "description": "Claimant's address"
        },
        "attorney": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Attorney's name"
            },
            "firm": {
              "type": "string",
              "description": "Law firm name"
            }
          },
          "required": [
            "name"
          ],
          "additionalProperties": false,
          "description": "Attorney information, if represented"
        }
      },
      "required": [
        "name",
        "role"
      ],
      "additionalProperties": false,
      "description": "A party making a claim or involved in a claim.",
      "examples": [
        {
          "name": "John Smith",
          "role": "injured-party",
          "contact": {
            "line": [
              "456 Oak St"
            ],
            "city": "Hartford",
            "state": "CT"
          }
        }
      ]
    },
    "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"
        }
      ]
    },
    "Address": {
      "type": "object",
      "properties": {
        "use": {
          "type": "string",
          "enum": [
            "work",
            "mailing",
            "billing",
            "loss-location",
            "home",
            "old"
          ],
          "description": "Purpose of this address"
        },
        "type": {
          "type": "string",
          "enum": [
            "postal",
            "physical",
            "both"
          ],
          "description": "The type of address (postal, physical, or both)"
        },
        "text": {
          "type": "string",
          "description": "Full unstructured text representation of the address"
        },
        "line": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Street address lines"
        },
        "city": {
          "type": "string",
          "description": "City or municipality"
        },
        "district": {
          "type": "string",
          "description": "County or district. Critical for insurance rating territories and jurisdiction determination."
        },
        "state": {
          "type": "string",
          "description": "State, province, or region"
        },
        "postalCode": {
          "type": "string",
          "description": "Postal / ZIP code"
        },
        "country": {
          "type": "string",
          "description": "ISO 3166-1 alpha-2 country code.",
          "default": "US"
        },
        "period": {
          "$ref": "#/definitions/Period",
          "description": "Period during which this address was/is in use"
        },
        "geoPoint": {
          "$ref": "#/definitions/GeoPoint",
          "description": "Geographic coordinates of this address"
        }
      },
      "additionalProperties": false,
      "description": "A physical or mailing address.",
      "examples": [
        {
          "use": "work",
          "type": "both",
          "line": [
            "123 Main St",
            "Suite 400"
          ],
          "city": "Hartford",
          "state": "CT",
          "postalCode": "06103",
          "country": "US",
          "district": "Hartford County"
        }
      ]
    },
    "Period": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "description": "Start of the period (inclusive).",
          "format": "date"
        },
        "end": {
          "type": "string",
          "description": "End of the period (inclusive).",
          "format": "date"
        }
      },
      "additionalProperties": false,
      "description": "A time period defined by a start and/or end date. Used for policy terms, coverage periods, etc.",
      "examples": [
        {
          "start": "2025-01-01",
          "end": "2026-01-01"
        }
      ]
    },
    "GeoPoint": {
      "type": "object",
      "properties": {
        "latitude": {
          "type": "number",
          "description": "Latitude in decimal degrees.",
          "minimum": -90,
          "maximum": 90
        },
        "longitude": {
          "type": "number",
          "description": "Longitude in decimal degrees.",
          "minimum": -180,
          "maximum": 180
        },
        "altitude": {
          "type": "number",
          "description": "Altitude in meters above sea level"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "additionalProperties": false,
      "description": "A geographic point in WGS84 coordinates. Used for precise location of insured properties, loss locations, etc."
    }
  },
  "$id": "https://bind-standard.org/schema/Claimant",
  "title": "Claimant"
}
