Table Questions
Table format (Radio buttons/Checkboxes)
A Table Question's response will depend on which API you are using:
Traversal API
A single node with multiple questions is usually displayed as a table where the answer's DisplayText are the column headers and the questions themselves are the rows. This could look something like this:
Figure 1: Two single-answer questions displayed in a table.
{
"traversalId": "...",
"algoId": 4611,
"nodes": [
{
"nodeId": 473,
"assetId": 6627,
"errors": [],
"displayText": "Tell us more ...",
"title": "",
"explanation": "",
"data": "{}",
"questions": [
{
"nodeId": 473,
"questionId": 20575,
"displayText": "Have you been urinating (peeing) less than usual?",
"title": "",
"answers": [
{
"nodeId": 473,
"questionId": 20575,
"answerId": 1,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "Yes",
"explanation": "",
"data": { "Properties": { "ImageSource": "yes.png" } }
},
{
"nodeId": 473,
"questionId": 20575,
"answerId": 2,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "No",
"explanation": "",
"data": {
"Properties": { "ImageSource": "no.png", "nerprop": "value" }
}
}
],
"explanation": "Some illnesses can make you more likely to be dehydrated, which is when the body loses more water than it takes in. Signs of significant dehydration include skin that seems less elastic (it doesn't spring back immediately when gently squeezed); dry mouth and lips; not passing urine for more than 12 hours; and dark-yellow urine.\n\nIllnesses with fever cause the body to lose more water than normal, so you must drink extra fluid to replace it.\n",
"data": {}
},
{
"nodeId": 473,
"questionId": 37,
"displayText": "Do you have any condition or take any medication that makes it hard to fight infections?\n<span class=\"e24subtext\">(Please click on the \"i\" icon for examples).</span>\n",
"title": "",
"answers": [
{
"nodeId": 473,
"questionId": 37,
"answerId": 1,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "Yes",
"explanation": "",
"data": { "Properties": { "ImageSource": "yes.png" } }
},
{
"nodeId": 473,
"questionId": 37,
"answerId": 2,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "No",
"explanation": "",
"data": {
"Properties": { "ImageSource": "no.png", "nerprop": "value" }
}
}
],
"explanation": "An efficient immune system is important for resistance against infections. If something interferes with this, an infection may become more serious. \n\nAnswer \"Yes\" if any of the following apply to you:\n<ul><li>Have had chemotherapy or radiotherapy treatment in the last 6 months</li><li>Taking immunosuppressant drugs, for example methotrexate, sulphasalazine, leflunomide, azathioprine, ciclosporin, etanercept, infliximab, adalimumab, cyclophosphamide, mycophenoloate mofetil, belimumab, tacrolimus, sirolimus, basiliximub, belatacept antithymocyte immunoglobulin, rituximab</li><li>Diabetes</li><li>Previous organ transplant</li><li>Previous surgery to remove spleen</li><li>Leukaemia</li><li>Aplastic anaemia</li><li>HIV positive</li><li>On dialysis because of kidney failure</li><li>Sickle cell disease</li><li>Taking regular steroid medication, for example prednisolone, dexamethasone, methylprednisolone or hydrocortisone</li><li>Addison's disease</li><li>Anti-thyroid drugs, for example methimazole, carbimazole, and propylthiouracil</li><li>A doctor has ever said your immune system is not working normally</li></ul>\nIf none of the above applies to you, answer \"No\".",
"data": {}
}
],
"isTable": true
}
],
"assessmentType": 1,
"algoName": "Healing wound, open sore, or scar problems",
"errors": [],
"previousDisabled": false,
"nextDisabled": false,
"language": "DEFAULT"
}
Chat Traversal API
The response for a table question on the Chat Traversal API will* only contain one question at a time. The next response will be the next question in the same table.
Step 1
For example, the first response for the above table question (see Figure 1) will simply be the first question:
Figure 2a: first question of a table
{
"traversalId": "",
"algoId": 4611,
"nodeId": 473,
"questions": [{
"algoId": 4611,
"nodeId": 473,
"questionId": 20575,
"displayText": "Have you been urinating (peeing) less than usual?",
"title": null,
"answers": [{
"nodeId": 473,
"questionId": 20575,
"answerId": 1,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "Yes",
"explanation": "",
"data": {
"Properties": {
"ImageSource": "yes.png"
}
}
}, {
"nodeId": 473,
"questionId": 20575,
"answerId": 2,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "No",
"explanation": "",
"data": {
"Properties": {
"ImageSource": "no.png",
"nerprop": "value"
}
}
}
],
"explanation": "Some illnesses can make you more likely to be dehydrated, which is when the body loses more water than it takes in. Signs of significant dehydration include skin that seems less elastic (it doesn't spring back immediately when gently squeezed); dry mouth and lips; not passing urine for more than 12 hours; and dark-yellow urine.\n\nIllnesses with fever cause the body to lose more water than normal, so you must drink extra fluid to replace it.\n",
"data": {}
}
],
"assessmentType": 0,
"errors": [],
"completed": false
}
Step 2
The second response, once the first has been answered, will be :
Figure 2b: second question of a table
{
"traversalId": "5ea78c0f-bd62-427f-a5df-0bb22c7702a4",
"algoId": 4611,
"nodeId": 473,
"questions": [
{
"algoId": 4611,
"nodeId": 473,
"questionId": 37,
"displayText": "Do you have any condition or take any medication that makes it hard to fight infections?\n<span class=\"e24subtext\">(Please click on the \"i\" icon for examples).</span>\n",
"title": null,
"answers": [
{
"nodeId": 473,
"questionId": 37,
"answerId": 1,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "Yes",
"explanation": "",
"data": {
"Properties": {
"ImageSource": "yes.png"
}
}
},
{
"nodeId": 473,
"questionId": 37,
"answerId": 2,
"controlType": "Radio",
"controlValue": null,
"controlChecked": false,
"displayText": "No",
"explanation": "",
"data": {
"Properties": {
"ImageSource": "no.png",
"nerprop": "value"
}
}
}
],
"explanation": "An efficient immune system is important for resistance against infections. If something interferes with this, an infection may become more serious. \n\nAnswer \"Yes\" if any of the following apply to you:\n<ul><li>Have had chemotherapy or radiotherapy treatment in the last 6 months</li><li>Taking immunosuppressant drugs, for example methotrexate, sulphasalazine, leflunomide, azathioprine, ciclosporin, etanercept, infliximab, adalimumab, cyclophosphamide, mycophenoloate mofetil, belimumab, tacrolimus, sirolimus, basiliximub, belatacept antithymocyte immunoglobulin, rituximab</li><li>Diabetes</li><li>Previous organ transplant</li><li>Previous surgery to remove spleen</li><li>Leukaemia</li><li>Aplastic anaemia</li><li>HIV positive</li><li>On dialysis because of kidney failure</li><li>Sickle cell disease</li><li>Taking regular steroid medication, for example prednisolone, dexamethasone, methylprednisolone or hydrocortisone</li><li>Addison's disease</li><li>Anti-thyroid drugs, for example methimazole, carbimazole, and propylthiouracil</li><li>A doctor has ever said your immune system is not working normally</li></ul>\nIf none of the above applies to you, answer \"No\".",
"data": {}
}
],
"assessmentType": 0,
"errors": [],
"completed": false
}
*Except in cases where footers (e.g. copyright, etc) and headers (e.g. titles) are present.