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

# Update Patient Dynamic Fields

> Update patient's dynamic field data.

Args:
    dynamic_fields: Dictionary mapping field IDs to lists of values.
                   e.g., {"pdf_abc123": ["peanuts", "shellfish"], "pdf_def456": ["diabetes"]}



## OpenAPI

````yaml put /user/patient/{id}/dynamic-fields
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/{id}/dynamic-fields:
    put:
      tags:
        - provider
        - user
      summary: Update Patient Dynamic Fields
      description: |-
        Update patient's dynamic field data.

        Args:
            dynamic_fields: Dictionary mapping field IDs to lists of values.
                           e.g., {"pdf_abc123": ["peanuts", "shellfish"], "pdf_def456": ["diabetes"]}
      operationId: update_patient_dynamic_fields_user_patient__id__dynamic_fields_put
      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: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties:
                items:
                  type: string
                type: array
              title: Dynamic Fields
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePatientDynamicFieldsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpdatePatientDynamicFieldsResponse:
      properties:
        healthData:
          additionalProperties:
            $ref: '#/components/schemas/DynamicHealthField'
          type: object
          title: Healthdata
          description: Updated health data
      type: object
      required:
        - healthData
      title: UpdatePatientDynamicFieldsResponse
      description: Response schema for updating patient dynamic fields.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DynamicHealthField:
      properties:
        fieldId:
          type: string
          title: Fieldid
          description: Unique identifier for the dynamic field
        values:
          items:
            type: string
          type: array
          title: Values
          description: List of values for this field
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
          description: Type of the dynamic field (e.g., ALLERGIES, FAMILY_HISTORY)
      type: object
      required:
        - fieldId
      title: DynamicHealthField
      description: Schema for dynamic health field data structure.
    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

````