> ## 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.

# Actualizar paciente

> Actualiza los datos de un paciente existente. Solo se modifican los campos enviados.

## Path Parameters

<ParamField path="id" type="string" required>
  ID del paciente (ej. `pat_xyz789`).
</ParamField>

## Body

<ParamField body="firstName" type="string">
  Nombre del paciente.
</ParamField>

<ParamField body="lastName" type="string">
  Apellido(s) del paciente.
</ParamField>

<ParamField body="email" type="string">
  Dirección de correo electrónico.
</ParamField>

<ParamField body="phone" type="string">
  Número de teléfono en formato internacional.
</ParamField>

<ParamField body="dateOfBirth" type="string">
  Fecha de nacimiento en formato `YYYY-MM-DD`.
</ParamField>

<ParamField body="status" type="string">
  Estado del paciente: `active` o `inactive`.
</ParamField>

<ParamField body="tags" type="string[]">
  Etiquetas del paciente. Reemplaza las etiquetas existentes.
</ParamField>

<ParamField body="metadata" type="object">
  Datos personalizados. Se fusionan con los existentes (merge).
</ParamField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": "pat_xyz789",
    "firstName": "María",
    "lastName": "García Fernández",
    "email": "maria.garcia@email.com",
    "phone": "+34612345678",
    "dateOfBirth": "1985-03-15",
    "status": "active",
    "tags": ["traumatología", "post-operatorio", "alta"],
    "metadata": { "insuranceId": "INS-12345", "doctorId": "doc_456" },
    "createdAt": "2026-05-01T10:00:00Z",
    "updatedAt": "2026-05-14T12:00:00Z"
  }
  ```
</ResponseExample>

<ResponseField name="updatedAt" type="string">
  Fecha de la última actualización en formato ISO 8601.
</ResponseField>


## OpenAPI

````yaml openapi.yml PATCH /patients/{id}
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/{id}:
    patch:
      tags:
        - Pacientes
      summary: Actualizar paciente
      operationId: updatePatient
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                firstName:
                  type: string
                lastName:
                  type: string
                email:
                  type: string
                phone:
                  type: string
                tags:
                  type: array
                  items:
                    type: string
                metadata:
                  type: object
      responses:
        '200':
          description: Actualizado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Patient'
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

````