Document Template Version Section

The document template version sections contains information about a section in a document template version.

The document template version section model

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the document template version section.

  • Name
    object
    Type
    string
    Description

    Always 'document_template_section'.

  • 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
    name
    Type
    string
    Description

    Name of the document template version section.

  • Name
    questions
    Type
    string
    Description

    List of questions is this document template version section.

  • Name
    conditions
    Type
    2D array of objects
    Description
    Set of conditions that have to be met for this document template version section to be visible. If no conditions are passed, this document template version section 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 section 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 section 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
        }
      ]
    ]

Response

{
    "id": "dtsc_U8xtAULYUrX7GVsTKePy",
    "object": "document_template_section",

    "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
    "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",

    "name": "Section 1",
    "questions": ["dqst_1JtjV1QEY84Fv395Hl7h"],
    "conditions": [
      [
        {
          "field": "dqst_3951JtjV1QEY84FvHl7h",
          "condition": "equalTo",
          "value": "Yes"
        }
      ]
    ]
}


POST/v1/document_template_sections

Create a document template version section

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.

Optional attributes

  • Name
    document_tempate_version
    Type
    string
    Description

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

  • Name
    name
    Type
    string
    Description

    Name of the document template version section.

  • Name
    questions
    Type
    string
    Description

    List of questions is this document template version section.

  • Name
    conditions
    Type
    2D array of objects
    Description
    Set of conditions that have to be met for this document template version section to be visible. If no conditions are passed, this document template version section 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 section 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 section 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
        }
      ]
    ]

Response

 {
    "id": "dtsc_U8xtAULYUrX7GVsTKePy",
    "object": "document_template_section",

    "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
    "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",

    "name": "Section 1",
    "questions": ["dqst_1JtjV1QEY84Fv395Hl7h"],
    "conditions": [
      [
        {
          "field": "dqst_3951JtjV1QEY84FvHl7h",
          "condition": "equalTo",
          "value": "Yes"
        }
      ]
    ]
}


GET/v1/document_template_sections/:id

Retrieve a document template version section

Retrieves the specified document template version section.

Response


{
  "id": "dtsc_U8xtAULYUrX7GVsTKePy",
   "object": "document_template_section",

   "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
   "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",

   "name": "Section 1",
   "questions": ["dqst_1JtjV1QEY84Fv395Hl7h"],
   "conditions": [
     [
       {
         "field": "dqst_3951JtjV1QEY84FvHl7h",
         "condition": "equalTo",
         "value": "Yes"
       }
     ]
   ]
}


POST/v1/document_template_sections/: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
      document_template
      Type
      string
      Description

      Document template that this document template version section belongs to.

    • Name
      document_tempate_version
      Type
      string
      Description

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

    • Name
      name
      Type
      string
      Description

      Name of the document template version section.

    • Name
      questions
      Type
      string
      Description

      List of questions is this document template version section.

    • Name
      conditions
      Type
      2D array of objects
      Description
      Set of conditions that have to be met for this document template version section to be visible. If no conditions are passed, this document template version section 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 section 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 section 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
          }
        ]
      ]

    Response

    
    {
        "id": "dtsc_U8xtAULYUrX7GVsTKePy",
        "object": "document_template_section",
    
        "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
        "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
    
        "name": "Section 1",
        "questions": ["dqst_1JtjV1QEY84Fv395Hl7h"],
        "conditions": [
          [
            {
              "field": "dqst_3951JtjV1QEY84FvHl7h",
              "condition": "equalTo",
              "value": "Yes"
            }
          ]
        ]
    }
    
    

    GET/v1/document_template_sections

    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.

    Response

    {
      "object": "list",
      "data": [
        {
            "id": "dtsc_U8xtAULYUrX7GVsTKePy",
            "object": "document_template_section",
    
            "document_template": "dtmp_1JtjV1QEY84Fv395Hl7h",
            "document_template_version": "dtmv_1JtjV1QEY84Fv395Hl7h",
    
            "name": "Section 1",
            "questions": ["dqst_1JtjV1QEY84Fv395Hl7h"],
            "conditions": [
              [
                {
                  "field": "dqst_3951JtjV1QEY84FvHl7h",
                  "condition": "equalTo",
                  "value": "Yes"
                }
              ]
            ]
        },
      ]
    }
    

    DELETE/v1/document_template_sections/:id

    Delete a document template version section

    Deletes the specified document template version section.

    Required attributes

      Optional attributes

        Response

        {
            "id": "dtsc_U8xtAULYUrX7GVsTKePy",
            "object": "document_template_section",
            "delete": true
        }