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

title: "MyOme json report"
description: "MyOme report object"
type: "object"


allOf:
  - $ref: "report-base.json"
  - type: object
    properties:
      report_type:
        type: string
        const: "PGX"
      results:
        $ref: "#/definitions/PGxReportResults"

definitions:
  PGxReportResults:
    description: >-
      PGxreportResults is the editable, versioned component of a MyOme
      PGx report.
    type: object
    additionalProperties: false
    properties:
      clinical_summary:
        type: string
        example: >-
          We examined 14 genes that have current guidelines from the
          Clinical Pharmacogenetics Implementation Consortium
          (CPIC). Only significant findings are reported here. **Never
          change your medication regimen without consulting your
          doctor.**
      genes_analyzed:
        type: array
        items:
          $ref: "../structs.json#/definitions/Gene"
          haplotypes_analyzed:
            type: array
            items: string
            example: ["*2", "*4", "*9"]
      pgx_findings:
        type: array
        items:
          $ref: "../structs.json#/definitions/PGxFinding"
