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

# Get Prefilled Answers

> Get pre-filled answer data for a template based on patient's existing dynamic field values.

Returns data in the same format as note answers so it can be used directly
to pre-populate answers when creating a new note.



## OpenAPI

````yaml get /notes/templates/{template_id}/prefill/{patient_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /notes/templates/{template_id}/prefill/{patient_id}:
    get:
      tags:
        - provider
        - scribe
        - note
        - templates
      summary: Get Prefilled Answers
      description: >-
        Get pre-filled answer data for a template based on patient's existing
        dynamic field values.


        Returns data in the same format as note answers so it can be used
        directly

        to pre-populate answers when creating a new note.
      operationId: >-
        get_prefilled_answers_notes_templates__template_id__prefill__patient_id__get
      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: template_id
          in: path
          required: true
          schema:
            type: string
            title: Template Id
        - name: patient_id
          in: path
          required: true
          schema:
            type: string
            title: Patient Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrefilledAnswersResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PrefilledAnswersResponse:
      properties:
        templateId:
          type: string
          title: Templateid
        patientId:
          type: string
          title: Patientid
        prefilledAnswers:
          items:
            $ref: '#/components/schemas/PrefilledAnswer'
          type: array
          title: Prefilledanswers
      type: object
      required:
        - templateId
        - patientId
        - prefilledAnswers
      title: PrefilledAnswersResponse
      description: Response containing pre-filled answers for template questions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PrefilledAnswer:
      properties:
        questionId:
          type: string
          title: Questionid
        data:
          additionalProperties: true
          type: object
          title: Data
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
      type: object
      required:
        - questionId
        - data
      title: PrefilledAnswer
      description: Pre-filled answer data for a question based on patient's existing data.
    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

````