Doctorlink has joined HealthHerohealthheroLearn More
doctorlink
  • Home
  • Authentication
  • Traversal API
  • Example Responses
  • Traversal Client
  • Health Risk Assessment API
  • Advanced Techniques

Traversal response

The below JSON object will be sent by the API while traversing through a product. For a detailed response containing actual data we have a full response sample.

1{
2   "traversalId": Guid,
3   "algoId": int,
4   "nodes":[...],
5   "assessmentType": int,
6   "algoName":"string",
7   "errors":[
8      "string"
9   ],
10   "previousDisabled":bool,
11   "nextDisabled":bool,
12   "language":"string"
13}

TraversalId : Your unique traversal Identifier.

AlgoId : Identifier of the current algorithm.

AlgoName : The label given to the algorithm. This is made by the content creator.

AssessmentType : Identifier of the assessment.

Language : Language of the content, e.g. EN, Dutch. Content must be translated in the AssetBuilder before being released to the system.

Nodes : An array of Nodes. More than one Node indicates the content creator wishes you to see more than one set of questions at a time. If you opt to use the /api/v1/{tenantId}/ChatTraversals endpoint, you will only ever see one node with one question at a time.

Errors : This will describe any problems the system has faced while attempting to traverse the algorithm. This is likely to be, for example, a validation error when answering questions. Note: this will not be the same as an API error which would normally return a 4xx or 5xx response with no body.

PreviousDisabled : PreviousDisabled=true indicates that the algorithm has determined that the user should not be allowed to Revisit a node/question.

NextDisabled : NextDisabled=true indicates that the algorithm has determined that the user should not be allowed to Respond to this node/question. Unless, PreviousDisabled=false the traversal should be considered to have come to an end.


This response will be sent for every endpoint in the following list:

  • GET /api/v1/{tenantId}/Traversals/{traversalId}
  • POST /api/v1/{tenantId}/Traversals
  • POST /api/v1/{tenantId}/Traversals/{traversalId}/respond
  • POST /api/v1/{tenantId}/Traversals/{traversalId}/revisit
  • GET /api/v1/{tenantId}/ChatTraversals/{traversalId}
  • POST /api/v1/{tenantId}/ChatTraversals
  • POST /api/v1/{tenantId}/ChatTraversals/{traversalId}/respond
  • POST /api/v1/{tenantId}/ChatTraversals/{traversalId}/revisit

Please see our (Swagger or ReDoc) documentation for endpoint details.


Full Response Sample

1{
2   "traversalId":"xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx",
3   "algoId":4550,
4   "nodes":[
5      {
6         "nodeId":2,
7         "assetId":0,
8         "errors":[],
9         "displayText":null,
10         "title":null,
11         "explanation":null,
12         "data":null,
13         "questions":[
14            {
15               "nodeId":2,
16               "questionId":13045,
17               "displayText":"Welcome. Before we start, we need to know a few basic things...",
18               "title":null,
19               "answers":[
20                  {
21                     "nodeId":2,
22                     "questionId":13045,
23                     "answerId":7527,
24                     "controlType":"Radio",
25                     "controlValue":null,
26                     "controlChecked":false,
27                     "displayText":"Myself",
28                     "explanation":"",
29                     "data":{
30                        "Properties":{
31                           "Self":"True"
32                        }
33                     }
34                  },
35                  {
36                     "nodeId":2,
37                     "questionId":13045,
38                     "answerId":7528,
39                     "controlType":"Radio",
40                     "controlValue":null,
41                     "controlChecked":false,
42                     "displayText":"Someone else",
43                     "explanation":"",
44                     "data":{
45                        "Properties":{
46                           "Self":"False"
47                        }
48                     }
49                  }
50               ],
51               "explanation":"",
52               "data":{}
53            }
54         ],
55         "isTable":false
56      }
57   ],
58   "assessmentType":0,
59   "algoName":"Age & Gender",
60   "errors":[],
61   "previousDisabled":true,
62   "nextDisabled":false,
63   "language":"EN"
64}