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

# Intake Form

> Event payload details and trigger documentation for Intake Form 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 Intake Form event payload from Intakeq.

* `Intakeq Intake Form Submitted`

<RequestExample>
  ```json Example theme={null}
  {
    "appointment_id": "12342",
    "client_email": "john.smith@example.com",
    "client_id": 42,
    "client_name": "John Smith",
    "consent_forms": [
      {
        "document_type": "HIPAA",
        "id": "12342",
        "name": "HIPAA Consent",
        "signed": true,
        "submitted_at": "2024-01-23T10:30:00Z"
      }
    ],
    "created_at": "2024-01-23T10:00:00Z",
    "external_client_id": "a7699305-7142-4599-a661-717b6bcd3305",
    "id": "12342",
    "practitioner": "acbdefg",
    "practitioner_name": "Dr. Marie Curie",
    "questionnaire_name": "Initial Intake Form",
    "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": "Submitted",
    "submitted_at": "2024-01-23T10:30:00Z"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "appointment_id": "ID of the associated appointment",
    "client_email": "Email address of the client",
    "client_id": "IntakeQ's unique identifier for the client",
    "client_name": "Full name of the client",
    "consent_forms": {
      "document_type": "Type of the consent document",
      "id": "Unique identifier for the consent form",
      "name": "Name of the consent form",
      "signed": "Whether the consent form has been signed",
      "submitted_at": "Time the consent form was submitted"
    },
    "created_at": "Time the intake form was created",
    "external_client_id": "External system client ID",
    "id": "Unique identifier for the intake form",
    "practitioner": "ID of the practitioner",
    "practitioner_name": "Name of the practitioner",
    "questionnaire_name": "Name of the questionnaire",
    "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 intake form",
    "submitted_at": "Time the intake form was submitted"
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Intake Form" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="id" type="string" required>
      Unique identifier for the intake form

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

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

    <ResponseField name="client_name" type="string">
      `PII` Full name of the client

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

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

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

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

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

    <ResponseField name="client_id" type="int64" required>
      `ID` IntakeQ's unique identifier for the client

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

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

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

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

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

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      Time the intake form was created

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

      ```json Example theme={null}
      "2024-01-23T10:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="submitted_at" type="timing.v1.Timestamp" required>
      Time the intake form was submitted

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

      ```json Example theme={null}
      "2024-01-23T10:30:00Z"
      ```
    </ResponseField>

    <ResponseField name="questionnaire_name" type="string" required>
      Name of the questionnaire

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

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

    <ResponseField name="practitioner" type="string">
      ID of the practitioner

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

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

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

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

      ```json Example theme={null}
      "Dr. Marie Curie"
      ```
    </ResponseField>

    <ResponseField name="questions" type="[]object" required>
      `HI` Questions and answers in the intake form

      ```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">
      ID of the associated appointment

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

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

    <ResponseField name="external_client_id" type="string">
      `ID` External system client ID

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

      ```json Example theme={null}
      "a7699305-7142-4599-a661-717b6bcd3305"
      ```
    </ResponseField>

    <ResponseField name="consent_forms" type="[]object" required>
      `HI` Consent forms associated with the intake form

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

      ```json Example theme={null}
      [
      {
      "document_type": "HIPAA",
      "id": "12342",
      "name": "HIPAA Consent",
      "signed": true,
      "submitted_at": "2024-01-23T10:30:00Z"
      }
      ]
      ```
    </ResponseField>

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

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

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

    <ResponseField name="consent_forms.map(x, x.name)" type="[]string" required>
      Mapped array of: Name of the consent form

      ```json CEL theme={null}
      consent_forms.map(x, x.name)
      ```

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

    <ResponseField name="consent_forms.map(x, x.document_type)" type="[]string" required>
      Mapped array of: Type of the consent document

      ```json CEL theme={null}
      consent_forms.map(x, x.document_type)
      ```

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

    <ResponseField name="consent_forms.map(x, x.signed)" type="[]bool" required>
      Mapped array of: Whether the consent form has been signed

      ```json CEL theme={null}
      consent_forms.map(x, x.signed)
      ```

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

    <ResponseField name="consent_forms.map(x, x.submitted_at)" type="[]timing.v1.Timestamp" required>
      Mapped array of: Time the consent form was submitted

      ```json CEL theme={null}
      consent_forms.map(x, x.submitted_at)
      ```

      ```json Example theme={null}
      [
      "2024-01-23T10:30:00Z"
      ]
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
