Document Template Version Question

The document template version questions contains information about a question in a document template version.

The document template version question model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the document template version question.

  • Name
    object
    Type
    string
    Description

    Always 'document_template_question'.

  • Name
    document_template
    Type
    string
    Description

    Document template that this document template version section belongs to.

  • Name
    document_template_version
    Type
    string
    Description

    Document template version that this document template version section belongs to.

  • Name
    document_template_section
    Type
    string
    Description

    Document template section that this document template version question belongs to.

  • Name
    name
    Type
    string
    Description

    Name of the document template version question.

  • Name
    type
    Type
    string
    Description

    Type of document template version question.

    Possible values:
    multipleChoice
    dropdown
    shortAnswer
    grid
    number
    paragraph
    date
    time
    picture
    file
    statement
    consent
    ssn
    address
    insurance
    ICDCodes
    CPTCodes
    editor
    setupPayment
    preferredPharmacy
    allergy
    medication
    scheduledMedication
    vitals
    familyHistory
  • Name
    show_on_summary_card
    Type
    boolean
    Description

    Whether or not the document template version question should be shown on the summary card in Avon UI's patient chart.

  • Name
    required
    Type
    boolean
    Description

    Whether or not a response to the document template version question is required.

  • Name
    conditions
    Type
    2D array of objects
    Description
    Set of conditions that have to be met for this document template version question to be visible. If no conditions are passed, this document template version question will always be visible. The inner array is a set of conditions that are ANDed together whereas the outer array is a set of conditions that are ORed together. For example, if you want this document template version question to be visible if the patient selects either option 1 or option 2, you would pass:
    [
      [
        {
          "field": "opt_1",
          "condition": "equalTo",
          "value": true
        }
      ],
      [
        {
          "field": "opt_2",
          "condition": "equalTo",
          "value": true
        }
      ]
    ]
    If you want this document template version question to be visible if the patient selects option 1 and option 2, you would pass:
    [
      [
        {
          "field": "opt_1",
          "condition": "equalTo",
          "value": true
        },
        {
          "field": "opt_2",
          "condition": "equalTo",
          "value": true
        }
      ]
    ]
  • Name
    add_to_patient_chart
    Type
    boolean
    Description

    Only applies for question types . Whether or not the response to this question should be automatically added to the patient's chart.

  • Name
    policy
    Type
    string
    Description

    Only applies if 'question.type' is 'consent'. Policy that patient is agreeing to.

  • Name
    default_codes
    Type
    string
    Description

    Only applies if 'question.type' is 'ICDCodes' and 'CPTCodes'. Default ICD/CPT codes respectively to be auto-filled into response.

  • Name
    options
    Type
    array of objects
    Description
    Only applies if "question.type" is "dropdown" or "multipleChoice". Options to be represented to the patient.
  • Name
    description
    Type
    boolean
    Description

    Only applies if 'question.type' is 'dropdown' or 'grid'. If you want each option to have a description.

  • Name
    default_text
    Type
    string
    Description

    Only applies if 'question.type' is 'editor'. Default text to be autopopulated in the response.

  • Name
    rows
    Type
    array of objects
    Description
    Only applies if "question.type" is "grid". Rows of grid.
  • Name
    columns
    Type
    array
    Description

    Only applies if 'question.type' is 'grid'. Array of columns for the grid.

  • Name
    buttons
    Type
    array of objects
    Description
    Only applies if "question.type" is "grid". Buttons in grid.
  • Name
    multi_select
    Type
    boolean
    Description

    Only applies if 'question.type' is 'grid' or 'multipleChoice'. Whether the patient can select multiple buttons in a row (for grid) and multiple options (for multiple choice).

  • Name
    image
    Type
    boolean
    Description

    Only applies if 'question.type' is 'multipleChoice'. Whether to display an image next to each option.

  • Name
    placeholder
    Type
    string
    Description

    Only applies if 'question.type' is 'number,' 'paragraph,' 'shortAnswer,' or 'ssn'. The placeholder text for the input.

  • Name
    details
    Type
    string
    Description

    Only applies if 'question.type' is 'statement'. The content of the statement. Can be HTML.

  • Name
    medication
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The medication name that should be auto-filled into the response.

  • Name
    strength
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The strength of the medication that should be auto-filled into the response.

  • Name
    sig
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The sig for the medication that should be auto-filled into the response.

