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

# Note

> Event payload details and trigger documentation for Note data from Intakeq

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/intakeq.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=191a6c088f13edff5cd7f23a84babb49" alt="images/intakeq.svg" width="40" height="40" data-path="images/intakeq.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Note event payload from Intakeq.

* `Intakeq Note Locked`
* `Intakeq Note Updated`

<RequestExample>
  ```json Example theme={null}
  {
    "appointment_id": "54683513554",
    "client_email": "john.doe@example.com",
    "client_id": 12345,
    "client_name": "John Doe",
    "id": "note123",
    "last_modified_at": "2023-01-15T14:30:00Z",
    "note_name": "Initial Assessment",
    "practitioner_email": "doctor@example.com",
    "practitioner_id": "pract456",
    "practitioner_name": "Dr. Jane Smith",
    "questions": [
      {
        "answer": "Back pain",
        "attachments": [
          {
            "content_type": "application/pdf",
            "file_name": "medical_report.pdf",
            "id": "12342",
            "url": "https://example.com/attachment.pdf"
          }
        ],
        "client_profile_field_id": "primary_concern",
        "column_names": [
          "Symptom",
          "Severity"
        ],
        "id": "12342",
        "office_note": "Patient reported severe pain",
        "office_use": false,
        "question_type": "text",
        "rows": [
          {
            "answers": [
              "Back pain",
              "Severe"
            ],
            "text": "Back pain"
          }
        ],
        "text": "What is your primary concern?"
      }
    ],
    "status": "locked or unlocked",
    "timestamp": "2023-01-15T14:30:00Z"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "appointment_id": "Identifier of the associated appointment",
    "client_email": "Email address of the client",
    "client_id": "Unique identifier for the client",
    "client_name": "Name of the client",
    "id": "Unique identifier for the note",
    "last_modified_at": "Timestamp when the note was last modified",
    "note_name": "Name of the note",
    "practitioner_email": "Email of the practitioner",
    "practitioner_id": "Unique identifier for the practitioner",
    "practitioner_name": "Name of the practitioner",
    "questions": {
      "answer": "Answer to the question",
      "attachments": {
        "content_type": "Content type of the attachment",
        "file_name": "Name of the attached file",
        "id": "Unique identifier for the attachment",
        "url": "URL of the attachment"
      },
      "client_profile_field_id": "ID of the client profile field this question maps to",
      "column_names": "Column names for table/grid questions",
      "id": "Unique identifier for the question",
      "office_note": "Office note for the question",
      "office_use": "Whether the question is for office use only",
      "question_type": "Type of the question",
      "rows": {
        "answers": "Answers for each column in the row",
        "text": "Text for the row"
      },
      "text": "Text of the question"
    },
    "status": "Status of the note",
    "timestamp": "Timestamp when the note was created (called `Date` in the IntakeQ API)"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Note" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      Unique identifier for the note

      ```json CEL theme={null}
      id
      ```

      ```json Example theme={null}
      "note123"
      ```
    </ResponseField>

    <ResponseField name="client_name" type="string">
      Name of the client

      ```json CEL theme={null}
      client_name
      ```

      ```json Example theme={null}
      "John Doe"
      ```
    </ResponseField>

    <ResponseField name="client_email" type="string">
      Email address of the client

      ```json CEL theme={null}
      client_email
      ```

      ```json Example theme={null}
      "john.doe@example.com"
      ```
    </ResponseField>

    <ResponseField name="client_id" type="int64" required>
      Unique identifier for the client

      ```json CEL theme={null}
      client_id
      ```

      ```json Example theme={null}
      12345
      ```
    </ResponseField>

    <ResponseField name="status" type="string" required>
      Status of the note

      ```json CEL theme={null}
      status
      ```

      ```json Example theme={null}
      "locked or unlocked"
      ```
    </ResponseField>

    <ResponseField name="timestamp" type="timing.v1.Timestamp" required>
      Timestamp when the note was created (called `Date` in the IntakeQ API)

      ```json CEL theme={null}
      timestamp
      ```

      ```json Example theme={null}
      "2023-01-15T14:30:00Z"
      ```
    </ResponseField>

    <ResponseField name="note_name" type="string">
      Name of the note

      ```json CEL theme={null}
      note_name
      ```

      ```json Example theme={null}
      "Initial Assessment"
      ```
    </ResponseField>

    <ResponseField name="practitioner_email" type="string">
      Email of the practitioner

      ```json CEL theme={null}
      practitioner_email
      ```

      ```json Example theme={null}
      "doctor@example.com"
      ```
    </ResponseField>

    <ResponseField name="practitioner_name" type="string">
      Name of the practitioner

      ```json CEL theme={null}
      practitioner_name
      ```

      ```json Example theme={null}
      "Dr. Jane Smith"
      ```
    </ResponseField>

    <ResponseField name="practitioner_id" type="string">
      Unique identifier for the practitioner

      ```json CEL theme={null}
      practitioner_id
      ```

      ```json Example theme={null}
      "pract456"
      ```
    </ResponseField>

    <ResponseField name="questions" type="[]object" required>
      Questions included in the note

      ```json CEL theme={null}
      questions
      ```

      ```json Example theme={null}
      [
      {
      "answer": "Back pain",
      "attachments": [
      {
        "content_type": "application/pdf",
        "file_name": "medical_report.pdf",
        "id": "12342",
        "url": "https://example.com/attachment.pdf"
      }
      ],
      "client_profile_field_id": "primary_concern",
      "column_names": [
      "Symptom",
      "Severity"
      ],
      "id": "12342",
      "office_note": "Patient reported severe pain",
      "office_use": false,
      "question_type": "text",
      "rows": [
      {
        "answers": [
          "Back pain",
          "Severe"
        ],
        "text": "Back pain"
      }
      ],
      "text": "What is your primary concern?"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.id)" type="[]string" required>
      Mapped array of: Unique identifier for the question

      ```json CEL theme={null}
      questions.map(x, x.id)
      ```

      ```json Example theme={null}
      [
      "12342"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.text)" type="[]string" required>
      Mapped array of: Text of the question

      ```json CEL theme={null}
      questions.map(x, x.text)
      ```

      ```json Example theme={null}
      [
      "What is your primary concern?"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.answer)" type="[]string" required>
      `HI` Mapped array of: Answer to the question

      ```json CEL theme={null}
      questions.map(x, x.answer)
      ```

      ```json Example theme={null}
      [
      "Back pain"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.question_type)" type="[]string" required>
      Mapped array of: Type of the question

      ```json CEL theme={null}
      questions.map(x, x.question_type)
      ```

      ```json Example theme={null}
      [
      "text"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.rows)" type="[]bool" required>
      `HI` Mapped array of: Rows for table/grid questions

      ```json CEL theme={null}
      questions.map(x, x.rows)
      ```

      ```json Example theme={null}
      [
      [
      {
      "answers": [
        "Back pain",
        "Severe"
      ],
      "text": "Back pain"
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.column_names)" type="[]bool" required>
      Mapped array of: Column names for table/grid questions

      ```json CEL theme={null}
      questions.map(x, x.column_names)
      ```

      ```json Example theme={null}
      [
      [
      "Symptom",
      "Severity"
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.office_use)" type="[]bool" required>
      Mapped array of: Whether the question is for office use only

      ```json CEL theme={null}
      questions.map(x, x.office_use)
      ```

      ```json Example theme={null}
      [
      false
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.office_note)" type="[]string" required>
      Mapped array of: Office note for the question

      ```json CEL theme={null}
      questions.map(x, x.office_note)
      ```

      ```json Example theme={null}
      [
      "Patient reported severe pain"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.client_profile_field_id)" type="[]string" required>
      Mapped array of: ID of the client profile field this question maps to

      ```json CEL theme={null}
      questions.map(x, x.client_profile_field_id)
      ```

      ```json Example theme={null}
      [
      "primary_concern"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions.map(x, x.attachments)" type="[]bool" required>
      `HI` Mapped array of: Attachments associated with the question

      ```json CEL theme={null}
      questions.map(x, x.attachments)
      ```

      ```json Example theme={null}
      [
      [
      {
      "content_type": "application/pdf",
      "file_name": "medical_report.pdf",
      "id": "12342",
      "url": "https://example.com/attachment.pdf"
      }
      ]
      ]
      ```
    </ResponseField>

    <ResponseField name="appointment_id" type="string">
      Identifier of the associated appointment

      ```json CEL theme={null}
      appointment_id
      ```

      ```json Example theme={null}
      "54683513554"
      ```
    </ResponseField>

    <ResponseField name="last_modified_at" type="timing.v1.Timestamp" required>
      Timestamp when the note was last modified

      ```json CEL theme={null}
      last_modified_at
      ```

      ```json Example theme={null}
      "2023-01-15T14:30:00Z"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
