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

title: "MyOme Family Variant Testing Report"
description: "MyOme Family Variant Testing report object"
type: "object"

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

definitions:
  FamilyVariantClassification:
    type: object
    additionalProperties: false
    required:
      - classification
      - location
      - variation
      - variant_evidence
      - interpretation_description
      - familial_variant_detected
      - zygosity
    properties:
      classification:
        title: ACMG Classification
        $ref: '../../core.json#/definitions/ACMGPlusNegativeClassification'
      variantfinding_id:
        $ref: '../../ids.json#/definitions/VariantFindingId'
      location:
        type: string
      variation:
        type: object
        $ref: '../../structs.json#/definitions/FamilyVariantVariation'
      variant_evidence:
        title: Per Variant Evidence
        type: string
      zygosity:
        title: Zygosity
        $ref: '../../core.json#/definitions/Zygosity'
      interpretation_description:
        title: Interpretation Description
        type: "string"
      gene_info:
        title: Gene Information
        type: [ "string", "null" ]
      familial_variant_detected:
        title: Result
        $ref: '../../core.json#/definitions/FamilialVariantResult'

  FamilyVariantTopline:
    description: "The report's main conclusion for Family Variant Testing"
    title: Topline Finding(s)
    type: array
    minItems: 1
    items:
      allOf:
      - $ref: '../../structs.json#/definitions/ToplineFinding'
      - properties:
          finding:
            $ref: '../../core.json#/definitions/RareDiseaseToplineFinding'

  FVTReportResults:
    description: >-
      Family Variant Testing ReportResults - simplified structure
      for targeted family variant analysis
    type: object
    additionalProperties: false
    required:
      - toplines
      - next_steps
      - classifications
      - disclaimers
    properties:
      classifications:
        type: array
        items:
          $ref: "#/definitions/FamilyVariantClassification"
      disclaimers:
        title: "Disclaimers"
        type: array
        items:
          type: string
        example:
          - "This test was developed, and its performance characteristics were determined, by MyOme, Inc., a clinical laboratory certified under the Clinical Laboratory Improvement Amendments of 1988 (CLIA) and College of American Pathologist (CAP) accredited to perform high complexity clinical laboratory testing. This test has not been cleared or approved by the U.S. Food and Drug Administration (FDA)."
          - "Like most tests, this test carries a risk of false negative or false positive results. Testing is unavailable for samples damaged by human error, lost/destroyed due to weather, transit issues or other problems beyond the control of MyOme. Test results should always be interpreted by a clinician in the context of clinical and familial data with the availability of genetic counseling when appropriate."
      next_steps:
        title: "Next Steps"
        type: array
        items:
          type: string
        example:
          - "These results should be interpreted in the context of this individual's clinical findings, family history, and other laboratory data."
          - "Genetic counseling is recommended to discuss what these results mean for you and your family."
      toplines:
        $ref: "#/definitions/FamilyVariantTopline"
      methods:
        title: "Testing Methods"
        type: array
        items:
          type: string
        description: "Methods used for family variant testing (e.g., Sanger sequencing, aCGH, etc.)"
      limitations:
        title: "Test Limitations"
        type: array
        items:
          type: string
        description: "Technical limitations specific to the testing methods used"
      family_context:
        title: Family Testing Context
        type: [ "string", "null" ]
        description: "Context about the family variant being tested"
