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

# Listar pacientes

> Obtiene una lista paginada de pacientes.

## Query Parameters

<ParamField query="limit" type="integer" default="20">
  Número de resultados por página (máximo 100).
</ParamField>

<ParamField query="cursor" type="string">
  Cursor de paginación devuelto en la respuesta anterior.
</ParamField>

<ParamField query="search" type="string">
  Busca por nombre, apellido, email o teléfono del paciente.
</ParamField>

<ParamField query="status" type="string">
  Filtra por estado del paciente. Valores: `active`, `inactive`.
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "pat_xyz789",
        "firstName": "María",
        "lastName": "García",
        "email": "maria.garcia@email.com",
        "phone": "+34612345678",
        "dateOfBirth": "1985-03-15",
        "status": "active",
        "tags": ["post-operatorio", "traumatología"],
        "metadata": {},
        "createdAt": "2026-05-01T10:00:00Z",
        "updatedAt": "2026-05-14T08:30:00Z"
      },
      {
        "id": "pat_abc123",
        "firstName": "Carlos",
        "lastName": "López",
        "email": "carlos.lopez@email.com",
        "phone": "+34698765432",
        "dateOfBirth": "1990-07-22",
        "status": "active",
        "tags": ["cardiología"],
        "metadata": { "insuranceId": "INS-12345" },
        "createdAt": "2026-04-20T14:00:00Z",
        "updatedAt": "2026-05-10T11:00:00Z"
      }
    ],
    "pagination": {
      "cursor": "eyJpZCI6InBhdF9hYmMxMjMifQ==",
      "hasMore": true,
      "limit": 20
    }
  }
  ```
</ResponseExample>

<ResponseField name="data" type="array">
  Lista de objetos paciente.
</ResponseField>

<ResponseField name="pagination.cursor" type="string">
  Cursor para obtener la siguiente página de resultados.
</ResponseField>

<ResponseField name="pagination.hasMore" type="boolean">
  Indica si hay más resultados disponibles.
</ResponseField>


## OpenAPI

````yaml openapi.yml GET /patients
openapi: 3.1.0
info:
  title: LINA Healthcare Platform API
  version: 1.0.0
  description: |
    API de integración para la plataforma LINA Healthcare.
    Todas las rutas requieren un token JWT obtenido intercambiando una API Key.
servers:
  - url: https://api.linahealthcareplatform.com/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /patients:
    get:
      tags:
        - Pacientes
      summary: Listar pacientes
      operationId: listPatients
      parameters:
        - name: limit
          in: query
          schema:
            type: integer
            default: 20
        - name: cursor
          in: query
          schema:
            type: string
        - name: search
          in: query
          schema:
            type: string
          description: Buscar por nombre, email o teléfono
        - name: status
          in: query
          schema:
            type: string
            enum:
              - active
              - inactive
      responses:
        '200':
          description: Lista de pacientes
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Patient'
                  total:
                    type: integer
components:
  schemas:
    Patient:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        email:
          type: string
        phone:
          type: string
        dateOfBirth:
          type: string
          format: date
        status:
          type: string
          enum:
            - active
            - inactive
        tags:
          type: array
          items:
            type: string
        metadata:
          type: object
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Token JWT obtenido via POST /auth/token

````