Retrieving Profile Report Statuses and Outcomes

Talking about the previous two sections, Generating Health Reports discusses how to request report generation by creating report jobs, and Composing Health Reports discusses how to compose a detailed view of a particular report after successful generation. However, after having requested generation for multiple reports, you might want to query the status or outcome of all your reports at a high level via a single endpoint, instead of having to query each report job separately. This section helps you do exactly that.

Profile Report Statuses

To get a bird's eye view of the generation status of all reports against a particular profile, use the /profile-report-status/ endpoint. The response would include statuses of all reports that are returned from the /report-summary/ endpoint. For details regarding the query params and response fields, please refer to the endpoint.

These statuses include a failure_type field. It will be an empty string for non-failed reports. In case of failures, there are two possible messages:

  • "The genome file lacks the necessary variants to generate this report."

The report relies on certain variants that are not present or imputable from your client's file. Regenerating the report will not help.

  • "Report generation failed. Please retry or reach out to support."

In these cases, there may be something wrong with our system or it might be a temporary issue. Please first try regenerating. If it fails again, you can reach out to our customer support. Note, however, that summary reports depend on their sub reports' success. It is possible that one of your summary report's sub reports have failed due to lack of variants, in which case there is nothing we can do.

Example Request

GET https://selfdecode.com/service/b2b-integrations/profile-report-status/?profile_id=91997a8b-f8d8-4a02-b207-25c7258ba6ee

Example Response

[
    {
        "report_id": "001b9f8d-bd45-4404-b31b-37e2a2b66dd5",
        "report_name": "Canker Sores",
        "report_type": "standard",
        "listing_type": "medicinal",
        "status": "completed",
        "failure_type": ""
    },
    {
        "report_id": "007a6b1c-1d3b-48f5-9a8f-6bb6c646a735",
        "report_name": "Stretch Marks",
        "report_type": "standard",
        "listing_type": "medicinal",
        "status": "failed",
        "failure_type": "The genome file lacks the necessary variants to generate this report."
    },
    {
        "report_id": "001a6b1c-1d3b-48f5-9a8f-6bb6c646a735",
        "report_name": "Anxiety",
        "report_type": "standard",
        "listing_type": "medicinal",
        "status": "failed",
        "failure_type": "Report generation failed. Please retry or reach out to support."
    }
    ...
]

Profile Report Outcomes

An outcome is the final result of a generated report for a profile. To know more about report outcomes, you can go through this guide on composing health reports.

To list outcome information for all reports of report type standard, trait and gene, that you have requested for generation to date, use the /profile-report-outcome/ endpoint. This endpoint does not return outcomes of non-genetic, aggregate and combined report types. For more information on getting results for these report types, refer here.

For details regarding the query params and response fields, please refer to the endpoint.

Example Request

https://selfdecode.com/service/b2b-integrations/profile-report-outcome/?profile_id=91997a8b-f8d8-4a02-b207-25c7258ba6ee

Example Response

[
    {
        "report_id": "147bd003-9ca9-4170-8f3e-9e9a18c6589f",
        "label_text": "Typical likelihood",
        "trait_score_text": "Typical likelihood of venous thromboembolism",
        "outcome_color": "yellow",
        "percentage_or_percentile": 0.441,
        "statistic_type": "percentile"
    },
    {
        "report_id": "861ee2a3-0462-489d-8806-211e0b5990a5",
        "label_text": "Lower Activity",
        "trait_score_text": "Likely lower CYP1A2 activity",
        "outcome_color": "orange",
        "percentage_or_percentile": 0.59,
        "statistic_type": "percentage"
    },
    ...
]

Fields Representing Discrete Outcome

trait_score_text and outcome_color for each report represents a discrete and categorical result for the report, giving you a broad idea of your predisposition for a particular trait. Some common outcome colors for profile report and what they indicate are tabled below:

ColorMeaning
redSignificantly out of optimal
orangeOut of optimal
yellow / cyanNormal
greenOptimal

To know more about how these fields can represent the final result of your report, refer to the field annotations at the top right of the illustration given here.

Fields Representing Numeric Outcome

percentage_or_percentile combined with statistic_type field represents the numeric result for the report.

To know more about how these fields represent the final result of your report, refer here, and for an illustration of the same, refer here.

Troubleshooting For Null Outcomes

In case any of the outcomes in the response have fields trait_score_text and outcome_color set as null, it could be because of the report generation status. If a report has failed generation, is currently in process of generation, or is out of date and requires regeneration, null outcomes are expected. To confirm the status of those reports, you can query the /profile-report-status/?report_id= endpoint, passing in report IDs of concern as a query param.

Outcomes of Non-genetic and Summary Reports

The /profile-report-outcome/ endpoint does not return results of non-genetic or summary reports.

Non-genetic Reports

Non-genetic reports are not supposed to have any personalised outcome. To get details for such reports, you'd have to rely on the /composed-profile-report/ endpoint.

Summary Reports

Aggregate reports also don't have an outcome of their own, because they are just an aggregate of other related sub-reports.

Combined reports do have an outcome, but the /profile-report-outcome/ endpoint does not return combined reports, because to determine their result, you need more fields than are available in this endpoint.

Refer here on more information on how to get results for summary reports.