{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hospitalaid.org/standard/financial-assistance.schema.json",
  "title": "Hospital financial assistance policy (financial-assistance.json)",
  "description": "A short, machine-readable summary of one hospital's financial assistance (charity care) policy, written and posted by the hospital itself. Proposed by HospitalAid as version 0.1. The written policy at policy_url is the authority. Fields not listed here are allowed and ignored.",
  "type": "object",
  "required": [
    "schema_version",
    "hospital_name",
    "ccns",
    "policy_url",
    "last_reviewed"
  ],
  "properties": {
    "schema_version": {
      "type": "string",
      "const": "0.1",
      "description": "Version of this format. Use \"0.1\"."
    },
    "hospital_name": {
      "type": "string",
      "minLength": 1,
      "description": "The hospital name patients know."
    },
    "ccns": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^[0-9A-Z]{6}$"
      },
      "description": "CMS Certification Numbers (six characters) of every hospital this policy covers."
    },
    "policy_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Title of the written policy."
    },
    "effective_date": {
      "type": "string",
      "format": "date",
      "description": "Date the current policy took effect (YYYY-MM-DD)."
    },
    "last_reviewed": {
      "type": "string",
      "format": "date",
      "description": "Date the hospital last checked this file against its written policy (YYYY-MM-DD)."
    },
    "free_care_fpl_pct": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "description": "Care is free when household income is at or below this percent of the federal poverty level. null if the policy has no free care level."
    },
    "discount_care_fpl_pct": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0,
      "description": "Some discount is given when household income is at or below this percent of the federal poverty level. null if there is no income-based discount."
    },
    "discount_tiers": {
      "type": [
        "array",
        "null"
      ],
      "description": "Discount steps between the free care level and the discount level.",
      "items": {
        "type": "object",
        "required": [
          "fpl_min",
          "patient_pays"
        ],
        "properties": {
          "fpl_min": {
            "type": "number",
            "minimum": 0,
            "description": "Lowest income in this step, as a percent of the poverty level."
          },
          "fpl_max": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Highest income in this step. null if there is no upper limit."
          },
          "patient_pays": {
            "type": "string",
            "description": "What the patient pays in this step, in plain words."
          }
        }
      }
    },
    "covers_insured_patients": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "true if insured patients can get help with deductibles, copays or coinsurance."
    },
    "asset_test": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "true if the policy counts savings or property as well as income."
    },
    "residency_requirement": {
      "type": [
        "string",
        "null"
      ],
      "description": "Who must live where to apply, in plain words. null if there is no residency rule."
    },
    "catastrophic_provision": {
      "type": [
        "string",
        "null"
      ],
      "description": "Help for very large bills relative to income, in plain words. null if none."
    },
    "application_deadline_days": {
      "type": [
        "integer",
        "null"
      ],
      "minimum": 0,
      "description": "Days a patient has to apply, counted as the policy says. null if the policy sets no deadline."
    },
    "documents_required": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Documents a patient sends with the application."
    },
    "languages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Languages the policy and application are offered in."
    },
    "policy_url": {
      "type": "string",
      "format": "uri",
      "description": "Link to the full written policy."
    },
    "application_url": {
      "type": "string",
      "format": "uri",
      "description": "Link to the application form."
    },
    "plain_language_summary_url": {
      "type": "string",
      "format": "uri",
      "description": "Link to the plain language summary."
    },
    "financial_counseling_phone": {
      "type": [
        "string",
        "null"
      ],
      "description": "Phone number for financial counseling or billing help."
    },
    "financial_counseling_email": {
      "type": [
        "string",
        "null"
      ],
      "format": "email",
      "description": "Email for financial counseling or billing help."
    },
    "notes": {
      "type": [
        "string",
        "null"
      ],
      "description": "Anything a patient should know that has no field."
    }
  }
}