{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/findadoctor-si/json-schema/findadoctor-si-hospital-volumes-schema.json",
  "title": "HospitalVolumes",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/findadoctor-si-fr-openapi.json#/components/schemas/HospitalVolumes",
  "type": "object",
  "properties": {
    "before_you_answer": {
      "type": "string",
      "description": "read first: translate the French act labels; counts are per site, not per surgeon"
    },
    "provider": {
      "$ref": "#/$defs/Provider"
    },
    "year": {
      "type": "integer"
    },
    "count": {
      "type": "integer"
    },
    "more": {
      "type": "boolean"
    },
    "offset": {
      "type": "integer"
    },
    "acts_counted": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "france_acts_this_year": {
            "type": "integer"
          }
        }
      },
      "description": "the CCAM acts added up: check they fit the need"
    },
    "acts_note": {
      "type": "string"
    },
    "france_total": {
      "type": "object",
      "properties": {
        "acts": {
          "type": "integer"
        },
        "hospital_sites": {
          "type": "integer"
        },
        "note": {
          "type": "string"
        }
      }
    },
    "area_hospital_sites": {
      "type": "integer"
    },
    "hospitals": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/HospitalVolume"
      }
    },
    "place_note": {
      "type": "string"
    },
    "next_step": {
      "type": "string"
    },
    "note": {
      "type": "string"
    }
  },
  "$defs": {
    "HospitalVolume": {
      "type": "object",
      "properties": {
        "finess": {
          "type": "string",
          "description": "hospital site FINESS number (use with search_doctors hospital_finess)"
        },
        "name": {
          "type": "string"
        },
        "postcode": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "departement": {
          "type": "string"
        },
        "acts": {
          "type": "integer",
          "description": "acts counted for the year asked"
        },
        "stays": {
          "type": "integer"
        },
        "same_day_share": {
          "type": "number"
        },
        "avg_nights": {
          "type": "number"
        },
        "acts_by_code": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "acts": {
                "type": "integer"
              }
            }
          }
        },
        "acts_by_year": {
          "type": "object",
          "description": "acts per year, 2021-2025"
        },
        "doctors_with_register_address_here": {
          "type": "integer"
        }
      }
    },
    "Provider": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "data_version": {
          "type": "string"
        }
      },
      "description": "who publishes this data and which build"
    }
  }
}