Building Report Detail Page
After you have successfully generated a health report following instructions mentioned in the previous section, you may want to compose the generated health report and its results, to be able to display all the consolidated information surrounding the report on a web page.
The /composed-profile-report/ endpoint returns all information required to display health reports.
/composed-profile-report/ vs. /composed-report/
This page discussed the
/composed-profile-report/endpoint that returns consolidated information of a generated health report specific to a profile.If you're interested in a composing an ungenerated report to show generic information only, use the
/composed-report/{id}/endpoint. It is an extension of theGET /report/{id}/endpoint, containing extra information about entities related to the report. The information returned from/composed-report/is a subset of the information returned from/composed-profile-report/. Therefore, the explanation in this page should be enough to understand the/composed-report/endpoint response.
High Level Breakdown of Entities Returned in Response
- Report - generic info/text for given report
- Profile Trait - report outcome personalized to each profile
- Trait - generic info/text for given trait (non-personalized)
- Profile Report Recommendations - personalized recommendations
- Report Recommendation - generic info/text for given trait
- Satisfied Conditions - info for report rec conditions that given profile satisfies
- Associated genes
- rsID to gene name or None, i.e.
{[rsid]: [gene_name] | None}
- rsID to gene name or None, i.e.
Profile Trait
Each profile report is associated with a particular outcome for that report. This outcome is encapsulated in the profile-trait response.
Here is an example profile-trait response (text has been abbreviated):
{
// meta data
"id": "7048f855-e266-4f86-bf8c-2954c4e3af14",
"profile_id": "adfbc357-d2d2-462c-a417-22474fddd646",
// outcome fields
"outcome_id": "378711fb-1aa3-4498-a5c6-e60d49b57f3c",
// personalized
"trait_score_text": "Likely higher lactate levels",
"personalized_text": null,
"personalized_recommendation_text": null,
"number_of_snp": 353451,
"genetic_variants": [
{
"rsid": "rs11591147",
"bad_snp": true,
"genotype": "GG",
"effect_allele": "G"
},
],
// trait info (non-personalized)
"trait": {
// meta data
"id": "67d64155-1944-4bf3-b7df-b0fbeed27984",
"slug": "39e3b79e-4177-4b88-acbb-abea3f506d18",
"report_id": "2735f15d-3124-4d9c-8ff1-9262b44292f6",
// text fields
"name": "Lactate",
"summary": "",
"text": "...",
"text_header": "Genetics of Lactate Levels",
// gauge fields
"gauge_labels": [
{
"id": "195a3071-25b4-41da-9d8d-96f10c2cf07b",
"label_text": "Higher Levels",
"label_sub_text": "", // irrelevant for regular reports
"label_color": "red",
"ratio": null, // irrelevant for regular reports
"display_order": 2,
"outcome_id": "375a3071-25b4-41da-9d8d-96f10c2cf07b",
},
{
"id": "ae3abb67-165b-48d0-a957-801f58ce8d32",
"label_text": "Typical Levels",
"label_sub_text": "", // irrelevant for regular reports
"label_color": "yellow",
"ratio": null, // irrelevant for regular reports
"display_order": 1,
"outcome_id": "378711fb-1aa3-4498-a5c6-e60d49b57f3c",
}
],
"statistic_type": "percentile"
},
}
Report Outcomes
All reports capture the report outcome in this outcome_id field under profile_trait. Use this to determine the matching gauge label (refer to next section below).
The exception to this rule are aggregate reports (e.g. Fatigue). These are simple aggregates of many sub reports and have no outcome of their own; instead their sub-reports have outcomes.
Trait
The trait entity under the profile_trait represents the non-personalized information about the health report, and it's possible outcomes. It can be considered as an extension to the report field which has basic metadata about the health report.
Gauge Labels
Gauge labels are, simply put, the divisions for each possible outcome of a trait. Let's say, for a particular trait, you can have three outcomes - Higher Levels, Lower Levels and Typical Levels. That trait would have 3 gauge labels, each corresponding to one outcome, containing information about the matching label text and colour.
Icons to Represent Result of Report
From the outcome_id under the profile_trait, by matching it with the outcome_id under gauge_labels, you can get the matching gauge label, and using the gauge label, you can generate icons like shown below. The outcome_id in profile_trait would always match to one gauge_label, with the exception of aggregate reports that have no outcome - they are discussed below.
Note: These icons are not returned via the API, but generated via CSS
Report Score
If you're interested in more than just the discrete outcome of the report, and want to display a numeric score for the report, you would be using two fields:
profile_trait.percentage_or_percentileprofile_trait.trait.statistic_type
If the percentage_or_percentile field is null, that means the report has no numeric score.
If the statistic_type field is "percentile", it means the value returned in percentage_or_percentile is to be perceived as a percentile, and if the statistic_type field is "percentage", it means the value returned in percentage_or_percentile is to be perceived as a percentage.
Percentile vs Percentage
The snapshot below, on the left corresponds to statistic_type = "percentile" and percentage_or_percentile = 0.99. The snapshot on the right, corresponds to statistic_type = "percentage" and percentage_or_percentile = 0.44.
Profile Report Recommendations
The profile_report_recommendations contains a pre-sorted list of recommendations from most to least useful (descending impact).
The payload contains a satisfied_conditions field which returns an array of matched report recommendation conditions. Each report recommendation condition contains some conditionial_text which gives additional advice or context for the specific user.
Example Payload (text has been abbreviated):
[
{
// meta data
"id": "a8c7b7c7-aead-41d6-afc4-004fd3b3cf71",
// personalized outcome
"impact": 0.4, // impact of the recommendation
"evidence": 0.6, // evidence for the recommendation
"satisfied_conditions": [{
"priority": 1, // display order
"conditional_text": "...",
"rsid": "rs123",
"snp_trigger_evidence": 0.5
}],
"report_recommendation": {
// meta data
"id": "9d71c416-b416-4494-b041-5eac7e65470d",
"recommendation_id": "exercise",
"report_id": "0dad0d4c-ba5d-4409-a8e8-f7832540b84b",
"connection": "positive", // whether or not helps with report
"recommendation_type": "lifestyle",
// related marker
// e.g. vitamin D recommendation
// might point to marker for vitamin D
"related_marker_id": null,
// text or UI
"name": "Maintain a Healthy Weight",
"description": "...",
"how_to_take": "...",
"how_it_helps": "...",
"illustration": "https://selfdecode.com/cdn/media/reports/Maintain_a_Healthy_Weight.svg",
"side_effects": [
{
"id": "9a0a491a-e98c-4492-9b71-733b35547f20",
"name": "...",
"description": "...",
"prevalence": "common" / "uncommon"
}
],
// other fields
"is_avoidance_recommendation": false,
"is_treatment": false,
"is_prevention": false,
"default_frequency_value": null,
"default_frequency_unit": null,
"default_duration_value": null,
"default_duration_unit": null,
}
}
]
Report Detail Page Illustration (for Simple Reports)
To get an idea of how the fields returned from the composed-profile-report endpoint can be used to present a detailed result of a particular report on a web page, please refer to the illustration below, which pinpoints how certain fields correspond to certain UI elements and text
Summary Reports
There are two types of summary reports: aggregate and combined. It is determined by the report_type field under the report payload.
Aggregate reports collect all the results and recommendations from reports on a single topic, e.g. sleep. They provide a single, comprehensive point of access for diving into a particular health topic.
Combined reports are an extension of aggregate reports. In addition to categorising all information on a topic into sections, they provide further outcome advice depending on the specific combination of sub report results. Currently, there are only two combined reports: Diet and Nutrition and Fitness.
When dealing with summary reports, there are two extra fields of concern, namely sorted_recommendation_ids and child_reports, which are discussed later in the section.
Summary Report Generation
Summary reports are generated using the same flow as standard reports. The generation pipeline will guarantee that all sub reports are generated before marking the parent summary report as completed. In the case of combined reports, the matched case will also be assigned.
Note - generating a summary report will generate all sub reports associated with that summary report.
Aggregate Reports
Aggregate and Combined reports are composed of report sections. Each report section in turn points to a number of sub reports. This information is located in the report_sections field of a report payload
Example Payload:
{
//...
"report_sections": [
{
// meta fields
"id": "6f929bc8-142d-4661-8085-9a7db20cd8a3",
"slug": "sleep-disturbances",
"report_id": "58f018e0-32e5-4c91-ba2a-ac161205094d",
//text fields
"title": "Sleep Disturbances",
"text": "...",
// ui fields
"tooltip": "Sleep Disturbances",
"color": "#2b7eef",
"order": 4,
"illustration": "...",
"icon": "...",
"sub_reports": [
{
"parent_report_id": "58f018e0-32e5-4c91-ba2a-ac161205094d",
"child_report_id": "9abba2aa-8357-47a9-a926-4139b5903d74", // refer to child_reports field discussed below
"intro": "...",
"summary": "...",
}
],
// hyper links associated with a report section that can be displayed as tags at the bottom of the section
"section_links": [
"id": "ae67f1dc-9c9f-4b72-8ff8-ff0c58959a90",
"text": "...",
"url": "..."
]
}
]
}
Summary reports also contain a field child_reports, which is basically a nested representation of the individual child reports whose IDs are in the sub_reports. The field in the child_report object mirrors and are a subset of the fields returned from the composed-profile-report endpoint upon querying a regular (non-summary) report.
Example Payload:
"child_reports": [
{
"id": "44fc2c1b-ae07-4c0e-af54-fda3e40907ea",
"report_id": "9abba2aa-8357-47a9-a926-4139b5903d74",
"report": {
"id": "9abba2aa-8357-47a9-a926-4139b5903d74",
"name": "Sleep Movement",
"report_type": "trait",
"area": [
"sleep"
],
"text": "...",
"text_header": "About Sleep Movements",
"summary": "...",
"illustration": "https://dev.selfdecode.com/cdn/media/health-analysis/Sleep_Movement.png"
},
"profile_trait": {
"id": "b0b94d73-0889-4265-86a3-c72922ac42e1",
"trait": {
"id": "b2984604-d5fc-410a-adb3-2f035a6c6f57",
"slug": "3a45893d-771d-4ab4-bc1f-71a793495811",
"model_type": "additive",
"name": "Sleep Movement",
"summary": "",
"text": "<p><span style=\"color:#000000\">Shifting around when you sleep? Partner letting you know even if you aren't aware? Sleep movements are common, particularly with age, and they can affect sleep quality. They don't usually disturb the mover's sleep. However, when they do disrupt sleep, they can make a person sleepy during the day [</span><a href=\"https://sleepeducation.org/sleep-disorders/periodic-limb-movements/\"><span style=\"color:#1155cc\"><u>R</u></span></a>, <a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2542977/\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">Some genetic variants may be linked to increased sleep movement. </span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">People with the following variants in the </span><a href=\"https://selfdecode.com/app/gene/MEIS1/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><em><u>MEIS1</u></em></span></a><span style=\"color:#000000\"> gene tend to move more in their sleep [</span><a href=\"https://www.ncbi.nlm.nih.gov/labs/pmc/articles/PMC4621485/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/labs/pmc/articles/PMC5397858/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://pubmed.ncbi.nlm.nih.gov/26703954/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4153066/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">]:</span></p>\r\n\r\n<ul>\r\n\t<li style=\"list-style-type:disc\"><a href=\"https://selfdecode.com/app/snp/rs2300478/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>rs2300478</u></span></a><span style=\"color:#000000\">-G</span></li>\r\n\t<li style=\"list-style-type:disc\"><a href=\"https://selfdecode.com/app/snp/rs113851554\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>rs113851554</u></span></a><span style=\"color:#000000\">-T</span></li>\r\n</ul>\r\n\r\n<p><span style=\"color:#000000\">This gene may influence iron metabolism in the brain [</span><a href=\"https://www.frontiersin.org/articles/10.3389/fneur.2019.00935/full\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">In addition, people with one variant in the </span><a href=\"https://selfdecode.com/app/gene/BTBD9/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><em><u>BTBD9</u></em></span></a><span style=\"color:#000000\"> gene (</span><a href=\"https://selfdecode.com/app/snp/rs3923809\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>rs3923809</u></span></a><span style=\"color:#000000\">-A, also linked to the </span><em><a href=\"https://selfdecode.com/app/gene/GLO1\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>GLO1</u></span></a></em> gene<span style=\"color:#000000\">) tend to move more while sleeping. In fact, people with two copies of this variant may have two times more sleep movements than people without any copies [</span><a href=\"https://pubmed.ncbi.nlm.nih.gov/17634447/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4621485/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4153066/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://pubmed.ncbi.nlm.nih.gov/26703954/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p> </p>\r\n\r\n<p><span style=\"color:#000000\">This gene may influence dopamine and iron metabolism [</span><a href=\"https://www.nejm.org/doi/full/10.1056/NEJMoa072743\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://pubmed.ncbi.nlm.nih.gov/28236139/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p><br />\r\n<span style=\"color:#000000\">Finally, one gene variant near the </span><a href=\"https://selfdecode.com/app/gene/TOX3\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><em><u>TOX3</u></em></span></a><span style=\"color:#000000\"> gene, </span><a href=\"https://selfdecode.com/app/snp/rs3104788\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>rs3104788</u></span></a><span style=\"color:#000000\">-T, is linked to sleep movement [</span><a href=\"https://pubmed.ncbi.nlm.nih.gov/26703954/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">, </span><a href=\"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4153066/\" style=\"text-decoration:none\"><span style=\"color:#1155cc\"><u>R</u></span></a><span style=\"color:#000000\">].</span></p>\r\n\r\n<p> </p>",
"text_header": "Genetics of Sleep Movement",
"gauge_labels": [
{
"id": "57521a9e-0bbd-48d1-b75d-420b54650703",
"label_text": "Less Likely",
"label_sub_text": "",
"label_color": "green",
"ratio": null,
"display_order": 1,
"outcome_id": "db545624-6a29-45c3-9db3-b0d675726510",
},
{
"id": "d0de68e4-36e7-4c68-9534-5b26373d2ae4",
"label_text": "Typical likelihood",
"label_sub_text": "",
"label_color": "yellow",
"ratio": null,
"display_order": 2,
"outcome_id": "02032269-debc-4397-b3a3-43aec9c56b28",
},
{
"id": "e246646c-c93a-4fac-9b49-0131dc41fc0b",
"label_text": "More Likely",
"label_sub_text": "",
"label_color": "orange",
"ratio": null,
"display_order": 3,
"outcome_id": "fff4a327-13c7-42c3-9364-0b2a19b2fcec",
}
],
"statistic_type": "percentile"
},
"score": 0.9461722488038278, // deprecated field; do not use - use outcome and gauge labels to determine result of report
"outcome_id": "fff4a327-13c7-42c3-9364-0b2a19b2fcec",
"trait_score_text": "More likely to move during sleep",
"personalized_text": "<p><span style=\"color:#000000\">According to the genetic variants we looked at, you are more likely to move a lot while you are asleep. However, other genetic, environmental and lifestyle factors may also play a role. If you are having trouble sleeping, talk to your doctor about causes and possible solutions.</span></p>",
"personalized_recommendation_text": "",
"number_of_snp": 4,
"genetic_variants": [
{
"rsid": "rs2300478",
"bad_snp": true,
"genotype": "TG",
"effect_allele": "G"
},
]
}
},
...
]
The profile_report_recommendations are not returned for each individual child report separately, rather all the recommendations of all child reports are aggregated and returned in the profile_report_recommendations field of the parent report. Refer to the next section for more details surrounding child report recommendations.
Note: Aggregate Reports have no associated outcome of their own and their profile_trait.outcome_id will be null.
Aggregate Recommendations
Summary reports have no recommendations of their own. Instead they aggregate the recommendations of their sub reports. So everything remains the same with respect to the profile_report_recommendations field for summary reports as discussed here for regular reports, except for the following differences:
- Unlike in the case of regular reports, the
profile_report_recommendationsare not sorted in a meaningful way, because here, we don't have each recommendation corresponding to a single report, rather each recommendation tied to multiple sub-reports.
As you can see in the example payload below, against the "Aerobic Exercise (Cardio)" recommendation, there are twoprofile_report_recommendationobjects, for two different reports. The first one links to a different sub-report, while the second ones links to a different sub-report of the summary report (observe difference in thereport_idfield value).... { "id": "3a63aba2-5886-55a2-8e22-03bdfdac0623", "report_recommendation": { "name": "Aerobic Exercise (Cardio)", "description": "...", "how_to_take": "...", "recommendation_type": "lifestyle", "default_frequency_value": 3, "default_frequency_unit": "week", "default_duration_value": 8, "default_duration_unit": "week", "id": "9c1b2c2a-06d3-4108-ae71-8017e51f05da", "recommendation_id": "cardio", "connection": "positive", "illustration": "", "related_marker_id": null, "how_it_helps": "...", "side_effects": [], "is_avoidance_recommendation": false, "is_treatment_recommendation": false, "is_prevention_recommendation": false, "report_id": "cffbcef3-1630-4052-96e1-cf139c717405" }, "impact": 0.8, "evidence": 0.8, "satisfied_conditions": [] }, { "id": "7f026dcf-7c7e-59cc-a18d-26c5164d74ab", "profile_report_id": "8f2b39e3-f1ba-4d74-9803-6e3f47b6e1f8", "report_recommendation": { "name": "Aerobic Exercise (Cardio)", "description": "...", "how_to_take": "...", "recommendation_type": "lifestyle", "default_frequency_value": 3, "default_frequency_unit": "week", "default_duration_value": 8, "default_duration_unit": "week", "id": "00818248-ed5e-4931-81ea-b0cf2003f617", "recommendation_id": "cardio", "connection": "positive", "illustration": "", "related_marker_id": null, "how_it_helps": "...", "side_effects": [], "is_avoidance_recommendation": false, "is_treatment_recommendation": false, "is_prevention_recommendation": false, "report_id": "0dff6e7f-9165-4209-8a48-d86ebedae57c" }, "impact": 0.8, "evidence": 0.6, "satisfied_conditions": [] }, ... - This means, you cannot just use the
profile_report_recommendationsto display a list of recommendations, like you would do for a regular report. Here, along with the details in theprofile_report_recommendationsfield, you would need a mapping, of sorted recommendation IDs, against thereport_ids. For that purpose, we return an additional field in case of summary reports, i.e. thesorted_recommendation_idsfield, which is a list of up to fifty sorted recommendation IDs. Example payload is given below:
"sorted_recommendation_ids": [
{
"recommendation_id": "cardio",
"sorted_report_ids": [
"b9dc7199-1f56-4344-b9b3-8c978bcff206",
"557a683d-bd9a-4840-a652-084651677a28",
"9abba2aa-8357-47a9-a926-4139b5903d74",
"2ad4579c-ec03-43c0-b783-82be89955939",
"a0d9bac0-3e57-42ac-9081-a6f1eef09768",
"39bd8e00-5c1b-4280-9618-81baa829a740",
"cffbcef3-1630-4052-96e1-cf139c717405",
"0dff6e7f-9165-4209-8a48-d86ebedae57c",
"113f4962-c77d-41e8-8d4b-64a97c1d056e"
]
},
{
"recommendation_id": "airflow-devices",
"sorted_report_ids": [
"557a683d-bd9a-4840-a652-084651677a28",
"d226f824-6075-42d0-94ed-94d4be679e36"
]
},
...
}
With the information from the three fields discussed above, i.e. profile_report_recommendations, sorted_recommendation_ids and child_reports, you can display recommendations for aggregated reports in the manner given below. Impact and evidence information is obtained from profile_report_recommendations, the sorted recommendations and the nested, sorted sub-reports that the recommendations address are obtained from sorted_recommendation_ids field, while the outcome information for each sub-report (whether there is a high / typical / low risk) can be obtained from child_reports.
You can see how the recommendations structure here differ from regular reports.
For a more detailed illustration, annotated with labels, of summary report recommendations, refer here, and scroll down to the Summary Report Recommendations figure.
Combined Reports
Combined Reports are almost identical to aggregate reports. They are organised into report sections that point to relevant sub reports. However, combined reports also have an outcome associated with the combination of certain sub report results (typically those included in the first report section). This outcome can be displayed through a pie chart.
Currently, there are only two combined reports in the platform - "Diet & Nutrition" and "Fitness" reports. These reports have an extra prerequisite for better results, the details of which are mentioned here.
Combined Report Outcomes
Unlike aggregated reports, a combined report will have a populated outcome_id and may have an additional_info field associated with its profile_trait.
Example:
{
"outcome_id": "31185ea0-50aa-4cc7-b2cb-4c5228715e78"
"additional_info": { // example from fitness report
"results": ["basketball", "cycling", "surfing", "rugby", "wrestling"]
}
}
Pie Chart
Pie Chart gauges are only used with combined reports.
Example pie chart gauge labels for a particular outcome of the Diet & Nutrition combined report:
...,
{
"id": "ac093440-ad37-454e-a56b-482f0442ac38",
"label_text": "Fat",
"label_sub_text": "30%",
"label_color": "pie light green",
"ratio": 30,
"display_order": 1,
"outcome_id": "7f4e8b7f-d71e-4b83-ae6b-5f31073b1c97",
},
{
"id": "b212253f-c427-44b6-a323-489dd0e7411a",
"label_text": "Protein",
"label_sub_text": "25%",
"label_color": "pie green",
"ratio": 25,
"display_order": 2,
"outcome_id": "7f4e8b7f-d71e-4b83-ae6b-5f31073b1c97",
},
{
"id": "b94ece64-10a8-431f-bea3-e6c4c777de8d",
"label_text": "Carb",
"label_sub_text": "45%",
"label_color": "pie dark green",
"ratio": 45,
"display_order": 3,
"outcome_id": "7f4e8b7f-d71e-4b83-ae6b-5f31073b1c97",
"sub_outcome_id": "043ef3e9-7d2e-4419-9545-cb5aa7727ec1"
},
...
Gauge labels should be filtered by the outcome_id. This should give you the same number of labels as expected slices in the pie chart. The ratio field is then used to distribute the pie among the slices (notice that the ratios of the above three gauge labels add up to 100). The gauge labels given above can be used to construct the pie chart given below.
Report Detail Page Illustration (for Summary Reports)
To get an idea of how the fields returned from the composed-profile-report endpoint can be used to present a detailed result of a particular summary report on a web page, please refer to the illustrations below, which pinpoint how certain fields correspond to certain UI elements and text

Summary report overview

Summary report details

Summary report recommendations
