> ## Documentation Index
> Fetch the complete documentation index at: https://docs.decodahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Patient Ai Summary

> Get the most recent cached AI summary for a patient.
Returns 404 if no cached summary exists.



## OpenAPI

````yaml get /user/patient/{patient_id}/ai-summary
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /user/patient/{patient_id}/ai-summary:
    get:
      tags:
        - provider
        - user
      summary: Get Patient Ai Summary
      description: |-
        Get the most recent cached AI summary for a patient.
        Returns 404 if no cached summary exists.
      operationId: get_patient_ai_summary_user_patient__patient_id__ai_summary_get
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientAISummaryDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PatientAISummaryDetail:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the summary
        patientId:
          type: string
          title: Patientid
          description: ID of the patient this summary belongs to
        summary:
          type: string
          title: Summary
          description: The AI-generated summary text
        suggestions:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Suggestions
          description: AI-generated follow-up question suggestions
        feedbackType:
          anyOf:
            - $ref: '#/components/schemas/AIFeedbackType'
            - type: 'null'
          description: Type of feedback (positive/negative)
        feedbackText:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedbacktext
          description: Optional feedback text
        feedbackProviderId:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedbackproviderid
          description: ID of provider who gave feedback
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: When the summary was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: When the summary was last updated
      type: object
      required:
        - id
        - patientId
        - summary
        - createdDate
      title: PatientAISummaryDetail
      description: Detail schema for patient AI summary.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AIFeedbackType:
      type: string
      enum:
        - POSITIVE
        - NEGATIVE
      title: AIFeedbackType
      description: Type of feedback provided for AI-generated content.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````