{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/propagator-health/json-schema/propagator-health-update-patient-request-schema.json",
  "title": "UpdatePatientRequest",
  "description": "Request body for updating a patient. All fields are optional - only provide fields that need to be updated.",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/propagator-health-openapi.json#/components/schemas/UpdatePatientRequest",
  "type": "object",
  "properties": {
    "firstName": {
      "type": "string",
      "description": "Patient first name"
    },
    "lastName": {
      "type": "string",
      "description": "Patient last name"
    },
    "middleName": {
      "type": "string",
      "description": "Patient middle name"
    },
    "title": {
      "type": "string",
      "description": "Patient title (e.g., Mr, Mrs, Dr)"
    },
    "dateOfBirth": {
      "type": "string",
      "format": "date",
      "description": "Patient date of birth"
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "Patient email address"
    },
    "phones": {
      "type": "array",
      "description": "Patient phone numbers",
      "items": {
        "type": "object",
        "required": [
          "type",
          "number"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "mobile",
              "home",
              "work",
              "other"
            ],
            "description": "Phone number type"
          },
          "number": {
            "type": "string",
            "description": "Phone number"
          }
        }
      }
    },
    "nhi": {
      "type": "string",
      "description": "National Health Index number (NZ)",
      "maxLength": 7
    },
    "gender": {
      "type": "string",
      "description": "Patient gender: one of male, female, other, unknown (FHIR administrative gender), on every target.",
      "enum": [
        "male",
        "female",
        "other",
        "unknown"
      ]
    },
    "notes": {
      "type": "string",
      "description": "Patient notes"
    },
    "address": {
      "type": "object",
      "description": "Patient address",
      "properties": {
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "line3": {
          "type": "string"
        },
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "postalCode": {
          "type": "string"
        },
        "country": {
          "type": "string"
        }
      }
    }
  }
}