Response

{
    "id": "dqst_U8xtAULYUrX7GVsTKePy",
    "object": "document_template_question",

    "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
    "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
    "document_template_section": "dtsc_U8xtAULYUrX7GVsTKePy",

    "name": "What is your name?",
    "type": "shortAnswer",
    "show_on_summary_card": true,
    "required": true,
    "conditions": [
      [
        {
          "field": "dqst_3951JtjV1QEY84FvHl7h",
          "condition": "equalTo",
          "value": "Yes"
        }
      ]
    ]
}


POST/v1/document_template_questions

Create a document template version question

Creates a new document template version section.

Required attributes

  • Name
    document_template
    Type
    string
    Description

    Document template that this document template version section belongs to.

  • Name
    document_template_section
    Type
    string
    Description

    Document template section that this document template version question belongs to.

  • Name
    type
    Type
    string
    Description

    Type of document template version question.

    Possible values:
    multipleChoice
    dropdown
    shortAnswer
    grid
    number
    paragraph
    date
    time
    picture
    file
    statement
    consent
    ssn
    address
    insurance
    ICDCodes
    CPTCodes
    editor
    setupPayment
    preferredPharmacy
    allergy
    medication
    scheduledMedication
    vitals
    familyHistory

Optional attributes

  • Name
    name
    Type
    string
    Description

    Name of the document template version question.

  • Name
    show_on_summary_card
    Type
    boolean
    Description

    Whether or not the document template version question should be shown on the summary card in Avon UI's patient chart.

  • Name
    required
    Type
    boolean
    Description

    Whether or not a response to the document template version question is required.

  • Name
    conditions
    Type
    2D array of objects
    Description
    Set of conditions that have to be met for this document template version question to be visible. If no conditions are passed, this document template version question will always be visible. The inner array is a set of conditions that are ANDed together whereas the outer array is a set of conditions that are ORed together. For example, if you want this document template version question to be visible if the patient selects either option 1 or option 2, you would pass:
    [
      [
        {
          "field": "opt_1",
          "condition": "equalTo",
          "value": true
        }
      ],
      [
        {
          "field": "opt_2",
          "condition": "equalTo",
          "value": true
        }
      ]
    ]
    If you want this document template version question to be visible if the patient selects option 1 and option 2, you would pass:
    [
      [
        {
          "field": "opt_1",
          "condition": "equalTo",
          "value": true
        },
        {
          "field": "opt_2",
          "condition": "equalTo",
          "value": true
        }
      ]
    ]
  • Name
    add_to_patient_chart
    Type
    boolean
    Description

    Only applies for question types . Whether or not the response to this question should be automatically added to the patient's chart.

  • Name
    policy
    Type
    string
    Description

    Only applies if 'question.type' is 'consent'. Policy that patient is agreeing to.

  • Name
    default_codes
    Type
    string
    Description

    Only applies if 'question.type' is 'ICDCodes' and 'CPTCodes'. Default ICD/CPT codes respectively to be auto-filled into response.

  • Name
    options
    Type
    array of objects
    Description
    Only applies if "question.type" is "dropdown" or "multipleChoice". Options to be represented to the patient.
  • Name
    description
    Type
    boolean
    Description

    Only applies if 'question.type' is 'dropdown' or 'grid'. If you want each option to have a description.

  • Name
    default_text
    Type
    string
    Description

    Only applies if 'question.type' is 'editor'. Default text to be autopopulated in the response.

  • Name
    rows
    Type
    array of objects
    Description
    Only applies if "question.type" is "grid". Rows of grid.
  • Name
    columns
    Type
    array
    Description

    Only applies if 'question.type' is 'grid'. Array of columns for the grid.

  • Name
    buttons
    Type
    array of objects
    Description
    Only applies if "question.type" is "grid". Buttons in grid.
  • Name
    multi_select
    Type
    boolean
    Description

    Only applies if 'question.type' is 'grid' or 'multipleChoice'. Whether the patient can select multiple buttons in a row (for grid) and multiple options (for multiple choice).

  • Name
    image
    Type
    boolean
    Description

    Only applies if 'question.type' is 'multipleChoice'. Whether to display an image next to each option.

  • Name
    placeholder
    Type
    string
    Description

    Only applies if 'question.type' is 'number,' 'paragraph,' 'shortAnswer,' or 'ssn'. The placeholder text for the input.

  • Name
    details
    Type
    string
    Description

    Only applies if 'question.type' is 'statement'. The content of the statement. Can be HTML.

  • Name
    medication
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The medication name that should be auto-filled into the response.

  • Name
    strength
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The strength of the medication that should be auto-filled into the response.

  • Name
    sig
    Type
    string
    Description

    Only applies if 'question.type' is 'scheduledMedication'. The sig for the medication that should be auto-filled into the response.

