
$schema: https://json-schema.org/draft/2020-12/schema
type: object
title: MyOme json report for PRS
description: MyOme report object for PRS

allOf:
- $ref: base.json
- properties:
    report_type:
      type: string
      const: PRS
    results:
      $ref: "#/definitions/PRSReportResults"

definitions:
  PRSReportResults:
    description: Extends the properties in PRS Interps by adding toplines, general findings and next steps.
    type: object
    allOf:

    - type: object
      $ref: "../interps/PRS.json#/definitions/Interpretation"

    - properties:
        prs_type:
          const: BREAST_CANCER
          type: "string"
        toplines:
          $ref: "#/definitions/PRSTopline"
        general:
          $ref: "../interps/PRS.json#/definitions/PRSResult"
        next_steps:
          $ref: "../../structs.json#/definitions/ReportNextSteps"
      required:
        - prs_type
        - general
        - integrated
        - clinical
        - toplines
        - next_steps

  PRSTopline:
    description: Uses topline finding definition from structs.json and reinforces that finding must be PRSToplineFinding since the finding property in ToplineFinding includes PRS and Monogenic enums.
    type: array
    minItems: 1
    maxItems: 1
    items:
      allOf:
      - $ref: "../../structs.json#/definitions/ToplineFinding"
      - properties:
          finding:
            $ref: "../../core.json#/definitions/PRSToplineFinding"
    example:
      - finding: ELEVATED_RISK
        text: Your lifetime risk of developing breast cancer is elevated (greater than or equal to 20%) based on your integrated score.

