{
  "name": "EvacuationShelter",
  "description": "Operational overlay for one evacuation shelter. The shelter master data (name, location) is not included: the designated shelter is referenced by shelter (DesignatedShelter) or by externalShelterId / nationalShelterId, and one of the three is required. Only opening status and evacuee counts live here. When the shelter is also a designated emergency evacuation site, site links to its EvacuationSite. Models the operation of a 指定避難所 (designated shelter, Basic Act on Disaster Management Art. 49-7), a distinct legal concept from the 指定緊急避難場所 (designated emergency evacuation site, Art. 49-4). At least one of openingStatus, statusLabel is not null. At least one of shelter, externalShelterId, nationalShelterId is not null. Type https://datamodels.jp/ns/disaster/EvacuationShelter; @context https://datamodels.jp/context/disaster/v1.jsonld.",
  "strict": true,
  "schema": {
    "type": "object",
    "properties": {
      "externalShelterId": {
        "type": [
          "string",
          "null"
        ],
        "description": "The shelter's ID in the municipality's own shelter list (unique within it). Together with localGovernmentCode it is unique nationwide; the same ID as DesignatedShelter's externalShelterId. One of shelter, externalShelterId and nationalShelterId is required"
      },
      "nationalShelterId": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^E[0-9]{10}1[12][1-9A-Za-z]$",
        "description": "The nationwide common shelter/evacuation-site ID (14 characters, the '共通ID' of GSI's data). Only type codes 11 (general designated shelter) and 12 (welfare shelter) are valid on this model. When none is assigned, leave the property out rather than send an empty string. Its structure and source are described once, in EvacuationShelter's mapping 'nationwide common shelter/evacuation-site ID' (gsi-national-shelter-id). One of shelter, externalShelterId and nationalShelterId is required"
      },
      "localGovernmentCode": {
        "type": "string",
        "pattern": "^\\d{6}$",
        "description": "Local government code of the municipality that publishes the shelter list (全国地方公共団体コード, 6 digits)"
      },
      "shelter": {
        "type": [
          "string",
          "null"
        ],
        "description": "The designated shelter (DesignatedShelter) this operation record is for. One of shelter, externalShelterId and nationalShelterId is required (a URI)"
      },
      "site": {
        "type": [
          "string",
          "null"
        ],
        "description": "The designated emergency evacuation site (EvacuationSite) at the same place, when the shelter is also one (a URI)"
      },
      "openingStatus": {
        "type": [
          "string",
          "null"
        ],
        "enum": [
          "open",
          "closed",
          "full",
          "requested",
          null
        ],
        "description": "Normalised opening state: open, closed, full (open but at capacity), requested (opening has been requested/instructed but is not yet confirmed open; no public code list defines this state, see statusLabel). The local wording always goes in statusLabel. When no value fits, leave it out and give the local wording in statusLabel"
      },
      "statusLabel": {
        "type": [
          "string",
          "null"
        ],
        "description": "The opening status in the local or source system's wording (e.g. 未開設, 開設中, 満員, 依頼中). Use this whenever the local wording has no exact match in openingStatus's enum. Required when openingStatus is left out (not empty)"
      },
      "evacueeHouseholds": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of evacuated households (minimum 0)"
      },
      "evacueeTotal": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Total number of evacuees (minimum 0)"
      },
      "evacueeFemale": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of female evacuees (minimum 0)"
      },
      "evacueeMale": {
        "type": [
          "integer",
          "null"
        ],
        "description": "Number of male evacuees (minimum 0)"
      },
      "description": {
        "type": [
          "string",
          "null"
        ],
        "description": "Free-text memo"
      },
      "openedAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "Time the shelter opened"
      },
      "closedAt": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "description": "Time the shelter closed"
      }
    },
    "required": [
      "externalShelterId",
      "nationalShelterId",
      "localGovernmentCode",
      "shelter",
      "site",
      "openingStatus",
      "statusLabel",
      "evacueeHouseholds",
      "evacueeTotal",
      "evacueeFemale",
      "evacueeMale",
      "description",
      "openedAt",
      "closedAt"
    ],
    "additionalProperties": false
  }
}
