{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.ezpharma.app/contracts/client-resource-event.schema.json",
  "title": "Client resource notification 2026-10",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "schemaVersion",
    "type",
    "resource",
    "resourceId",
    "occurredAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "schemaVersion": {
      "const": "2026-10"
    },
    "type": {
      "enum": [
        "resource.changed",
        "resource.removed"
      ]
    },
    "resource": {
      "enum": [
        "patients",
        "episodes",
        "intakes",
        "consents",
        "appointments",
        "prescriptions",
        "labs",
        "results",
        "records",
        "documents",
        "payments",
        "fulfillment",
        "packages",
        "communications",
        "renewals"
      ]
    },
    "resourceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 400
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}
