$schema: https://json-schema.org/draft/2020-12/schema

title: Baseline Risk Findings Format
type: object

description: >
  The Baseline Risk interpretation format stores relative risk for a disease.

properties:
  _version:
    $ref: ../../core.json#/definitions/Version
  relative_risk_inputs:
    items:
      $ref: '#/definitions/RelativeRiskInputs'
    maxItems: 1
    minItems: 1
    type: array
  findings:
    items:
      $ref: '#/definitions/Interpretation'
    maxItems: 1
    minItems: 1
    type: array

required:
  - findings
  - relative_risk_inputs

definitions:
  RelativeRiskInputs:
    properties:
      sample:
        $ref: ../../ids.json#/definitions/SampleId

  Interpretation:
    properties:
      prs_type:
        $ref: ../../core.json#/definitions/PRSType
      relative_risk:
        items:
          $ref: '#/definitions/BaselineRelativeRiskResult'
        maxItems: 1
        minItems: 1
        type: array
    required:
      - prs_type
      - relative_risk

  BaselineRelativeRiskResult:
    properties:
      score:
        example: 2.1
        type: number
        description: Relative risk multiplier.
        minimum: 0
        maximum: 1000
    required:
      - score
    type: object
