Risk Output
Example request
1GET /api/v1/{tenantId}/reports/{traversalId}/risks
2 ?ages=80&ages=90
3 &conclusions=3495&conclusions=3501
Parameters
Parameter | Description
-|-
tenantId | The tenant ID, usually the same as the client_id used for authentication
traversalId | ID of a completed HRA traversal
ages | Ages for which to calculate the risks, e.g. ages=80&ages=90 will calculate risks by the ages of 80 and 90, respectively
conclusions | IDs of conclusions selected from the checkableConclusions array (see below). If present, the API will calculate the risks as if the user had implemented the specified recommendations.
Example response
1{
2 "age": 38,
3 "ageAtDeath": 85,
4 "minimumAgeAtDeath": 91,
5 "healthAge": 35,
6 "minimumHealthAge": 29,
7 "averageLifeExpectancy": 82,
8 "maximumLifeExpectancy": 91,
9 "gender": "F",
10 "risks": [
11 {
12 "name": "Breast cancer",
13 "time": 42,
14 "current": 9.69,
15 "minimum": 6.57
16 },
17 {
18 "name": "Breast cancer",
19 "time": 52,
20 "current": 14.29,
21 "minimum": 9.77
22 },
23 {
24 "name": "Bowel cancer",
25 "time": 42,
26 "current": 1.84,
27 "minimum": 1.21
28 },
29 {
30 "name": "Bowel cancer",
31 "time": 52,
32 "current": 2.53,
33 "minimum": 1.67
34 },
35 {
36 "name": "Death",
37 "time": 42,
38 "current": 35.35,
39 "minimum": 20.5
40 },
41 {
42 "name": "Death",
43 "time": 52,
44 "current": 72.15,
45 "minimum": 48.96
46 },
47 {
48 "name": "Diabetes",
49 "time": 42,
50 "current": 15.14,
51 "minimum": 8.34
52 },
53 {
54 "name": "Diabetes",
55 "time": 52,
56 "current": 18.39,
57 "minimum": 10.22
58 },
59 {
60 "name": "Heart disease",
61 "time": 42,
62 "current": 6.1,
63 "minimum": 3.05
64 },
65 {
66 "name": "Heart disease",
67 "time": 52,
68 "current": 11.18,
69 "minimum": 5.67
70 },
71 {
72 "name": "Lung cancer",
73 "time": 42,
74 "current": 0.17,
75 "minimum": 0.17
76 },
77 {
78 "name": "Lung cancer",
79 "time": 52,
80 "current": 0.35,
81 "minimum": 0.35
82 },
83 {
84 "name": "Stroke",
85 "time": 42,
86 "current": 2.22,
87 "minimum": 1.95
88 },
89 {
90 "name": "Stroke",
91 "time": 52,
92 "current": 4.06,
93 "minimum": 3.57
94 }
95 ],
96 "checkableConclusions": [
97 3497,
98 10076,
99 3505,
100 ...
101 ]
102}
Definitions
RiskOutput
Property | Description
-|-
age | The user's actual age
ageAtDeath | The user's predicted age at death
minimumAgeAtDeath | The user's predicted age at death, if all the recommendations are implemented
healthAge | The user's health age, calculated as age + averageLifeExpectancy - ageAtDeath
minimumHealthAge | The user's health age, if all the recommendations are implemented
averageLifeExpectancy | The average life expectancy for a person of this age and gender
maximumLifeExpectancy | The maximum life expectancy for a person of this age and gender, if all recommendations are implemented
gender | The user's gender: "M" for male, "F" for female, "U" for other/unknown
risks | Array of Risk objects (see below), one for each risk/timescale combination
checkableConclusions | Array of assetIds of conclusions (recommendations) that may affect the calculations if implemented. A list of the conclusions attached to the traversal should be requested from the conclusions endpoint of the Traversal API. See the conclusions documentation for more details.
Risk
Property | Description -|- name | Name of the risk time | The timescale, in years from now current | Percentage probability of the risk occurring within the given timescale minimum | Percentage probability of the risk occurring within the given timescale, if all recommendations are implemented