Response

 {
     "id": "dqst_U8xtAULYUrX7GVsTKePy",
    "object": "document_template_question",

    "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
    "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
    "document_template_section": "dtsc_U8xtAULYUrX7GVsTKePy",

    "name": "What is your name?",
    "type": "shortAnswer",
    "show_on_summary_card": true,
    "required": true,
    "conditions": [
      [
        {
          "field": "dqst_3951JtjV1QEY84FvHl7h",
          "condition": "equalTo",
          "value": "Yes"
        }
      ]
    ]
}


GET/v1/document_template_questions/:id

Retrieve a document template version section

Retrieves the specified document template version section.

Response


{
   "id": "dqst_U8xtAULYUrX7GVsTKePy",
   "object": "document_template_question",

   "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
   "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
   "document_template_section": "dtsc_U8xtAULYUrX7GVsTKePy",

   "name": "What is your name?",
   "type": "shortAnswer",
   "show_on_summary_card": true,
   "required": true,
   "conditions": [
     [
       {
         "field": "dqst_3951JtjV1QEY84FvHl7h",
         "condition": "equalTo",
         "value": "Yes"
       }
     ]
   ]
}


POST/v1/document_template_questions/:id

Update a document template version section

Updates the specified document template version section object by setting the values of the parameters passed. Any other parameters not provided will not be modified.

