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

# Update a Smart Template

> Replaces the name, description and configuration of a Smart Template, under the same public identifier. Send `specialty` to replace the stored specialty. You can send back a GET response as is, with your changes: `configuration` accepts `properties` as a map or as the list a GET returns, and the read-only fields of a GET response are accepted. `id` must be the id in the path. `updatedAt` works as `expectedUpdatedAt` when you do not send that field: if the template changed after you read it, you get a 409. `specialties` replaces the stored list when you do not send `specialty`. A field an update cannot change is ignored: `workflow` (set at creation), `hash`, `createdAt`, `status`, `example` and any unknown field. The content hash can change.



## OpenAPI

````yaml /es/scribe-api/openapi-institutional.json put /v1/medical-record-configurations/{configuration_id}
openapi: 3.1.0
info:
  title: Scribe Public API
  description: >-
    API REST externa para integrarte con la plataforma Telepatia. Autentícate
    con API keys, establece el contexto de consulta y obtén las sesiones de
    scribe.
  version: 0.1.0
servers:
  - url: https://scribe-api.telepatia.ai
    description: Production
security:
  - BearerAuth: []
paths:
  /v1/medical-record-configurations/{configuration_id}:
    put:
      tags:
        - Medical Record Configurations
      summary: Update a Smart Template
      description: >-
        Replaces the name, description and configuration of a Smart Template,
        under the same public identifier. Send `specialty` to replace the stored
        specialty. You can send back a GET response as is, with your changes:
        `configuration` accepts `properties` as a map or as the list a GET
        returns, and the read-only fields of a GET response are accepted. `id`
        must be the id in the path. `updatedAt` works as `expectedUpdatedAt`
        when you do not send that field: if the template changed after you read
        it, you get a 409. `specialties` replaces the stored list when you do
        not send `specialty`. A field an update cannot change is ignored:
        `workflow` (set at creation), `hash`, `createdAt`, `status`, `example`
        and any unknown field. The content hash can change.
      operationId: >-
        api_medical_record_configuration_update_v1_medical_record_configurations__configuration_id__put
      parameters:
        - name: configuration_id
          in: path
          required: true
          schema:
            type: string
            title: Id de la configuración
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMedicalRecordConfigurationRequest'
            example:
              configuration:
                motivoConsulta:
                  instructionSet:
                    telepatiaPromptId: CHIEF_COMPLAINT
                    values:
                      language_type: quotes
                  schema:
                    instructions: >-
                      Motivo principal en palabras del paciente. Una sola frase,
                      sin interpretación clínica.
                    label: Motivo de consulta
                    type: string
                planTerapeutico:
                  schema:
                    instructions: >-
                      Plan, órdenes, remisiones y recomendaciones indicadas
                      durante la consulta.
                    label: Plan terapéutico
                    type: string
                  systemPrompt: >-
                    Extrae el plan terapéutico, las órdenes, las remisiones y
                    las recomendaciones en formato de resumen.
                signosVitales:
                  instructionSet:
                    telepatiaPromptId: VITAL_SIGNS
                  schema:
                    instructions: >-
                      Registrar solo los valores mencionados o medidos durante
                      la consulta. No estimar ni inferir.
                    label: Signos vitales
                    properties:
                      frecuenciaCardiaca:
                        instructions: Frecuencia cardiaca en lpm.
                        maximum: 300
                        minimum: 20
                        required: false
                        type: integer
                      temperatura:
                        instructions: Temperatura corporal en grados Celsius.
                        maximum: 45
                        minimum: 30
                        required: false
                        type: number
                    type: object
              description: Nota de consulta externa de medicina general.
              expectedUpdatedAt: '2026-04-20T14:30:00Z'
              name: Consulta externa
              specialty: GENERAL_MEDICINE
      responses:
        '200':
          description: Respuesta exitosa
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateMedicalRecordConfigurationResponse'
        '400':
          description: >-
            Solicitud incorrecta — parámetros inválidos, fallos de validación o
            campos faltantes.
          content:
            application/json:
              examples:
                parameter_missing:
                  summary: Falta un campo obligatorio
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_missing
                      message: name is required.
                      param: name
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                parameter_invalid:
                  summary: Valor de campo inválido
                  value:
                    error:
                      type: invalid_request_error
                      code: parameter_invalid
                      message: >-
                        idCountry must be a valid country name, ISO alpha-2, or
                        ISO alpha-3 code.
                      param: idCountry
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                account_invalid:
                  summary: Cuenta inválida
                  value:
                    error:
                      type: invalid_request_error
                      code: account_invalid
                      message: Account has no valid authId.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: No autorizado — falta la API key o no es válida.
          content:
            application/json:
              examples:
                authentication_required:
                  summary: API key inválida o faltante
                  value:
                    error:
                      type: authentication_error
                      code: authentication_required
                      message: Invalid API key.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: >-
            Prohibido — la API key no tiene permiso para realizar esta
            operación.
          content:
            application/json:
              examples:
                permission_denied:
                  summary: No tienes permiso sobre este recurso
                  value:
                    error:
                      type: permission_error
                      code: permission_denied
                      message: You do not have permission to access this resource.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
                permission_denied_role:
                  summary: El rol de la cuenta de la API key no permite esta operación
                  value:
                    error:
                      type: permission_error
                      code: permission_denied
                      message: >-
                        Your API key is not allowed to create accounts. Account
                        creation requires an institutional API key; this key is
                        scoped to a doctor account.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No encontrado — el recurso solicitado no existe.
          content:
            application/json:
              examples:
                resource_not_found:
                  summary: Recurso no encontrado
                  value:
                    error:
                      type: invalid_request_error
                      code: resource_not_found
                      message: No session scribe found for the given consultation ID.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflicto — el recurso ya existe o está en un estado en conflicto.
          content:
            application/json:
              examples:
                resource_conflict:
                  summary: Conflicto con el recurso
                  value:
                    error:
                      type: invalid_request_error
                      code: resource_conflict
                      message: >-
                        consultationInternalId is already in use by a different
                        consultation.
                      param: consultationInternalId
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Servicio no disponible — una dependencia externa no está disponible.
          content:
            application/json:
              examples:
                service_unavailable:
                  summary: Servicio externo no disponible
                  value:
                    error:
                      type: api_error
                      code: service_unavailable
                      message: >-
                        The service is temporarily unavailable. Please try again
                        later.
                      requestId: 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    UpdateMedicalRecordConfigurationRequest:
      properties:
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
          description: Human-readable display name.
          examples:
            - Cardiology intake
        description:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Description
          description: Human-readable description. Omitted or null clears it.
          examples:
            - Intake template for the cardiology outpatient clinic.
        configuration:
          additionalProperties:
            $ref: '#/components/schemas/TemplateSection'
          type: object
          minProperties: 1
          title: Configuration
          description: >-
            Section map keyed by node key (schema + optional prompt strategy). A
            key is a stable identifier that matches `^[A-Za-z0-9_]+$` (ASCII
            letters, digits, underscore). Put display text in the section
            `schema.label`. An object schema gives `properties` as a map keyed
            by property key, or as the `[{key, schema}]` list that a GET
            returns; a key that repeats in the list gets 400. The order of the
            map or the list is the order of the properties.
        specialty:
          anyOf:
            - $ref: '#/components/schemas/MedicalSpecialty'
            - type: 'null'
          description: >-
            Medical specialty of the template, given as the enum key (such as
            `CARDIOLOGY`) or its camelCase value (such as `cardiology`).
            Replaces the stored specialty. Without it, the `specialties` list of
            a GET body replaces the stored list; omit both to keep the stored
            one. An update does not distribute copies.
          examples:
            - CARDIOLOGY
        expectedUpdatedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expectedupdatedat
          description: >-
            The `updatedAt` you last read. When set and the template changed
            after it, the update fails with 409 `resource_conflict`. Without it,
            the `updatedAt` of a GET body is used. Omit both to let the last
            write win.
          examples:
            - '2026-04-20T14:30:00Z'
      type: object
      required:
        - name
        - configuration
      title: UpdateMedicalRecordConfigurationRequest
      description: >-
        Request body: the full new content of an existing Smart Template.


        A GET body goes back as is. The section map takes ``properties`` as a
        map (the

        create shape) or as the ``[{key, schema}]`` list of a GET response. A
        field the

        update cannot change (``workflow``, ``hash``, ``status``, an unknown
        field) is

        ignored.
      examples:
        - configuration:
            motivoConsulta:
              instructionSet:
                telepatiaPromptId: CHIEF_COMPLAINT
                values:
                  language_type: quotes
              schema:
                instructions: >-
                  Motivo principal en palabras del paciente. Una sola frase, sin
                  interpretación clínica.
                label: Motivo de consulta
                type: string
            planTerapeutico:
              schema:
                instructions: >-
                  Plan, órdenes, remisiones y recomendaciones indicadas durante
                  la consulta.
                label: Plan terapéutico
                type: string
              systemPrompt: >-
                Extrae el plan terapéutico, las órdenes, las remisiones y las
                recomendaciones en formato de resumen.
            signosVitales:
              instructionSet:
                telepatiaPromptId: VITAL_SIGNS
              schema:
                instructions: >-
                  Registrar solo los valores mencionados o medidos durante la
                  consulta. No estimar ni inferir.
                label: Signos vitales
                properties:
                  frecuenciaCardiaca:
                    instructions: Frecuencia cardiaca en lpm.
                    maximum: 300
                    minimum: 20
                    required: false
                    type: integer
                  temperatura:
                    instructions: Temperatura corporal en grados Celsius.
                    maximum: 45
                    minimum: 30
                    required: false
                    type: number
                type: object
          description: Nota de consulta externa de medicina general.
          expectedUpdatedAt: '2026-04-20T14:30:00Z'
          name: Consulta externa
          specialty: GENERAL_MEDICINE
    UpdateMedicalRecordConfigurationResponse:
      properties:
        id:
          type: string
          title: Id
          description: 'Public ID of the updated template: the same id as in the path.'
          examples:
            - mrc_a1b2c3d4e5f6g7h8
        name:
          type: string
          title: Name
          description: Stored display name.
          examples:
            - Cardiology intake
        hash:
          type: string
          title: Hash
          description: Stored content hash after the update. It can change on an update.
          examples:
            - 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
        updatedAt:
          type: string
          title: Updatedat
          description: >-
            ISO-8601 timestamp of this update. Send it as `expectedUpdatedAt`
            next time.
          examples:
            - '2026-04-21T09:00:00Z'
        example:
          additionalProperties: true
          type: object
          title: Example
          description: >-
            Shape of the final payload this template produces, keyed by section
            name. Leaf values are typed placeholders (`<string>`, `<number>`,
            `<a | b>` for enums, `<YYYY-MM-DD>` for dates); object sections
            nest, free-text sections are a single string.
          examples:
            - historyOfPresentIllness: <string>
              reviewOfSystems:
                - <string>
              visitDate: <YYYY-MM-DD>
              vitalSigns:
                bloodPressure: <string>
                heartRate: <number>
                severity: <mild | moderate | severe>
      type: object
      required:
        - id
        - name
        - hash
        - updatedAt
      title: UpdateMedicalRecordConfigurationResponse
      description: Response body for a Smart Template update.
    ErrorResponse:
      description: Sobre estandarizado de respuesta de error.
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailWithRequestId'
      required:
        - error
      title: ErrorResponse
      type: object
    TemplateSection:
      properties:
        schema:
          oneOf:
            - $ref: '#/components/schemas/StringSchema'
            - $ref: '#/components/schemas/NumberSchema'
            - $ref: '#/components/schemas/BooleanSchema'
            - $ref: '#/components/schemas/ObjectSchema'
            - $ref: '#/components/schemas/ArraySchema'
            - $ref: '#/components/schemas/CodeSchema'
            - $ref: '#/components/schemas/CodeListSchema'
            - $ref: '#/components/schemas/DerivedSchema'
          title: Schema
        systemPrompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Systemprompt
        instructionSet:
          anyOf:
            - $ref: '#/components/schemas/InstructionSetRef'
            - type: 'null'
      type: object
      required:
        - schema
      title: TemplateSection
      description: >-
        A section of a write body: the engine `Section` without its internal
        `join` flag.


        `join` controls how the generation engine batches sections. A template
        does not

        store it (see `_section_to_stored_form`), so the public schema does not
        show it.

        A body that sends it still validates.
    MedicalSpecialty:
      type: string
      enum:
        - acupuncture
        - alternativeMedicine
        - ayurvedicMedicine
        - chiropractic
        - herbalMedicine
        - homeopathy
        - naturopathy
        - traditionalChineseMedicine
        - cosmeticDentistry
        - dentistry
        - developmentalBehavioralPediatrics
        - endodontics
        - forensicDentistry
        - maxillofacialProsthodontics
        - oralMaxillofacialSurgery
        - oralMedicine
        - oralPathology
        - oralSurgery
        - orthodontics
        - pediatricDentistry
        - periodontics
        - prosthodontics
        - addictionPsychiatry
        - adolescentMedicine
        - aerospaceMedicine
        - allergyImmunology
        - andrology
        - anesthesiology
        - anesthesiologyCriticalCare
        - bariatricSurgery
        - breastRadiology
        - breastSurgery
        - cardiacSurgery
        - cardiovascularSurgery
        - cardiology
        - cardiovascularDisease
        - cardiovascularRiskProgram
        - childAbusePediatrics
        - childAdolescentPsychiatry
        - childNeurology
        - childWelfareSocialWork
        - clinicalNeurophysiology
        - clinicalSocialWork
        - colorectalSurgery
        - communityMedicine
        - communitySocialWork
        - consultationLiaisonPsychiatry
        - cosmeticDermatology
        - craniofacialTrauma
        - dermatology
        - dermoscopy
        - diabetes
        - diagnosticRadiology
        - electrophysiology
        - emergencyCriticalCare
        - emergencyMedicine
        - emergencyPsychiatry
        - endocrineSurgery
        - endocrinology
        - epilepsy
        - facialPlasticSurgery
        - familyMedicine
        - familySocialWork
        - footAnkleSurgery
        - forensicPsychiatry
        - forensicSocialWork
        - gastroenterology
        - generalMedicine
        - generalMedicinePsychiatry
        - generalSurgery
        - geriatricMedicine
        - geriatricPsychiatry
        - geriatricSocialWork
        - ginecology
        - gynecologicOncology
        - gynecologicSurgery
        - gynecology
        - handSurgery
        - headNeckSurgery
        - headacheMedicine
        - heartFailureTransplantCardiology
        - hematology
        - hepatobiliarySurgery
        - hipKneeSurgery
        - hospitalist
        - infectiousDisease
        - internalCriticalCare
        - internalMedicine
        - interventionalCardiology
        - interventionalRadiology
        - maternalFetalMedicine
        - medicalSocialWork
        - militarySocialWork
        - minimallyInvasiveGynecologicSurgery
        - mohsSurgery
        - musculoskeletalRadiology
        - neonatology
        - nephrology
        - neurocriticalCare
        - neuroimmunology
        - neurology
        - neuromuscularMedicine
        - neuroradiology
        - neurorehabilitation
        - neurosurgery
        - neurotology
        - nuclearMedicine
        - obstetrics
        - obstetricsGynecology
        - occupationalMedicine
        - occupationalSocialWork
        - oculoplasticSurgery
        - oncology
        - oncologySocialWork
        - ophthalmology
        - orthopedicHandSurgery
        - orthopedicSportsMedicine
        - orthopedicTrauma
        - orthopedics
        - otolaryngology
        - painMedicine
        - palliativeMedicine
        - palliativeSocialWork
        - pediatricAllergyImmunology
        - pediatricAnesthesiology
        - pediatricCardiology
        - pediatricCriticalCare
        - pediatricDermatology
        - pediatricEmergencyMedicine
        - pediatricEndocrinology
        - pediatricENT
        - pediatricGastroenterology
        - pediatricHematologyOncology
        - pediatricInfectiousDisease
        - pediatricNephrology
        - pediatricNeurology
        - pediatricCardiacSurgery
        - pediatricOncology
        - pediatricOphthalmology
        - pediatricOrthopedics
        - pediatricPalliativeCare
        - pediatricPulmonology
        - pediatricRadiology
        - pediatricRheumatology
        - pediatricSocialWork
        - pediatricSurgery
        - pediatricTrauma
        - pediatricUrology
        - pediatrics
        - perinatalPsychiatry
        - physicalMedicineRehab
        - plasticSurgery
        - prenatalCareProgram
        - preventiveMedicine
        - psychiatricSocialWork
        - psychiatry
        - psychosomaticMedicine
        - publicHealth
        - pulmonaryDisease
        - pulmonology
        - radiationOncologist
        - radiationOncology
        - reproductiveEndocrinology
        - retinaSurgery
        - rheumatology
        - riasProgram
        - manager
        - schoolSocialWork
        - shoulderElbowSurgery
        - sleepMedicine
        - socialWork
        - spinalCordInjury
        - spinalTrauma
        - spineSurgery
        - sportsMedicine
        - substanceAbuseSocialWork
        - surgicalOncology
        - telemedicine
        - thoracicSurgery
        - transplantHepatology
        - transplantSurgery
        - traumaSurgery
        - traumatology
        - triage
        - unknown
        - urgentCare
        - urologicOncology
        - urology
        - vascularSurgery
        - nursing
        - clinicalNutrition
        - eatingDisorderNutrition
        - gastroenterologicNutrition
        - geriatricNutrition
        - nutrition
        - oncologyNutrition
        - pediatricNutrition
        - renalNutrition
        - sportsNutrition
        - clinicalPsychology
        - counselingPsychology
        - developmentalPsychology
        - forensicPsychology
        - geropsychology
        - healthPsychology
        - industrialOrganizationalPsychology
        - militaryPsychology
        - neuropsychology
        - positivePsychology
        - psychology
        - rehabilitationPsychology
        - schoolPsychology
        - sportsPsychology
        - occupationalTherapy
        - physicalTherapy
        - respiratoryTherapy
        - speechTherapy
        - therapy
        - other
      title: MedicalSpecialty
    ErrorDetailWithRequestId:
      description: >-
        Objeto de error de nivel superior: `ErrorDetail` más el id de
        correlación de la solicitud.


        Se mantiene como subclase y no como campo de `ErrorDetail` porque
        `ErrorDetail` también es la forma del error por elemento dentro de la
        respuesta de creación de cuentas en lote (`BatchAccountResult.error`),
        que se serializa incluyendo los nulls. Agregar el campo allí publicaría
        `"requestId": null` en un HTTP 200, y de todos modos solo hay un id de
        solicitud por lote: quien llama en lote lee el encabezado de respuesta
        `X-Request-ID`.
      properties:
        type:
          description: Categoría general del error, para un manejo de alto nivel.
          examples:
            - invalid_request_error
          title: Type
          type: string
        code:
          description: >-
            Código de error legible por máquina. Tu código debe decidir según
            este valor.
          examples:
            - parameter_invalid
          title: Code
          type: string
        message:
          description: Mensaje de error legible por humanos que termina en punto.
          examples:
            - >-
              idCountry must be a valid country name, ISO alpha-2, or ISO
              alpha-3 code.
          title: Message
          type: string
        param:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: El campo de la solicitud que causó el error, si aplica.
          examples:
            - idCountry
          title: Param
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          description: Contexto opcional, estructurado y legible por máquina, del error.
          examples:
            - pendingConsultations:
                - sessionId: abc123
                  url: https://...
          title: Details
        requestId:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Id único de esta solicitud, idéntico al encabezado de respuesta
            X-Request-ID. Inclúyelo cuando contactes a soporte.
          examples:
            - 3f9a1c2e-5b7d-4a21-9f0c-8e6d4b2a1c30
          title: Requestid
      required:
        - type
        - code
        - message
      title: ErrorDetailWithRequestId
      type: object
    StringSchema:
      properties:
        type:
          type: string
          const: string
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        enum:
          anyOf:
            - items:
                anyOf:
                  - type: string
                  - $ref: '#/components/schemas/EnumOption'
              type: array
            - type: 'null'
          title: Enum
        examples:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Examples
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
        pattern:
          anyOf:
            - type: string
            - type: 'null'
          title: Pattern
        format:
          anyOf:
            - type: string
            - type: 'null'
          title: Format
        required:
          type: boolean
          title: Required
          default: false
        default:
          anyOf:
            - type: string
            - type: 'null'
          title: Default
        widget:
          anyOf:
            - type: string
              enum:
                - radio
                - dropdown
                - checkbox
            - type: 'null'
          title: Widget
      type: object
      required:
        - type
      title: StringSchema
      description: Esquema para salidas de tipo string.
    NumberSchema:
      properties:
        type:
          type: string
          enum:
            - number
            - integer
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        minimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Minimum
        maximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Maximum
        exclusiveMinimum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusiveminimum
        exclusiveMaximum:
          anyOf:
            - type: number
            - type: 'null'
          title: Exclusivemaximum
        enum:
          anyOf:
            - items:
                type: number
              type: array
            - type: 'null'
          title: Enum
        required:
          type: boolean
          title: Required
          default: false
        default:
          anyOf:
            - type: number
            - type: 'null'
          title: Default
      type: object
      required:
        - type
      title: NumberSchema
      description: Esquema para salidas numéricas (number o integer).
    BooleanSchema:
      properties:
        type:
          type: string
          const: boolean
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        required:
          type: boolean
          title: Required
          default: false
        default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Default
      type: object
      required:
        - type
      title: BooleanSchema
      description: Esquema para salidas booleanas.
    ObjectSchema:
      properties:
        type:
          type: string
          const: object
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        properties:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/StringSchema'
              - $ref: '#/components/schemas/NumberSchema'
              - $ref: '#/components/schemas/BooleanSchema'
              - $ref: '#/components/schemas/ObjectSchema'
              - $ref: '#/components/schemas/ArraySchema'
              - $ref: '#/components/schemas/CodeSchema'
              - $ref: '#/components/schemas/CodeListSchema'
              - $ref: '#/components/schemas/DerivedSchema'
          type: object
          title: Properties
        examples:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Examples
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
        required:
          type: boolean
          title: Required
          default: false
      type: object
      required:
        - type
        - properties
      title: ObjectSchema
      description: Esquema para salidas de tipo objeto con propiedades con nombre.
    ArraySchema:
      properties:
        type:
          type: string
          const: array
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        items:
          oneOf:
            - $ref: '#/components/schemas/StringSchema'
            - $ref: '#/components/schemas/NumberSchema'
            - $ref: '#/components/schemas/BooleanSchema'
            - $ref: '#/components/schemas/ObjectSchema'
            - $ref: '#/components/schemas/ArraySchema'
            - $ref: '#/components/schemas/CodeSchema'
            - $ref: '#/components/schemas/CodeListSchema'
            - $ref: '#/components/schemas/DerivedSchema'
          title: Items
        minItems:
          anyOf:
            - type: integer
            - type: 'null'
          title: Minitems
        maxItems:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxitems
        examples:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Examples
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
        required:
          type: boolean
          title: Required
          default: false
        widget:
          anyOf:
            - type: string
              enum:
                - radio
                - dropdown
                - checkbox
            - type: 'null'
          title: Widget
      type: object
      required:
        - type
        - items
      title: ArraySchema
      description: Esquema para salidas de tipo array con un único esquema de elemento.
    CodeSchema:
      properties:
        type:
          type: string
          const: code
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        system:
          type: string
          title: System
        source:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Source
        maxOptions:
          type: integer
          minimum: 1
          title: Maxoptions
          default: 1
        required:
          type: boolean
          title: Required
          default: false
      type: object
      required:
        - type
        - system
      title: CodeSchema
      description: >-
        Declaración de un código de catálogo dentro de un objeto. Guarda system,
        los nombres de las propiedades hermanas de origen y maxOptions para la
        resolución posterior a la generación.
    CodeListSchema:
      properties:
        type:
          type: string
          const: codeList
          title: Type
        instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Instructions
        system:
          type: string
          title: System
        source:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Source
        maxItems:
          anyOf:
            - type: integer
            - type: 'null'
          title: Maxitems
        maxOptions:
          type: integer
          minimum: 1
          title: Maxoptions
          default: 1
        required:
          type: boolean
          title: Required
          default: false
      type: object
      required:
        - type
        - system
      title: CodeListSchema
      description: >-
        Declaración de una lista de códigos de catálogo dentro de un objeto.
        Guarda system, los nombres de las propiedades hermanas de origen y
        maxOptions. Esta API no guarda maxItems.
    DerivedSchema:
      properties:
        type:
          type: string
          const: derivedString
          title: Type
        derivation:
          items:
            $ref: '#/components/schemas/DerivedStringVariant'
          type: array
          minItems: 1
          title: Derivation
        label:
          anyOf:
            - type: string
            - type: 'null'
          title: Label
        required:
          type: boolean
          title: Required
          default: false
      type: object
      required:
        - type
        - derivation
      title: DerivedSchema
      description: >-
        Un campo string calculado a partir de los valores de sus propiedades
        hermanas después de la generación con el LLM.


        Las referencias `{placeholder}` interpolan propiedades hermanas
        escalares. Los grupos `[...]` no anidados solo se renderizan cuando cada
        placeholder que contienen tiene un valor escalar no vacío.
    InstructionSetRef:
      properties:
        telepatiaPromptId:
          $ref: '#/components/schemas/TelepatiaPromptId'
        values:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Values
      type: object
      required:
        - telepatiaPromptId
      title: InstructionSetRef
      description: >-
        Referencia a una plantilla de prompt con sustituciones de variables
        opcionales.
    EnumOption:
      properties:
        label:
          type: string
          title: Label
        value:
          type: string
          title: Value
      type: object
      required:
        - label
        - value
      title: EnumOption
      description: >-
        Una opción de enum desacoplada: la `label` que se muestra frente al
        `value` (código) que se guarda.


        Permite que un integrador muestre `label` mientras la historia clínica
        generada guarda el `value` estable (id de catálogo, CIE-10, SNOMED), de
        modo que las etiquetas se pueden renombrar o traducir sin romper la
        integración que consume el código.
    DerivedStringVariant:
      properties:
        language:
          type: string
          title: Language
        template:
          type: string
          title: Template
      type: object
      required:
        - language
        - template
      title: DerivedStringVariant
      description: Una plantilla por idioma para un campo string derivado.
    TelepatiaPromptId:
      type: string
      enum:
        - IDENTIFICATION
        - CHIEF_COMPLAINT
        - HISTORY_OF_PRESENT_ILLNESS
        - REVIEW_OF_SYSTEMS
        - PAST_MEDICAL_HISTORY
        - PAST_MEDICAL_GYNECOLOGICAL_HISTORY
        - VITAL_SIGNS
        - ANTHROPOMETRIC_MEASURES
        - PHYSICAL_EXAMINATION
        - LABORATORY_AND_DIAGNOSTIC_TEST_RESULTS
        - CURRENT_TREATMENT
        - ASSESSMENT_PLAN
        - RECOMMENDATION_WARNING_SIGNS
        - PROCEDURE
        - SUBJECTIVE
        - OBJECTIVE
        - DIAGNOSIS
        - SUMMARY
        - TEMPLATE
        - PAST_MEDICAL_CONDITIONS_CARDIOVASCULAR_RISK
        - CARDIOVASCULAR_RISK
        - PRENATAL_CARE_GYNECOLOGICAL_HISTORY
        - PRENATAL_CARE_LABORATORY_AND_DIAGNOSTIC_TEST_RESULTS
        - INTEGRATED_HEALTH_CARE_ROUTES_AGING
        - HEALTHY_LIFESTYLE
      title: TelepatiaPromptId
      description: >-
        Identificadores disponibles de los conjuntos de instrucciones de
        Telepatia.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key enviada como token Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.