For the complete documentation index, see llms.txt. This page is also available as Markdown.

Assessment Formation

An assessment consists of 3 parts: main, scoring, condition settings.

The main part contains a list of sections. Each section contains a list of fields. The viewType parameter in the field indicates how the field will be displayed. The parameter can take one of two values: readOnly and question. The readOnly value of the parameter indicates that the field will be displayed as a text comment. The question value of the parameter indicates that the field will be displayed as a question with the possibility of user input. If the value of the viewType parameter is equal to question then parameters refCdtName, refCdtFieldName and meta are required. The combination of parameter values refCdtName and refCdtFieldName must be unique among all fields in the assessment.

The scoring part describes the rules for calculating the assessment score. The formula parameter indicates how the score will be calculated. The parameter can take one of two values: SUM and AVG. The SUM value of the parameter indicates that the group scores will be summed up. The AVG value of the parameter indicates that the average of the group scores will be calculated. Each group also has the formula parameter which takes the same values. The group score calculates from the field's scores. To associate fields in scoring with questions, you must specify refCdtName and refCdtFieldName.

The condition settings are divided into two parts: elements and events. The elements part describes how sections or questions will be displayed based on user answers. The events part describes which custom events will be hit based on user answers.

The collection supports several interactions

  1. Allows to obtain a list of assessment

  2. Allows to obtain a certain assessment

  3. Allows to obtain a list of CDTs that is associated with an assessments

Get all Assessments

get
  1. First variable is your Tenant name. We will use gh as a tenant name through this set of api docs

  2. Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs

  3. Third variable is your formation version. We will use current to get published version and draft to get version in draft.

  • HTTP Method: GET

  • HTTP URL: https://api.live.welkincloud.io/gh/sb-demo/formation/current/assessments

  • HTTP Response Codes: 200

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
Responses
200

List of assessment formations

application/json
idstring · uuidRead-onlyOptional
titlestring · nullableOptional
namestring · max: 75RequiredPattern: ^[a-z0-9\-_]+$
versionintegerRead-onlyOptional
_containsPHIbooleanRead-onlyOptional
displayTypestring · enumOptionalDefault: SECTIONSPossible values:
autoCompletedbooleanOptional
get/{tenantName}/{instanceName}/formations/current/assessments
GET /{tenantName}/{instanceName}/formations/current/assessments HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "title": "text",
    "name": "text",
    "version": 1,
    "sections": [
      {
        "title": "text",
        "name": "text",
        "order": 1,
        "fields": [
          {
            "viewType": "question",
            "label": "text",
            "name": "text",
            "refCdtName": "text",
            "order": 1,
            "refCdtFieldName": "text",
            "meta": {
              "type": "TEXT",
              "required": true
            },
            "fields": [
              {
                "ANY_ADDITIONAL_PROPERTY": "anything"
              }
            ]
          }
        ]
      }
    ],
    "scoring": {
      "formula": "SUM",
      "groups": [
        {
          "name": "text",
          "title": "text",
          "fields": [
            {
              "refCdtName": "text",
              "refCdtFieldName": "text",
              "type": "select",
              "scores": [
                {
                  "answer": null,
                  "score": 1,
                  "notApplicable": true
                }
              ]
            }
          ],
          "formula": "SUM",
          "scalingFactor": 1
        }
      ]
    },
    "programs": [
      {
        "program": "text",
        "phases": [
          "text"
        ]
      }
    ],
    "_containsPHI": true,
    "displayType": "SECTIONS",
    "autoCompleted": true
  }
]

Get all CDTs related to Assessment

get
  1. First variable is your Tenant name. We will use gh as a tenant name through this set of api docs

  2. Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs

  3. Third variable is your formation version. We will use current to get published version and draft to get version in draft.

  • HTTP Method: GET

  • HTTP URL: https://api.live.welkincloud.io/gh/sb-demo/formation/current/assessments

  • HTTP Response Codes: 200

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
Responses
200

CDT formations referenced by assessments

