{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$ref": "#/definitions/Person",
  "definitions": {
    "Person": {
      "type": "object",
      "properties": {
        "resourceType": {
          "type": "string",
          "const": "Person",
          "description": "Fixed resource type discriminator"
        },
        "id": {
          "type": "string",
          "description": "Logical id of this resource. Assigned by the server or originating system."
        },
        "meta": {
          "$ref": "#/definitions/Meta",
          "description": "Metadata about the resource"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "inactive"
          ],
          "description": "Whether this person record is active"
        },
        "name": {
          "$ref": "#/definitions/HumanName",
          "description": "The person's name"
        },
        "contact": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ContactPoint"
          },
          "description": "Contact information (phone, email, etc.)"
        },
        "address": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Address"
          },
          "description": "Physical and mailing addresses"
        },
        "designations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Professional designations and certifications (CPCU, ARM, CIC, AU, AINS)."
        },
        "licenses": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/License"
          },
          "description": "Insurance licenses held by this person"
        },
        "npn": {
          "type": "string",
          "description": "National Producer Number from NIPR (National Insurance Producer Registry)"
        },
        "notes": {
          "type": "string",
          "description": "Free-text notes about this person"
        }
      },
      "required": [
        "name",
        "resourceType",
        "status"
      ],
      "additionalProperties": false,
      "description": "An individual person involved in the insurance ecosystem. Represents brokers, underwriters, adjusters, producers, actuaries, and other professionals. Connects to organizations via PersonRole.",
      "examples": [
        {
          "resourceType": "Person",
          "id": "per-001",
          "status": "active",
          "name": {
            "use": "official",
            "text": "Sarah J. Chen, CPCU, ARM",
            "family": "Chen",
            "given": [
              "Sarah",
              "Jane"
            ],
            "suffix": [
              "CPCU",
              "ARM"
            ]
          },
          "npn": "12345678",
          "designations": [
            {
              "code": "CPCU",
              "display": "Chartered Property Casualty Underwriter"
            },
            {
              "code": "ARM",
              "display": "Associate in Risk Management"
            }
          ]
        }
      ]
    },
    "Meta": {
      "type": "object",
      "properties": {
        "versionId": {
          "type": "string",
          "description": "Version-specific identifier for this resource version. Changes each time the resource is updated."
        },
        "lastUpdated": {
          "type": "string",
          "description": "When this resource was last updated.",
          "format": "date-time"
        },
        "source": {
          "type": "string",
          "description": "URI identifying the originating system that created or last modified this resource.",
          "format": "uri"
        },
        "tag": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Coding"
          },
          "description": "Security or access control tags"
        }
      },
      "additionalProperties": false,
      "description": "Metadata about a resource instance. Tracks versioning, provenance, and timestamps."
    },
    "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"
        }
      ]
    },
    "HumanName": {
      "type": "object",
      "properties": {
        "use": {
          "type": "string",
          "enum": [
            "official",
            "usual",
            "nickname",
            "maiden",
            "old",
            "anonymous"
          ],
          "description": "Context in which this name is used"
        },
        "text": {
          "type": "string",
          "description": "Full text representation of the name (e.g., \"John A. Smith, CPCU\")"
        },
        "family": {
          "type": "string",
          "description": "Surname / family name"
        },
        "given": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Given names (first name, middle names)"
        },
        "prefix": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Name prefixes (Mr., Dr., etc.)"
        },
        "suffix": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Name suffixes and professional designations (Jr., CPCU, ARM, CIC)"
        },
        "period": {
          "$ref": "#/definitions/Period",
          "description": "Period during which this name was/is in use"
        }
      },
      "additionalProperties": false,
      "description": "A human name with structured components. Adapted for insurance industry use (e.g., professional designations like CPCU, ARM, CIC).",
      "examples": [
        {
          "use": "official",
          "text": "John A. Smith, CPCU",
          "family": "Smith",
          "given": [
            "John",
            "Andrew"
          ],
          "suffix": [
            "CPCU"
          ]
        }
      ]
    },
    "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"
        }
      ]
    },
    "ContactPoint": {
      "type": "object",
      "properties": {
        "system": {
          "type": "string",
          "enum": [
            "phone",
            "fax",
            "email",
            "url"
          ],
          "description": "The type of contact point"
        },
        "value": {
          "type": "string",
          "description": "The actual contact value (phone number, email address, etc.)"
        },
        "use": {
          "type": "string",
          "enum": [
            "work",
            "home",
            "mobile"
          ],
          "description": "Purpose of this contact point"
        }
      },
      "required": [
        "value"
      ],
      "additionalProperties": false,
      "description": "Contact information for a person or organization."
    },
    "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"
        }
      ]
    },
    "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."
    },
    "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."
    }
  },
  "$id": "https://bind-standard.org/schema/Person",
  "title": "Person"
}
