{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/august-health/json-schema/august-health-com-august-api-integrations-models-admissions-v1-get-admission-history-response-schema.json",
  "title": "com.august.api.integrations.models.admissions.v1.GetAdmissionHistoryResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/august-health-occupancy-v1-api-openapi.yml#/components/schemas/com.august.api.integrations.models.admissions.v1.GetAdmissionHistoryResponse",
  "properties": {
    "admissions": {
      "description": "List of admission records, sorted by move-in date in descending order (most recent first)",
      "items": {
        "$ref": "#/$defs/com.august.api.integrations.models.admissions.v1.AdmissionRecord",
        "description": "List of admission records, sorted by move-in date in descending order (most recent first)"
      },
      "type": "array"
    },
    "personId": {
      "type": "string"
    }
  },
  "required": [
    "personId",
    "admissions"
  ],
  "$defs": {
    "com.august.api.integrations.models.admissions.v1.AdmissionRecord": {
      "properties": {
        "admittedByUserId": {
          "type": "string"
        },
        "createdAt": {
          "description": "Timestamp of the admission record's creation time",
          "format": "date-time",
          "type": "string"
        },
        "dischargeDetails": {
          "$ref": "#/$defs/com.august.api.integrations.models.people.v1.DischargeDetails",
          "description": "Details about the discharge, if the resident was discharged"
        },
        "dischargedByUserId": {
          "type": "string"
        },
        "financialMoveInDate": {
          "format": "date",
          "type": "string"
        },
        "isCurrentAdmission": {
          "description": "True if this is the current/active admission (i.e. when true, it means there is no moveOutDate)",
          "type": "boolean"
        },
        "modifiedAt": {
          "description": "Timestamp of the admission record's last modification time",
          "format": "date-time",
          "type": "string"
        },
        "moveInDate": {
          "format": "date",
          "type": "string"
        },
        "moveOutDate": {
          "format": "date",
          "type": "string"
        }
      },
      "required": [
        "moveInDate",
        "isCurrentAdmission",
        "createdAt",
        "modifiedAt"
      ]
    },
    "com.august.api.integrations.models.people.v1.DischargeDetails": {
      "properties": {
        "financialMoveOutDate": {
          "format": "date",
          "type": "string"
        },
        "motivation": {
          "$ref": "#/$defs/com.august.protos.discharge_details.DischargeDetails.DischargeMotivation",
          "description": "The underlying reason the resident left (e.g., financial, dissatisfaction, level of care)"
        },
        "moveOutDate": {
          "format": "date",
          "type": "string"
        },
        "notes": {
          "description": "Free-text notes about the discharge",
          "type": "string"
        },
        "reason": {
          "$ref": "#/$defs/com.august.protos.discharge_details.DischargeDetails.DischargeReason",
          "description": "The discharge destination (e.g., skilled nursing, other assisted living). Despite its name, this field represents where the resident moved to, not why they left."
        }
      },
      "required": [
        "reason"
      ]
    },
    "com.august.protos.discharge_details.DischargeDetails.DischargeMotivation": {
      "enum": [
        "DISCHARGE_MOTIVATION_DISSATISFACTION",
        "DISCHARGE_MOTIVATION_FINANCIAL",
        "DISCHARGE_MOTIVATION_IMPROVED_HEALTH",
        "DISCHARGE_MOTIVATION_LEVEL_OF_CARE",
        "DISCHARGE_MOTIVATION_RELOCATED",
        "DISCHARGE_MOTIVATION_RETREAT_STAY",
        "DISCHARGE_MOTIVATION_OTHER",
        "DISCHARGE_MOTIVATION_DEATH",
        "DISCHARGE_MOTIVATION_CANCELLED_MOVE_IN"
      ],
      "type": "string"
    },
    "com.august.protos.discharge_details.DischargeDetails.DischargeReason": {
      "enum": [
        "DISCHARGE_REASON_DECEASED",
        "DISCHARGE_REASON_MOVE_TO_PRIVATE",
        "DISCHARGE_REASON_MOVE_TO_INDEPENDENT_LIVING",
        "DISCHARGE_REASON_MOVE_TO_OTHER_ASSISTED_LIVING",
        "DISCHARGE_REASON_MOVE_TO_SKILLED_NURSING",
        "DISCHARGE_REASON_OTHER"
      ],
      "type": "string"
    }
  }
}