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
Allows to obtain a list of assessment
Allows to obtain a certain assessment
Allows to obtain a list of CDTs that is associated with an assessments
First variable is your Tenant name. We will use gh as a tenant name through this set of api docs
Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs
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/assessmentsHTTP Response Codes: 200
Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.
Your organization (tenant) name, e.g. acme-health
acme-healthYour environment name: live, sandbox, or a custom name
liveList of assessment formations
^[a-z0-9\-_]+$SECTIONSPossible values: Bad request — the request could not be understood or was missing required parameters.
Unauthorized — the Bearer token is missing, expired, or invalid.
Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin.
Not found — the requested resource does not exist.
Too many requests — rate limit exceeded. Implement exponential backoff.
Internal server error.
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
}
]First variable is your Tenant name. We will use gh as a tenant name through this set of api docs
Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs
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/assessmentsHTTP Response Codes: 200
Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.
Your organization (tenant) name, e.g. acme-health
acme-healthYour environment name: live, sandbox, or a custom name
liveCDT formations referenced by assessments
^[a-z0-9\-_]+$truetrueBad request — the request could not be understood or was missing required parameters.
Unauthorized — the Bearer token is missing, expired, or invalid.
Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin.
Not found — the requested resource does not exist.
Too many requests — rate limit exceeded. Implement exponential backoff.
Internal server error.
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
}
]
}
]A certain assessment formation would be located at the following URL
URL Structure: https://api.live.welkincloud.io/{tenantName}/{instanceName}/formation/{}/assessments/{}
First variable is your Tenant name. We will use gh as a tenant name through this set of api docs
Second variable is your Instance name. We will use sb-demo as an instance name through this set of api docs
Third variable is your formation version. We will use current to get published version and draft to get version in draft
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_v1HTTP Response Codes: 200, 404
Bearer token obtained from POST /{tenantName}/admin/api_clients/{clientName}. Valid for 60 minutes.
Your organization (tenant) name, e.g. acme-health
acme-healthYour environment name: live, sandbox, or a custom name
liveMachine-readable assessment name
Assessment formation
^[a-z0-9\-_]+$SECTIONSPossible values: Bad request — the request could not be understood or was missing required parameters.
Unauthorized — the Bearer token is missing, expired, or invalid.
Forbidden — the API client role does not have permission for this resource. Check the role and security policy in Admin.
Not found — the requested resource does not exist.
Too many requests — rate limit exceeded. Implement exponential backoff.
Internal server error.
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?