Ever heard of the term Nature vs. Nurture? The thing is, both DNA and environment play a role in determining health risks. Use this API to see how much of an impact your lifestyle, environment and medical history are having on your health risks.
Introduction
We have a database of a wide variety of lifestyle assessments available, 185 at the time of writing. Each assessment is exclusively for a single health risk / disease / disorder / trait / condition (all these terms are used interchangeably throughout the API documentation for this feature). Completing each assessment helps determine the risk of a profile for the particular disorder that the assessment is associated with.
Take for example Bipolar Disorder. Upon attempting the assessment for bipolar disorder, the user is presented with a set of questions related to their lifestyle, environment and medical history. Based on their answers to those questions, we have have a risk calculator that determines their risk for the disorder relative to the population.
We also provide transparent information as to which answer of the user is having what impact on their overall risk score. So, after completing an assessment, users can access not just their risk score, but also how each aspect of their lifestyle, environment and medical history impact the risk, giving them an idea of what actionable steps they can take to reduce their risk. For example, if a user answers in the affirmative to the question regarding their consumption of certain drugs that are known to increase the risk of bipolar disorder, they'll be able to see that this particular answer is increasing their risk.
Listing Lifestyle Assessment Summaries
To list all available lifestyle assessments, call the GET /lifestyle-assessment-summary/ listing endpoint. For more information about what each field in the response means, refer to the endpoint schema.
Sample response:
[
{
"id": "2439d831-d395-43af-aa25-74a9fee32cb0",
"questionnaire_id": "a85a1e95-3e7a-44a0-8847-b5c5145b0756",
"area": [
"mental health"
],
"disease_name": "Bipolar Disorder",
"capitalize_disease_name": false,
"duration": 3,
"visible_to_genders": [
"Male",
"Female"
]
},
...
]
Sex-specific Assessments
Most assessments are generic, but there are certain assessments exclusively for males, like Prostate Cancer and exclusively for females, like Breast Cancer. The visible_to_genders field determines that. While displaying assessments to a profile, based on the profile's sex which can be retrieved from GET /profile/{id} endpoint, you should filter and display only the relevant ones. A ?visible_to_genders query param can also be provided to list only sex-specific assessments; refer to endpoint schema for details.
Retrieving Lifestyle Assessment Details
To retrieve details for a lifestyle assessment, use the GET /lifestyle-assessment/{id} retrieve endpoint. For more information about what each field in the response means, refer to the endpoint schema.
Sample response:
{
"id": "2439d831-d395-43af-aa25-74a9fee32cb0",
"questionnaire_id": "a85a1e95-3e7a-44a0-8847-b5c5145b0756",
"area": [
"mental health"
],
"disease_name": "Bipolar Disorder",
"capitalize_disease_name": false,
"duration": 3,
"visible_to_genders": [
"Male",
"Female"
],
"disclaimer": "<p>This assessment is not diagnostic of bipolar disorder</p>",
"about_text": "<p>Anger, sadness, and joy are everyday human experiences. It’s normal to feel a wide range of emotions. <strong>However, some people experience extreme changes in emotions that interfere with their lives. </strong>These are called <strong>mood swings</strong>, and they can be a symptom of a deeper problem.</p>\r\n\r\n<p> </p>\r\n\r\n<p><strong>A common cause of mood swings is bipolar disorder.</strong> This condition causes mood changes that are severe enough to affect daily life. It can also cause shifts in energy, focus, and ability to perform basic tasks [<a href=\"https://www.nimh.nih.gov/health/topics/bipolar-disorder\"><u>R</u></a>, <a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>, <a href=\"https://www.mayoclinic.org/diseases-conditions/cyclothymia/diagnosis-treatment/drc-20371281\"><u>R</u></a>].</p>\r\n\r\n<p> </p>\r\n\r\n<p>People with bipolar disorder have periods of high energy and good mood followed by periods of low energy and poor mood. <strong>These ‘up’ periods are called </strong><strong><em>manic </em></strong><strong>episodes, and the ‘down’ periods are called </strong><strong><em>depressive </em></strong><strong>episodes</strong>. <strong>Some people experience less extreme highs called </strong><strong><em>hypomanic </em></strong><strong>episodes</strong> [<a href=\"https://www.nimh.nih.gov/health/topics/bipolar-disorder\"><u>R</u></a>, <a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>].</p>\r\n\r\n<p> </p>\r\n\r\n<p>Other conditions that can cause mood swings include [<a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558911/\"><u>R</u></a>, <a href=\"https://www.mayoclinic.org/diseases-conditions/premenstrual-syndrome/symptoms-causes/syc-20376780\"><u>R</u></a>, <a href=\"https://www.nimh.nih.gov/health/publications/borderline-personality-disorder\"><u>R</u></a>]:</p>\r\n\r\n<ul>\r\n\t<li>Personality disorders (e.g., borderline personality disorder)</li>\r\n\t<li>Premenstrual syndrome (PMS)</li>\r\n</ul>\r\n\r\n<p>About <strong>2-3%</strong> of people may develop some form of bipolar disorder during their lifetime. Most people develop it as teens or young adults [<a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>].</p>",
"questions": [
{
"id": "4fee7512-9e04-4a10-b262-5cfa39d205ca",
"question_text": "<p>Have you ever been diagnosed with asthma?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 1,
"archived": false,
"answer_options": [
{
"id": "b47a0421-6ba2-46d0-bfe2-f7aa0c568636",
"resourcetype": "MultipleChoiceOption",
"question_id": "4fee7512-9e04-4a10-b262-5cfa39d205ca",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "5beb6b7f-25cf-4cfb-93d2-bc08fa963e32",
"resourcetype": "MultipleChoiceOption",
"question_id": "4fee7512-9e04-4a10-b262-5cfa39d205ca",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "a4c30c15-5470-4710-b491-d73e3ed3e312",
"question_text": "<p>Have you ever had a head injury resulting in a skull fracture, broken nose, concussion or loss of consciousness?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 3,
"archived": false,
"answer_options": [
{
"id": "d3076f29-f67a-4e73-8f4a-9fc4fdf92352",
"resourcetype": "MultipleChoiceOption",
"question_id": "a4c30c15-5470-4710-b491-d73e3ed3e312",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "ef01be74-8c62-4392-92b4-cd1cb715200c",
"resourcetype": "MultipleChoiceOption",
"question_id": "a4c30c15-5470-4710-b491-d73e3ed3e312",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "f1f00ce0-ad99-432e-82df-0665c0dc1481",
"question_text": "<p>Do you regularly use drugs such as cannabis, cocaine, amphetamines, or opioids in a way that appreciably harms your health, social relationships, or occupational duties?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 6,
"archived": false,
"answer_options": [
{
"id": "2a587771-9ab1-4cea-881e-fb764999d149",
"resourcetype": "MultipleChoiceOption",
"question_id": "f1f00ce0-ad99-432e-82df-0665c0dc1481",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "99fb233b-ca18-4d20-a4c7-5f93aa65a466",
"resourcetype": "MultipleChoiceOption",
"question_id": "f1f00ce0-ad99-432e-82df-0665c0dc1481",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "e19aedd4-a26f-4f43-83db-7afaa3adf67f",
"question_text": "<p>Have you ever been diagnosed with alcohol use disorder?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 7,
"archived": false,
"answer_options": [
{
"id": "b7bac16e-19c7-4986-848b-ed797b4fbacd",
"resourcetype": "MultipleChoiceOption",
"question_id": "e19aedd4-a26f-4f43-83db-7afaa3adf67f",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "fe10323a-73e7-449b-a353-37deb4d14d47",
"resourcetype": "MultipleChoiceOption",
"question_id": "e19aedd4-a26f-4f43-83db-7afaa3adf67f",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "091db4b1-5f8d-422c-97f6-c58c0e52888f",
"question_text": "<p>Do you have a parent or sibling who has ever been diagnosed with bipolar disorder?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 8,
"archived": false,
"answer_options": [
{
"id": "8f794184-151c-4e1d-b639-74eaf4a88985",
"resourcetype": "MultipleChoiceOption",
"question_id": "091db4b1-5f8d-422c-97f6-c58c0e52888f",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "d9118922-5807-4845-8265-53bf0a2bfe34",
"resourcetype": "MultipleChoiceOption",
"question_id": "091db4b1-5f8d-422c-97f6-c58c0e52888f",
"option_text": "No",
"order": 2,
"archived": false
},
{
"id": "096637a9-2d29-44ec-a104-65d3eb7e5e1c",
"resourcetype": "MultipleChoiceOption",
"question_id": "091db4b1-5f8d-422c-97f6-c58c0e52888f",
"option_text": "Not sure",
"order": 3,
"archived": false
}
]
},
{
"id": "1ba063e6-a404-4897-8a92-736557508a75",
"question_text": "<p>Did you ever suffer from physical abuse or physical bullying during your childhood?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 10,
"archived": false,
"answer_options": [
{
"id": "ec7009cb-2785-444c-bc0c-0dab71d45fff",
"resourcetype": "MultipleChoiceOption",
"question_id": "1ba063e6-a404-4897-8a92-736557508a75",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "0a0e47ae-9bac-417e-82c2-50141727b999",
"resourcetype": "MultipleChoiceOption",
"question_id": "1ba063e6-a404-4897-8a92-736557508a75",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "eed7fedb-6968-47d7-85cd-0b8d1cf1c294",
"question_text": "<p>Did you ever suffer from emotional abuse or emotional bullying during your childhood?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 11,
"archived": false,
"answer_options": [
{
"id": "d254bbb9-0180-478a-a594-533bdaa30f77",
"resourcetype": "MultipleChoiceOption",
"question_id": "eed7fedb-6968-47d7-85cd-0b8d1cf1c294",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "d932b727-3d3c-49f4-a6e4-c70239c4f262",
"resourcetype": "MultipleChoiceOption",
"question_id": "eed7fedb-6968-47d7-85cd-0b8d1cf1c294",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "ab8f16d8-5fda-4057-8133-7f106e74c3c9",
"question_text": "<p>Did you ever suffer from sexual abuse during your childhood?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 12,
"archived": false,
"answer_options": [
{
"id": "a5af6bf5-8b27-431f-8596-3a1d38af0f1c",
"resourcetype": "MultipleChoiceOption",
"question_id": "ab8f16d8-5fda-4057-8133-7f106e74c3c9",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "9cde8341-2a8d-4d50-a746-d0b6b3c968db",
"resourcetype": "MultipleChoiceOption",
"question_id": "ab8f16d8-5fda-4057-8133-7f106e74c3c9",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "fb50d2bb-2ced-4536-a761-6bb566bb330d",
"question_text": "<p>Did you ever suffer from physical neglect during your childhood?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 13,
"archived": false,
"answer_options": [
{
"id": "29cb2d66-c46c-4c2a-8ee2-0c87469995ac",
"resourcetype": "MultipleChoiceOption",
"question_id": "fb50d2bb-2ced-4536-a761-6bb566bb330d",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "42e8c0d9-4970-4996-83d4-b8250eab45e6",
"resourcetype": "MultipleChoiceOption",
"question_id": "fb50d2bb-2ced-4536-a761-6bb566bb330d",
"option_text": "No",
"order": 2,
"archived": false
}
]
},
{
"id": "28a1a86e-5ede-47ae-b6cd-dff720177416",
"question_text": "<p>Did you ever suffer from emotional neglect during your childhood?</p>",
"leading_text": "",
"followup_text": "",
"question_type": "standard",
"answer_type": "single choice",
"position": 14,
"archived": false,
"answer_options": [
{
"id": "6e76fdd5-a04f-4710-8f68-4dbd3a57d12b",
"resourcetype": "MultipleChoiceOption",
"question_id": "28a1a86e-5ede-47ae-b6cd-dff720177416",
"option_text": "Yes",
"order": 1,
"archived": false
},
{
"id": "318c647c-f039-47ba-bfac-378d6598e61d",
"resourcetype": "MultipleChoiceOption",
"question_id": "28a1a86e-5ede-47ae-b6cd-dff720177416",
"option_text": "No",
"order": 2,
"archived": false
}
]
}
],
"number_of_questions": 10
}
Attempting a Lifestyle Assessment
Ethnicity Required
Before attempting a lifestyle assessment for a profile, it is required that the ethnicity of that profile is populated. If not already provided at the time of profile creation, it needs to be submitted as part of a profile update request.
Each lifestyle assessment is tied to a questionnaire. Once you have the questionnaire_id from the lifestyle assessment listing or retrieval endpoint as shown above, you can follow the Attempting Questionnaires guide to attempt or re-attempt the lifestyle assessment for an individual profile.
Fetching Results of Completed Lifestyle Assessments
Questions may be shared among lifestyle assessments. By answering questions on one lifestyle assessment, results of other lifestyle assessments that share the same questions would also be updated, so always query for latest results.
After having completed lifestyle assessments for a profile using the guide linked in the previous section, you can retrieve profile-specific results / outcomes for those lifestyle assessments. The profile's risk relative to the population, of the disorder that the assessment is associated with, is computed based on the profile's answers to the questions in the assessment. The response indicates the range in which the profile's risk score lies.
Listing Completed Profile Lifestyle Assessments
Call the GET /profile-lifestyle-assessment/ listing endpoint to get a list of all lifestyle assessments completed till date for a particular profile. For more information about what each field in the response means, refer to the endpoint schema.
Sample response:
[
{
"id": "17701390-883f-4d3d-80c4-a28df89d7f87",
"profile_id": "91997a8b-f8d8-4a02-b207-25c7258ba6ee",
"lifestyle_assessment_id": "2439d831-d395-43af-aa25-74a9fee32cb0",
"range_label": "Average risk",
"range_color": "Yellow",
"range_text": "You have an average risk",
"gauge_percent": 50.0
}
]
The fields with prefix "range" indicate information about the user's risk score. For simplicity, the risk score is categorised into one of the five categories, aka ranges, given in the below table. Value combinations for range_label, range_color range_text and gauge_percent for each category are listed.
| range_label | range_text | range_color | gauge_percent |
|---|---|---|---|
| Reduced risk | You have a reduced risk | Green | 10 |
| Slightly reduced risk | You have a slightly reduced risk | Light Green | 30 |
| Average risk | You have an average risk | Yellow | 50 |
| Slightly increased risk | You have a slightly increased risk | Orange | 70 |
| Increased risk | You have an increased risk | Red | 90 |
For visualisation, a gauge_percent value of 50.0 could result in a gauge component like this:
Retrieving Composed Profile Lifestyle Assessment
The composed profile lifestyle endpoint assessment endpoint returns everything you need to compose a detail profile lifestyle assessment page that displays all the non-personalised information about the lifestyle assessment itself, along with the profile-specific information which includes information related to the profile's risk, along with their answers to the questions of the assessment, further including how each answer impacts the risk. For more information about what each field in the response means, refer to the endpoint schema.
Sample request:
GET /composed-profile-lifestyle-assessment/profile/91997a8b-f8d8-4a02-b207-25c7258ba6ee/lifestyle-assessment/2439d831-d395-43af-aa25-74a9fee32cb0
Sample response:
{
"id": "17701390-883f-4d3d-80c4-a28df89d7f87",
"profile_id": "91997a8b-f8d8-4a02-b207-25c7258ba6ee",
"lifestyle_assessment_id": "2439d831-d395-43af-aa25-74a9fee32cb0",
"range_label": "Average risk",
"range_color": "Yellow",
"range_text": "You have an average risk",
"gauge_percent": 50.0,
"lifestyle_assessment": {
"id": "2439d831-d395-43af-aa25-74a9fee32cb0",
"questionnaire_id": "a85a1e95-3e7a-44a0-8847-b5c5145b0756",
"area": [
"mental health"
],
"disease_name": "Bipolar Disorder",
"capitalize_disease_name": false,
"duration": 3,
"visible_to_genders": [
"Male",
"Female"
],
"disclaimer": "<p>This assessment is not diagnostic of bipolar disorder</p>",
"about_text": "<p>Anger, sadness, and joy are everyday human experiences. It’s normal to feel a wide range of emotions. <strong>However, some people experience extreme changes in emotions that interfere with their lives. </strong>These are called <strong>mood swings</strong>, and they can be a symptom of a deeper problem.</p>\r\n\r\n<p> </p>\r\n\r\n<p><strong>A common cause of mood swings is bipolar disorder.</strong> This condition causes mood changes that are severe enough to affect daily life. It can also cause shifts in energy, focus, and ability to perform basic tasks [<a href=\"https://www.nimh.nih.gov/health/topics/bipolar-disorder\"><u>R</u></a>, <a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>, <a href=\"https://www.mayoclinic.org/diseases-conditions/cyclothymia/diagnosis-treatment/drc-20371281\"><u>R</u></a>].</p>\r\n\r\n<p> </p>\r\n\r\n<p>People with bipolar disorder have periods of high energy and good mood followed by periods of low energy and poor mood. <strong>These ‘up’ periods are called </strong><strong><em>manic </em></strong><strong>episodes, and the ‘down’ periods are called </strong><strong><em>depressive </em></strong><strong>episodes</strong>. <strong>Some people experience less extreme highs called </strong><strong><em>hypomanic </em></strong><strong>episodes</strong> [<a href=\"https://www.nimh.nih.gov/health/topics/bipolar-disorder\"><u>R</u></a>, <a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>].</p>\r\n\r\n<p> </p>\r\n\r\n<p>Other conditions that can cause mood swings include [<a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558911/\"><u>R</u></a>, <a href=\"https://www.mayoclinic.org/diseases-conditions/premenstrual-syndrome/symptoms-causes/syc-20376780\"><u>R</u></a>, <a href=\"https://www.nimh.nih.gov/health/publications/borderline-personality-disorder\"><u>R</u></a>]:</p>\r\n\r\n<ul>\r\n\t<li>Personality disorders (e.g., borderline personality disorder)</li>\r\n\t<li>Premenstrual syndrome (PMS)</li>\r\n</ul>\r\n\r\n<p>About <strong>2-3%</strong> of people may develop some form of bipolar disorder during their lifetime. Most people develop it as teens or young adults [<a href=\"https://www.ncbi.nlm.nih.gov/books/NBK558998/\"><u>R</u></a>].</p>"
},
"answers": [
{
"question_text": "<p>Do you have a parent or sibling who has ever been diagnosed with bipolar disorder?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Did you ever suffer from physical abuse or physical bullying during your childhood?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Did you ever suffer from emotional neglect during your childhood?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Have you ever been diagnosed with asthma?</p>",
"option_texts": [
"Yes"
],
"response_text": "",
"impact": "increasing",
"is_actionable": false
},
{
"question_text": "<p>Have you ever had a head injury resulting in a skull fracture, broken nose, concussion or loss of consciousness?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Did you ever suffer from sexual abuse during your childhood?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Have you ever been diagnosed with alcohol use disorder?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Did you ever suffer from emotional abuse or emotional bullying during your childhood?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>Do you regularly use drugs such as cannabis, cocaine, amphetamines, or opioids in a way that appreciably harms your health, social relationships, or occupational duties?</p>",
"option_texts": [
"Yes"
],
"response_text": "",
"impact": "increasing",
"is_actionable": true
},
{
"question_text": "<p>Did you ever suffer from physical neglect during your childhood?</p>",
"option_texts": [
"No"
],
"response_text": "",
"impact": "decreasing",
"is_actionable": false
}
]
}
The response above can be used to compose the profile lifestyle assessment detail interface, as shown in the annotated illustrations below:

Profile Lifestyle Assessment Overview Tab

Profile Lifestyle Assessment Tab Showing How Each Answer Impacts Risk
Inferred Answers
For certain lifestyle assessments, under the answers list field in the response of the /composed-profile-lifestyle-assessment/ endpoint, you may receive additional auto-populated answers that you may have never submitted, for questions that were never returned via the /questionnaire-status/ endpoint, like the ones given below:
{
...
"answers": [
{
"question_text": "<p>What is your sex?</p>",
"option_texts": [],
"response_text": "Male",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>What is your age?</p>",
"option_texts": [],
"response_text": "28",
"impact": "decreasing",
"is_actionable": false
},
{
"question_text": "<p>What is your ethnicity?</p>",
"option_texts": [],
"response_text": "South Asian (e.g. Indian, Pakistani, Bangladeshi, Nepali)",
"impact": "no impact",
"is_actionable": false
},
{
"question_text": "<p>What is your current weight?</p>",
"option_texts": [
"My current weight is:"
],
"response_text": "70.0",
"impact": "no impact",
"is_actionable": false
},
{
"question_text": "<p>What is your height?</p>",
"option_texts": [
"My height is:"
],
"response_text": "187.0",
"impact": "no impact",
"is_actionable": false
},
{
"question_text": "<p>Your BMI:</p>",
"option_texts": [],
"response_text": "20.02",
"impact": "decreasing",
"is_actionable": false
},
]
}
These answers are inferred from the information provided at the time of profile creation, or later provided upon updating a profile. They are only returned when they are also impacting the profile's risk, and hence are relevant when displaying the factors impacting risk like shown in the illustration above.