application/json
idstring · uuidOptional
namestringRequiredPattern: ^[a-z0-9\-_]+$
titlestringOptional
labelstringOptional
versionintegerOptional
internalbooleanOptional
readablebooleanOptionalDefault: true
updatablebooleanOptionalDefault: true
typestring · enumOptionalPossible values:
relationstring · enumOptionalPossible values:
get/{tenantName}/{instanceName}/formations/current/assessments/cdts
GET /{tenantName}/{instanceName}/formations/current/assessments/cdts HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "title": "text",
    "label": "text",
    "version": 1,
    "internal": true,
    "readable": true,
    "updatable": true,
    "type": "SINGLE_RECORD",
    "relation": "COMMON",
    "fields": [
      {
        "name": "text",
        "type": "TEXT",
        "formula": "text",
        "dictionary": {
          "name": "text",
          "field": "text"
        },
        "profileDataType": {
          "name": "text",
          "fields": [
            "text"
          ]
        },
        "customDataType": {
          "name": "text",
          "fields": [
            "text"
          ]
        },
        "customFieldType": "text",
        "editable": true,
        "searchable": true,
        "bulkEdit": true,
        "phi": true,
        "disable": true,
        "injectedSource": true,
        "displayType": "CHECKBOX",
        "valueType": "STRING",
        "meta": {
          "label": "text",
          "minLength": 1,
          "maxLength": 1,
          "minValue": "text",
          "maxValue": "text",
          "fileTypes": [
            "text"
          ],
          "maxFiles": 1,
          "maxTotalFileSize": 1,
          "required": true,
          "options": [
            {
              "label": "text",
              "value": null,
              "refCdtName": "text"
            }
          ],
          "multiple": true,
          "patterns": [
            "NUMBERS_ONLY"
          ]
        },
        "mask": {
          "symbol": "*",
          "startPosition": 1,
          "endPosition": 1
        },
        "richTextEnabled": true
      }
    ]
  }
]

Get one Assessment

get

A certain assessment formation would be located at the following URL

URL Structure: https://api.live.welkincloud.io/{tenantName}/{instanceName}/formation/{}/assessments/{}

  1. First variable is your Tenant name. We will use gh as a tenant name through this set of api docs

  2. Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs

  3. Third variable is your formation version. We will use current to get published version and draft to get version in draft

  4. Fourth parameter is assessment name. We will specify an assessment name which we want to get

Example request:

  • HTTP Method: GET

  • HTTP URL: https://api.live.welkincloud.io/gh/sb-demo/formation/current/assessments/phq_v1

  • HTTP Response Codes: 200, 404

Authorizations
AuthorizationstringRequired

Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.

Path parameters
tenantNamestringRequired

Your organization (tenant) name, e.g. acme-health

Example: acme-health
instanceNamestringRequired

Your environment name: live, sandbox, or a custom name

Example: live
assessmentNamestringRequired

Machine-readable assessment name

Responses
200

Assessment formation

application/json
idstring · uuidRead-onlyOptional
titlestring · nullableOptional
namestring · max: 75RequiredPattern: ^[a-z0-9\-_]+$
versionintegerRead-onlyOptional
_containsPHIbooleanRead-onlyOptional
displayTypestring · enumOptionalDefault: SECTIONSPossible values:
autoCompletedbooleanOptional
get/{tenantName}/{instanceName}/formations/current/assessments/{assessmentName}
GET /{tenantName}/{instanceName}/formations/current/assessments/{assessmentName} HTTP/1.1
Host: api.live.welkincloud.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "title": "text",
  "name": "text",
  "version": 1,
  "sections": [
    {
      "title": "text",
      "name": "text",
      "order": 1,
      "fields": [
        {
          "viewType": "question",
          "label": "text",
          "name": "text",
          "refCdtName": "text",
          "order": 1,
          "refCdtFieldName": "text",
          "meta": {
            "type": "TEXT",
            "required": true
          },
          "fields": [
            {
              "ANY_ADDITIONAL_PROPERTY": "anything"
            }
          ]
        }
      ]
    }
  ],
  "scoring": {
    "formula": "SUM",
    "groups": [
      {
        "name": "text",
        "title": "text",
        "fields": [
          {
            "refCdtName": "text",
            "refCdtFieldName": "text",
            "type": "select",
            "scores": [
              {
                "answer": null,
                "score": 1,
                "notApplicable": true
              }
            ]
          }
        ],
        "formula": "SUM",
        "scalingFactor": 1
      }
    ]
  },
  "programs": [
    {
      "program": "text",
      "phases": [
        "text"
      ]
    }
  ],
  "_containsPHI": true,
  "displayType": "SECTIONS",
  "autoCompleted": true
}

Last updated

Was this helpful?