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

# List a patient's lab / pathology results

> Returns structured lab and pathology results for the patient — the typed source for a TB-test date and result, reachable without parsing an untyped SOAP note. Filter with `testName`. Requires read:clinical_data scope.



## OpenAPI

````yaml /openapi-v2.json get /patients/{id}/lab-results
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /patients/{id}/lab-results:
    get:
      tags:
        - Patients
      summary: List a patient's lab / pathology results
      description: >-
        Returns structured lab and pathology results for the patient — the typed
        source for a TB-test date and result, reachable without parsing an
        untyped SOAP note. Filter with `testName`. Requires read:clinical_data
        scope.
      operationId: PatientsPublicController_listPatientLabResults
      parameters:
        - name: id
          required: true
          in: path
          description: Patient ID
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: Page number (1-indexed)
          schema:
            default: 1
            example: 1
        - name: pageSize
          required: false
          in: query
          description: Number of items per page (max 100)
          schema:
            default: 100
            example: 100
        - name: testName
          required: false
          in: query
          description: >-
            Case-insensitive substring match on the test name (e.g. `TB`,
            `QuantiFERON`).
          schema:
            example: TB
            type: string
        - name: resultedAfter
          required: false
          in: query
          description: >-
            Only results whose `resultDate` is at or after this instant (ISO
            8601).
          schema:
            example: '2026-01-01T00:00:00.000Z'
            type: string
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPatientLabResultsSuccessResponse'
        '400':
          description: Missing or invalid request parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiBadRequestResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiNotFoundResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    ListPatientLabResultsSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ListPatientLabResultsResponseData'
      required:
        - code
        - data
    PublicApiBadRequestResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: bad_request
        message:
          type: string
          description: Human-readable error message
          example: '''id'' must be a valid UUID'
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiNotFoundResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: not_found
        message:
          type: string
          description: Human-readable error message
          example: Resource not found
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ListPatientLabResultsResponseData:
      type: object
      properties:
        labResults:
          type: array
          items:
            $ref: '#/components/schemas/ExternalPatientLabResultResponse'
        pagination:
          $ref: '#/components/schemas/PaginationInfoResponse'
      required:
        - labResults
        - pagination
    ExternalPatientLabResultResponse:
      type: object
      properties:
        id:
          type: string
          description: >-
            Lab result identifier. An opaque UUID on every version — see the
            note on document ids.
          example: 1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f
        labType:
          type: string
          description: Lab type reported by the EHR
          nullable: true
          example: PATHOLOGY
        testName:
          type: string
          description: Test name
          nullable: true
          example: QuantiFERON-TB Gold Plus
        observationValue:
          type: string
          description: Result value / narrative
          nullable: true
          example: Negative
        resultStatus:
          type: string
          description: Result status
          nullable: true
          example: FINAL
        completed:
          type: boolean
          description: Whether the EHR considers the order complete
          nullable: true
        orderDate:
          type: string
          description: Order date
          nullable: true
          example: '2026-01-10T00:00:00.000Z'
        datePerformed:
          type: string
          description: Date performed
          nullable: true
          example: '2026-01-12T00:00:00.000Z'
        resultDate:
          type: string
          description: Date the result landed
          nullable: true
          example: '2026-01-14T00:00:00.000Z'
        createdAt:
          type: string
          description: Created timestamp
          example: '2026-01-14T03:20:00.000Z'
        updatedAt:
          type: string
          description: Last updated timestamp
          example: '2026-01-14T03:20:00.000Z'
      required:
        - id
        - labType
        - testName
        - observationValue
        - resultStatus
        - completed
        - orderDate
        - datePerformed
        - resultDate
        - createdAt
        - updatedAt
    PaginationInfoResponse:
      type: object
      properties:
        page:
          type: number
          description: Current page number
          example: 1
        pageSize:
          type: number
          description: Items per page
          example: 100
        totalCount:
          type: number
          description: Total number of items
          example: 250
        totalPages:
          type: number
          description: Total number of pages
          example: 3
      required:
        - page
        - pageSize
        - totalCount
        - totalPages
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````