Required attributes

    Optional attributes

    • Name
      name
      Type
      string
      Description

      Name of the document template version question.

    • Name
      type
      Type
      string
      Description

      Type of document template version question.

      Possible values:
      multipleChoice
      dropdown
      shortAnswer
      grid
      number
      paragraph
      date
      time
      picture
      file
      statement
      consent
      ssn
      address
      insurance
      ICDCodes
      CPTCodes
      editor
      setupPayment
      preferredPharmacy
      allergy
      medication
      scheduledMedication
      vitals
      familyHistory
    • Name
      show_on_summary_card
      Type
      boolean
      Description

      Whether or not the document template version question should be shown on the summary card in Avon UI's patient chart.

    • Name
      required
      Type
      boolean
      Description

      Whether or not a response to the document template version question is required.

    • Name
      conditions
      Type
      2D array of objects
      Description
      Set of conditions that have to be met for this document template version question to be visible. If no conditions are passed, this document template version question will always be visible. The inner array is a set of conditions that are ANDed together whereas the outer array is a set of conditions that are ORed together. For example, if you want this document template version question to be visible if the patient selects either option 1 or option 2, you would pass:
      [
        [
          {
            "field": "opt_1",
            "condition": "equalTo",
            "value": true
          }
        ],
        [
          {
            "field": "opt_2",
            "condition": "equalTo",
            "value": true
          }
        ]
      ]
      If you want this document template version question to be visible if the patient selects option 1 and option 2, you would pass:
      [
        [
          {
            "field": "opt_1",
            "condition": "equalTo",
            "value": true
          },
          {
            "field": "opt_2",
            "condition": "equalTo",
            "value": true
          }
        ]
      ]
    • Name
      add_to_patient_chart
      Type
      boolean
      Description

      Only applies for question types . Whether or not the response to this question should be automatically added to the patient's chart.

    • Name
      policy
      Type
      string
      Description

      Only applies if 'question.type' is 'consent'. Policy that patient is agreeing to.

    • Name
      default_codes
      Type
      string
      Description

      Only applies if 'question.type' is 'ICDCodes' and 'CPTCodes'. Default ICD/CPT codes respectively to be auto-filled into response.

    • Name
      options
      Type
      array of objects
      Description
      Only applies if "question.type" is "dropdown" or "multipleChoice". Options to be represented to the patient.
    • Name
      description
      Type
      boolean
      Description

      Only applies if 'question.type' is 'dropdown' or 'grid'. If you want each option to have a description.

    • Name
      default_text
      Type
      string
      Description

      Only applies if 'question.type' is 'editor'. Default text to be autopopulated in the response.

    • Name
      rows
      Type
      array of objects
      Description
      Only applies if "question.type" is "grid". Rows of grid.
    • Name
      columns
      Type
      array
      Description

      Only applies if 'question.type' is 'grid'. Array of columns for the grid.

    • Name
      buttons
      Type
      array of objects
      Description
      Only applies if "question.type" is "grid". Buttons in grid.
    • Name
      multi_select
      Type
      boolean
      Description

      Only applies if 'question.type' is 'grid' or 'multipleChoice'. Whether the patient can select multiple buttons in a row (for grid) and multiple options (for multiple choice).

    • Name
      image
      Type
      boolean
      Description

      Only applies if 'question.type' is 'multipleChoice'. Whether to display an image next to each option.

    • Name
      placeholder
      Type
      string
      Description

      Only applies if 'question.type' is 'number,' 'paragraph,' 'shortAnswer,' or 'ssn'. The placeholder text for the input.

    • Name
      details
      Type
      string
      Description

      Only applies if 'question.type' is 'statement'. The content of the statement. Can be HTML.

    • Name
      medication
      Type
      string
      Description

      Only applies if 'question.type' is 'scheduledMedication'. The medication name that should be auto-filled into the response.

    • Name
      strength
      Type
      string
      Description

      Only applies if 'question.type' is 'scheduledMedication'. The strength of the medication that should be auto-filled into the response.

    • Name
      sig
      Type
      string
      Description

      Only applies if 'question.type' is 'scheduledMedication'. The sig for the medication that should be auto-filled into the response.

    Response

    
    {
        "id": "dqst_U8xtAULYUrX7GVsTKePy",
        "object": "document_template_question",
    
        "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
        "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
        "document_template_section": "dtsc_U8xtAULYUrX7GVsTKePy",
    
        "name": "What is your name?",
        "type": "shortAnswer",
        "show_on_summary_card": true,
        "required": true,
        "conditions": [
          [
            {
              "field": "dqst_3951JtjV1QEY84FvHl7h",
              "condition": "equalTo",
              "value": "Yes"
            }
          ]
        ]
    }
    
    

    GET/v1/document_template_questions

    List all document template version sections

    Returns a list of all document template version sections.

    Optional query parameters

    • Name
      document_template
      Type
      string
      Description

      Document template to filter by.

    • Name
      document_template_version
      Type
      string
      Description

      Document template version to filter by.

    • Name
      document_template_section
      Type
      string
      Description

      Document template section to filter by.

    Response

    {
      "object": "list",
      "data": [
        {
            "id": "dqst_U8xtAULYUrX7GVsTKePy",
            "object": "document_template_question",
    
            "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
            "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
            "document_template_section": "dtsc_U8xtAULYUrX7GVsTKePy",
    
            "name": "What is your name?",
            "type": "shortAnswer",
            "show_on_summary_card": true,
            "required": true,
            "conditions": [
              [
                {
                  "field": "dqst_3951JtjV1QEY84FvHl7h",
                  "condition": "equalTo",
                  "value": "Yes"
                }
              ]
            ]
        },
      ]
    }
    

    DELETE/v1/document_template_questions/:id

    Delete a document template version section

    Deletes the specified document template version section.

    Required attributes

      Optional attributes

        Response

        {
            "id": "dqst_U8xtAULYUrX7GVsTKePy",
            "object": "document_template_question",
            "delete": true
        }