{
   "$schema": "https://json-schema.org/draft/2020-12/schema",
   "title": "Basic structures",
   "description": "Non-identifiable structures",
   "type": "object",
   "definitions": {
      "AlignmentMetrics": {
         "description": "Used by alignment dataset to store AlignmentMetrics\n",
         "type": "object",
         "properties": {
            "sequencing_type": {
               "$ref": "core.json#/definitions/SequencingType"
            },
            "vendor": {
               "$ref": "core.json#/definitions/Vendor"
            },
            "mean_depth": {
               "type": "number"
            },
            "median_insert_size": {
               "type": "number"
            }
         }
      },
      "Billing": {
         "title": "Billing Information",
         "description": "Options are currently self-pay, insurance, and institutional billing.",
         "type": "array",
         "maxItems": 1,
         "items": {
            "oneOf": [
               {
                  "$ref": "#/definitions/BillingSelf"
               },
               {
                  "$ref": "#/definitions/BillingInsurance"
               },
               {
                  "$ref": "#/definitions/BillingInstitutional"
               }
            ]
         }
      },
      "BillingInsurance": {
         "title": "Insurance Billing (Commercial, Medicaid, Medicare)",
         "additionalProperties": false,
         "type": "object",
         "properties": {
            "billing_type": {
               "type": "string",
               "title": "Billing Type",
               "default": "INSURANCE",
               "enum": [
                  "INSURANCE"
               ]
            },
            "insurance": {
               "type": "array",
               "minItems": 1,
               "maxItems": 2,
               "items": {
                  "$ref": "#/definitions/Insurance"
               }
            }
         },
         "required": [
            "billing_type",
            "insurance"
         ]
      },
      "BillingSelf": {
         "title": "Patient Pay",
         "additionalProperties": false,
         "type": "object",
         "properties": {
            "billing_type": {
               "type": "string",
               "title": "Billing Type",
               "default": "SELF",
               "enum": [
                  "SELF"
               ]
            },
            "stripe_paymentintent_id": {
               "type": "string"
            },
            "promo_code": {
               "type": "string"
            }
         },
         "required": [
            "billing_type"
         ]
      },
      "BillingInstitutional": {
         "title": "Institutional Billing",
         "additionalProperties": false,
         "type": "object",
         "properties": {
            "billing_type": {
               "type": "string",
               "title": "Billing Type",
               "default": "INSTITUTIONAL",
               "enum": [
                  "INSTITUTIONAL"
               ]
            },
            "billing_code": {
               "type": "string",
               "maxLength": 64,
               "title": "Billing Code",
               "description": "Institutional code for billing"
            }
         },
         "required": [
            "billing_type"
         ]
      },
      "File": {
         "type": "object",
         "required": [
            "uri",
            "mimetype"
         ],
         "properties": {
            "uri": {
               "type": "string"
            },
            "mimetype": {
               "type": "string"
            },
            "description": {
               "type": "string"
            },
            "sha512": {
               "type": "string",
               "pattern": "^[0-9a-fA-F]{128}$"
            },
            "crc64nvme": {
               "type": "string",
               "pattern": "^[A-Za-z0-9+/_-]{11}=$"
            },
            "sha256": {
               "type": "string",
               "pattern": "^[0-9a-fA-F]{64}$"
            }
         },
         "examples": [
            {
               "uri": "s3://somebucket/path/to/report.json",
               "description": "Report in JSON format",
               "mimetype": "application/json",
               "sha512": "1b3c34b32bba4ece72a7b9a1ee53359fe7238be5986984463b5da41baf3b53bce66c87d7f5557021c553a1bbeac175eac2b4923329b993fba11a93502c256912"
            },
            {
               "uri": "s3://somebucket/path/to/report.pdf",
               "description": "Report in PDF format",
               "mimetype": "application/pdf",
               "sha512": "cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e"
            },
            {
               "uri": "s3://somebucket/path/to/SM123.R1.fastq.gz",
               "description": "R1 FastQ file",
               "mimetype": "application/x.seq-na-fastq;type=paired_end;direction=R1",
               "sha512": "3ef109fe55e194a0f37b5936405dcf2b96ce7eeb8891d59650c708d26f256d018fd8f98c6efb7da8f85029a3708e34f86a54e700ba3b36fb0967aa869ed37915"
            }
         ]
      },
      "Gene": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "ncbi_gene_id": {
               "title": "NCBI Gene ID",
               "type": "string"
            },
            "primary_symbol": {
               "title": "Primary Symbol",
               "type": "string"
            },
            "alternate_symbols": {
               "title": "Alternate Symbols",
               "type": "array",
               "items": {
                  "type": "string"
               },
               "uniqueItems": true
            },
            "references": {
               "title": "Gene References",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/Reference"
               }
            }
         },
         "examples": [
            {
               "ncbi_gene_id": 672,
               "primary_symbol": "BRCA1",
               "alternate_symbols": [
                  "BRCAI",
                  "BRCC1",
                  "FANCS",
                  "IRIS",
                  "PNCA4",
                  "PSCP"
               ],
               "references": [
                  {
                     "type": "pubmed",
                     "value": "123456"
                  }
               ]
            }
         ]
      },
      "Genotype": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "gene_symbol": {
               "type": "string",
               "examples": [
                  "CYP2B6",
                  "CYP2C19",
                  "CYP2D6"
               ]
            },
            "haplotypes": {
               "type": "string",
               "examples": [
                  "*3/*4",
                  "*5/*17",
                  "*1/*8"
               ]
            }
         }
      },
      "PGxDrugGuidance": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "drug": {
               "type": "string",
               "examples": [
                  "amphetamine",
                  "codeine"
               ]
            },
            "genes": {
               "description": "list of dictionaries with gene and phenotype corresponding to a drug impact",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/PGxFinding"
               }
            },
            "therapeutic_area": {
               "type": "string",
               "description": "future plans for drug categories to reference an enum (SC-7141)",
               "examples": [
                  "BEHAVIORAL_HEALTH",
                  "PAIN_MANAGEMENT",
                  "CARDIOLOGY"
               ]
            },
            "toplines": {
               "description": "future plans for finding in toplines to reference an enum (SC-7141)",
               "type": "object",
               "allOf": [
                  {
                     "$ref": "#/definitions/ToplineFinding"
                  },
                  {
                     "properties": {
                        "finding": {
                           "$ref": "core.json#/definitions/PGxImpactToplineFinding"
                        }
                     }
                  }
               ],
               "examples": [
                  {
                     "finding": "CONTRAINDICATED",
                     "text": "Avoid codeine use because of potential for serous toxicity. If opioid use is warranted, consider a non-tramadol opioid."
                  }
               ]
            }
         }
      },
      "PGxFinding": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "raw_call": {
               "type": "string",
               "example": "*4/*6"
            },
            "rsid_based": {
               "type": "boolean",
               "example": false
            },
            "activity_score": {
               "type": "number",
               "example": 1.0
            },
            "genotype": {
               "$ref": "#/definitions/Genotype"
            },
            "gene_phenotype": {
               "$ref": "core.json#/definitions/PGxGenePhenotype"
            },
            "reference": {
               "$ref": "#/definitions/Reference"
            }
         }
      },
      "Reference": {
         "description": "Stores a reference or citation to external data\nThe following types of Reference are supported:\n\n  * `doi`: stores a refernece to a [Digital Object Identifier](https://www.doi.org/). **NOTE: pubmed should be preferred over doi for scientific publications.**\n  * `pubmed`: stores a reference to a [PubMed](https://pubmed.ncbi.nlm.nih.gov/) identifier as the `value`.  The PubMed identifier may be replaced with the publication title, authors, etc. during rendering. \n  * `url`: stores a reference to a website (typically starting with `https:`).\n\nThe `display` property, if set, contains text that will be used when representing the reference in written docuemnts. ",
         "type": "object",
         "additionalProperties": false,
         "required": [
            "type",
            "value"
         ],
         "properties": {
            "display": {
               "title": "Display",
               "description": "Text to display for reference",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "type": "string",
               "enum": [
                  "doi",
                  "pubmed",
                  "url"
               ]
            },
            "value": {
               "title": "Value",
               "type": "string"
            },
            "accessed_at": {
               "title": "Accessed At",
               "oneOf": [
                  {
                     "$ref": "core.json#/definitions/Date",
                     "title": "Date"
                  },
                  {
                     "$ref": "core.json#/definitions/UTCTimestamp",
                     "title": "Datetime"
                  }
               ]
            }
         },
         "examples": [
            {
               "type": "doi",
               "value": "10.1007/10753.1573-2576",
               "display": "Inflammation"
            },
            {
               "type": "pubmed",
               "value": "123456"
            },
            {
               "type": "url",
               "value": "https://cpicpgx.org/guidelines/cpic-guideline-for-proton-pump-inhibitors-and-cyp2c19/",
               "display": "CPIC CYP2C19 Guidelines",
               "accessed_at": "2018-11-13T20:20:39+00:00"
            }
         ]
      },
      "Lab": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "name": {
               "type": "string"
            },
            "address": {
               "$ref": "#/definitions/Address"
            },
            "clia_number": {
               "type": "string"
            },
            "cap_number": {
               "type": "string"
            },
            "directors": {
               "type": "array",
               "items": {
                  "$ref": "#/definitions/LabDirector"
               }
            },
            "clinical_scientists": {
               "type": "array",
               "items": {
                  "type": "object",
                  "properties": {
                     "name": {
                        "$ref": "#/definitions/Name"
                     }
                  }
               }
            },
            "product_mapping": {
               "description": "Maps internal sequencing protocols to their corresponding product id at the lab.",
               "type": "object",
               "propertyNames": {
                  "$ref": "./core.json#/definitions/SequencingProtocol"
               },
               "additionalProperties": {
                  "type": "string"
               }
            },
            "test_properties": {
               "type": "object",
               "description": "Additional properties to include in the report when this lab is used.",
               "propertyNames": {
                  "$ref": "./core.json#/definitions/ConfirmationMethod"
               },
               "additionalProperties": {
                  "type": "object",
                  "properties": {
                     "methods": {
                        "type": "array",
                        "items": {
                           "type": "string"
                        }
                     },
                     "limitations": {
                        "type": "array",
                        "items": {
                           "type": "string"
                        }
                     }
                  },
                  "additionalProperties": false
               }
            }
         },
         "required": [
            "name"
         ],
         "examples": [
            {
               "name": "MyOme",
               "address": {
                  "city": "San Carlos",
                  "country": "USA",
                  "postal_code": "94070",
                  "region": "CA",
                  "street_address": "930 Brittan Ave"
               },
               "clia_number": null,
               "cap_number": null,
               "directors": [
                  {
                     "_id": "I/daea778e-11eb-6447",
                     "email": "ford@myclinic.com",
                     "fax": "415-555-1212",
                     "name": {
                        "first": "Ford",
                        "last": "Prefect",
                        "title": "Dr."
                     },
                     "phone": "+1-415-555-1212"
                  }
               ],
               "product_mapping": {
                  "HC_WGS": "C_WGS"
               }
            }
         ]
      },
      "ProductDataCAD": {
         "type": "object",
         "title": "Inputs for IPRS CAD",
         "additionalProperties": false,
         "required": [
            "smoking",
            "diabetes",
            "cholesterol",
            "blood_pressure"
         ],
         "properties": {
            "smoking": {
               "$ref": "./requisition_observations/smoking.json"
            },
            "diabetes": {
               "$ref": "./requisition_observations/diabetes.json"
            },
            "cholesterol": {
               "$ref": "./requisition_observations/cholesterol.json"
            },
            "blood_pressure": {
               "$ref": "./requisition_observations/blood_pressure.json"
            }
         }
      },
      "ProductDataPR41003": {
         "type": "object",
         "title": "Inputs for IPRS Breast Cancer",
         "description": "Additional data needed for iPRS Breast Cancer",
         "additionalProperties": false,
         "properties": {
            "weight": {
               "$ref": "./requisition_observations/weight.json"
            },
            "height": {
               "$ref": "./requisition_observations/height.json"
            },
            "ashkenazi_jewish": {
               "$ref": "./requisition_observations/ashkenazi_jewish.json"
            },
            "tyrer_cuzick_inputs": {
               "$ref": "./requisition_observations/tyrer_cuzick_inputs.json"
            }
         }
      },
      "ProductDataPR41003WithDependencies": {
         "type": "object",
         "title": "Inputs for IPRS Breast Cancer",
         "description": "Additional data needed for iPRS Breast Cancer",
         "additionalProperties": false,
         "properties": {
            "weight": {
               "$ref": "./requisition_observations/weight.json"
            },
            "height": {
               "$ref": "./requisition_observations/height.json"
            },
            "ashkenazi_jewish": {
               "$ref": "./requisition_observations/ashkenazi_jewish.json"
            },
            "tyrer_cuzick_inputs": {
               "$ref": "./requisition_observations/tyrer_cuzick_inputs_with_dependencies.json"
            }
         }
      },
      "ProductDataPR4001Empower": {
         "type": "object",
         "description": "Additional data needed for product ID PR4001 with TC outputs and a data sample",
         "required": [
            "tc_data",
            "data_files",
            "data_sample_info"
         ],
         "properties": {
            "tc_data": {
               "type": "object",
               "description": "Extra data required for computation. The content requirements depend on the selected product ID.",
               "additionalProperties": false,
               "required": [
                  "five_year_risk",
                  "lifetime_risk",
                  "n_first_degree_affected"
               ],
               "properties": {
                  "five_year_risk": {
                     "description": "Five year risk score in decimal format.",
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1
                  },
                  "lifetime_risk": {
                     "description": "Lifetime year risk score in decimal format.",
                     "type": "number",
                     "minimum": 0,
                     "maximum": 1
                  },
                  "n_first_degree_affected": {
                     "description": "Number of first degree",
                     "type": "integer"
                  }
               }
            },
            "data_files": {
               "type": "array",
               "items": {
                  "type": "object",
                  "$ref": "#/definitions/File"
               }
            },
            "data_sample_info": {
               "type": "object",
               "additionalProperties": false,
               "required": [
                  "collection_date",
                  "received_date",
                  "sample_type"
               ],
               "properties": {
                  "sample_type": {
                     "type": "string",
                     "enum": [
                        "DATA"
                     ]
                  },
                  "collection_date": {
                     "type": "string",
                     "pattern": "[12]\\d{3}-[01]\\d-[0123]\\d"
                  },
                  "received_date": {
                     "type": "string",
                     "pattern": "[12]\\d{3}-[01]\\d-[0123]\\d"
                  }
               }
            }
         },
         "example": {
            "tc_data": {
               "five_year_risk": 0.012,
               "lifetime_risk": 0.022,
               "n_first_degree_affected": 2
            },
            "data_files": [
               {
                  "uri": "s3://bucket/R1.fastq",
                  "sha512": "3b7fc7cc370707c1df045c35342f3d64ea7076",
                  "description": "R1 Fastq sequence",
                  "mimetype": "application/x.seq-na-fastq;type=paired_end;direction=R1"
               },
               {
                  "uri": "s3://bucket/R2.fastq",
                  "sha512": "3b7fc7cc370707c1df045c35342f3d64ea7076",
                  "description": "R2 Fastq sequence",
                  "mimetype": "application/x.seq-na-fastq;type=paired_end;direction=R2"
               }
            ],
            "data_sample_info": {
               "sample_type": "DATA",
               "collection_date": "2022-12-21",
               "received_date": "2022-12-23"
            }
         }
      },
      "ProductDataT2D": {
         "type": "object",
         "title": "Inputs for IPRS T2D",
         "additionalProperties": false,
         "required": [
            "smoking",
            "glucose",
            "triglyceride",
            "cholesterol",
            "blood_pressure",
            "diabetes_family_history",
            "body_mass_index",
            "waist_circumference"
         ],
         "properties": {
            "smoking": {
               "$ref": "./requisition_observations/smoking.json"
            },
            "cholesterol": {
               "$ref": "./requisition_observations/cholesterol.json"
            },
            "glucose": {
               "$ref": "./requisition_observations/glucose.json"
            },
            "triglyceride": {
               "$ref": "./requisition_observations/triglyceride.json"
            },
            "blood_pressure": {
               "$ref": "./requisition_observations/blood_pressure.json"
            },
            "diabetes_family_history": {
               "$ref": "./requisition_observations/diabetes_family_history.json"
            },
            "body_mass_index": {
               "$ref": "./requisition_observations/body_mass_index.json"
            },
            "waist_circumference": {
               "$ref": "./requisition_observations/waist_circumference.json"
            }
         }
      },
      "ProductDataPRC": {
         "type": "object",
         "title": "Inputs for IPRS PRC",
         "additionalProperties": false,
         "required": [
            "diagnosed_with_prostate_cancer",
            "prostate_cancer_family_history"
         ],
         "properties": {
            "diagnosed_with_prostate_cancer": {
               "$ref": "./requisition_observations/diagnosed_with_prostate_cancer.json"
            },
            "prostate_cancer_family_history": {
               "$ref": "./requisition_observations/prostate_cancer_family_history.json"
            }
         }
      },
      "Signature": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "image": {
               "type": "string",
               "description": "base64 encoded data url Tip: Generate with `convert signature.png -quality 70 -geometry 400x400 inline:gif:-`",
               "examples": [
                  "data:image/gif;base64,R0lGODlhZAASAPQAAAICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4ODg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB4eHiAgIAAAAAAAAAAAACH5BAEAAB0AIf8LSW1hZ2VNYWdpY2sOZ2FtbWE9MC40NTQ1NDUALAAAAABkABIAAAX+YCeOZGmeaKqubOuaETRJlPXe+AhBTJT/EkkJ8iumIg6fSGhsOZikyaN5aYoelRLDqqoIlaRFU5IYEzuTUZmLkmQ751HDenj/HBkRhblln8AdFCQNaUYSB0aFIj4VcysLVTlTOggPVQ+AIhcLiC0JcVYLTywKIgygLJkKjgeRJBZzCCSTJQsIBiQJBg4bORayIxMOJ2IdoyIWCcM3jg0VriPDD8AdBwUlFGIHjh0REYKTgi7LIg6lYL3c3B0FNnYsEMpgGCTDDgFnDBULFA0LWD4iCOC2ZQqRBQvSmKN3JFipDms6SIjQp9sIBhSyZFLxgJYIhiImUHCwRUJFMASJKDBQsMGGiAYPEJFJc8EBkQkBT0BRkGCBAkUOAJDr8GbKhT0iEjAoBG3Exg4uKVQyhUrOAEccZq1o9FRcB48iKhR4KGdJBzETF/iwwEDtCUUlXPr5oWgBlJfeRmg4qyTCgjfrUng9AXLujTzBogXu0HZwjqevaEiQYRhHBggkK0fRzLmz58+fQwAAOw=="
               ]
            },
            "user": {
               "type": "string",
               "examples": [
                  "U/61be-4d38-644f"
               ]
            },
            "name": {
               "$ref": "#/definitions/Name",
               "examples": [
                  {
                     "first": "Random",
                     "last": "Person"
                  }
               ]
            },
            "email": {
               "type": "string",
               "format": "email",
               "examples": [
                  "random.person@somelab.com"
               ]
            },
            "utc_timestamp": {
               "$ref": "core.json#/definitions/UTCTimestamp"
            }
         }
      },
      "ReportNextSteps": {
         "title": "Next Steps",
         "type": "array",
         "items": {
            "type": "string"
         },
         "example": [
            "Women with an estimated lifetime breast cancer risk of 20% or higher should speak with their healthcare provider about American Cancer Society (ACS) guidelines for increased breast cancer surveillance as outlined below, as well as published recommendations for risk-reducing agents and comprehensive risk assessment.",
            "Annual mammograms starting at age 40 or 10 years younger than the earliest breast cancer diagnosis in the family (but no earlier than age 30)\\n",
            "Annual breast MRI starting at age 40 or 10 years younger than the earliest breast cancer diagnosis in the family (but no earlier than age 25)\\n",
            "These results should be interpreted in the context of the individual's personal medical history and family history. The patient's female relatives may wish to speak with their healthcare provider to undergo a personalized risk assessment."
         ]
      },
      "PRSNextSteps": {
         "title": "PRS Next Steps",
         "type": "object",
         "description": "Specifies next steps for a given risk level.",
         "properties": {
            "general_guidance": {
               "type": "string",
               "description": "General guidance for this PRS type, regardless of risk."
            },
            "risk_level_specific": {
               "type": "string",
               "description": "Risk-level-specific guidance."
            }
         },
         "required": [
            "general_guidance",
            "risk_level_specific"
         ]
      },
      "FamilyVariantVariation": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "event": {
               "title": "Variant",
               "type": "string"
            },
            "display": {
               "title": "Variant Analyzed",
               "type": "string"
            },
            "summary": {
               "title": "Variant Summary",
               "type": "string"
            },
            "size_mb": {
               "title": "Size in Mb (If applicable)",
               "type": "number"
            }
         },
         "required": [
            "event",
            "display"
         ],
         "examples": [
            {
               "event": "c.1359+601A>G",
               "display": "NM_000466.3:c.1359+601A>G",
               "summary": "PEX1 gene, NM_000466.3:c.1359+601A>G, Uncertain Significance"
            }
         ]
      },
      "RareDiseaseVariation": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "hgvs_g_38": {
               "title": "HGVS (g.) - GRCh38",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "hgvs_g_37": {
               "title": "HGVS (g.) - GRCh37",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "hgvs_t": {
               "title": "HGVS (c.)",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "hgvs_p": {
               "title": "HGVS (p.)",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "display": {
               "title": "Variant Display",
               "type": [
                  "string",
                  "null"
               ]
            },
            "chromosome_region": {
               "title": "Chromosome Region",
               "$ref": "core.json#/definitions/ChromosomeRegion"
            }
         },
         "required": [
            "display"
         ],
         "examples": [
            {
               "hgvs_g_38": "NC_000017.11:g.43045685T>C",
               "hgvs_g_37": "NC_000017.11:g.43045685T>C",
               "hgvs_t": "NM_007294.4(BRCA1):c.5585A>G",
               "hgvs_p": "NP_009225.1:p.His1862Arg",
               "display": "NM_007294.4(BRCA1):c.5585A>G (p.His1862Arg)",
               "chromosome_region": "chr17:1000-2000"
            }
         ]
      },
      "TREVariation": {
         "type": "object",
         "additionalProperties": false,
         "required": [
            "display",
            "alleles"
         ],
         "properties": {
            "hgvs_g_38": {
               "title": "HGVS (g.) - GRCh38",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "display": {
               "title": "Display",
               "type": [
                  "string",
                  "null"
               ]
            },
            "chromosome_region": {
               "title": "Chromosome Region",
               "$ref": "core.json#/definitions/ChromosomeRegion"
            },
            "alleles": {
               "title": "Alleles",
               "type": "object",
               "additionalProperties": false,
               "properties": {
                  "allele1": {
                     "$ref": "#/definitions/TREVariationAllele"
                  },
                  "allele2": {
                     "$ref": "#/definitions/TREVariationAllele"
                  }
               }
            }
         },
         "examples": [
            {
               "hgvs_g_38": "NC_000014.9:g.[92071010CAG[100]];[92071010CAG[100]]",
               "display": "NC_000014.9:g.[92071010CAG[100]];[92071010CAG[100]]",
               "chromosome_region": "chr17:1000-2000"
            }
         ]
      },
      "TREVariationAllele": {
         "type": "object",
         "additionalProperties": false,
         "required": [
            "repeat_count",
            "motif",
            "repeat_range",
            "classification_group",
            "classification"
         ],
         "properties": {
            "hgvs_g_38": {
               "title": "HGVS (g.) - GRCh38",
               "type": [
                  "string",
                  "null"
               ]
            },
            "repeat_count": {
               "title": "Repeat Count",
               "type": "integer"
            },
            "motif": {
               "title": "Repeat Motif",
               "type": "string"
            },
            "event": {
               "title": "Pathogenic event",
               "type": "string"
            },
            "repeat_range": {
               "title": "Repeat Range",
               "type": "array",
               "minItems": 1,
               "maxItems": 2,
               "items": {
                  "type": "integer"
               }
            },
            "classification_group": {
               "title": "Classification Group",
               "type": "string"
            },
            "classification": {
               "title": "ACMG Classification",
               "$ref": "core.json#/definitions/ACMGPlusNegativeClassification"
            },
            "number": {
               "type": "integer"
            }
         },
         "examples": [
            {
               "hgvs_g_38": "NC_000014.9:g.[92071010CAG[100]]",
               "repeat_count": 100,
               "repeat_range": [
                  30,
                  10000
               ],
               "event": "\u226530 CAG repeats",
               "classification_group": "pathogenic",
               "classification": "PATHOGENIC"
            }
         ]
      },
      "RareDiseaseQCMetrics": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "mean_depth": {
               "title": "Mean Depth",
               "type": "number",
               "examples": [
                  35.8
               ]
            },
            "qc_10x_cov_perc": {
               "title": "QC 10x Coverage Percentage",
               "type": "number",
               "examples": [
                  0.953
               ]
            }
         }
      },
      "SampleRequest": {
         "type": "object",
         "title": "Sample Request",
         "properties": {
            "send_kit": {
               "title": "Send Kit",
               "type": "boolean"
            },
            "send_kit_address": {
               "$ref": "#/definitions/Address"
            },
            "type": {
               "$ref": "core.json#/definitions/SampleType"
            }
         },
         "required": [
            "send_kit",
            "type"
         ],
         "examples": [
            {
               "type": "Saliva",
               "send_kit": true,
               "send_kit_address": {
                  "city": "San Carlos",
                  "country": "USA",
                  "postal_code": "94070",
                  "region": "CA",
                  "street_address": "930 Brittan Ave"
               }
            }
         ]
      },
      "Supersedes": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "report_id": {
               "$ref": "ids.json#/definitions/ReportId"
            },
            "report_date": {
               "$ref": "core.json#/definitions/Date"
            },
            "supersede_type": {
               "$ref": "core.json#/definitions/SupersedeType"
            },
            "changes": {
               "type": "array",
               "items": {
                  "type": "object",
                  "properties": {
                     "original": {
                        "type": "string"
                     },
                     "revised": {
                        "type": "string"
                     }
                  }
               },
               "example": [
                  {
                     "original": "a negative report",
                     "revised": "a pathogenic BRCA2 report"
                  },
                  {
                     "original": "sample ID SM-12345",
                     "revised": "sample ID SM-67890"
                  }
               ]
            }
         }
      },
      "Variation": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "hgvs_g": {
               "title": "HGVS (g.) - Legacy. Retained for backwards compatibility",
               "$ref": "core.json#/definitions/HGVSExpression"
            },
            "hgvs_g_37": {
               "title": "HGVS (g.) - GRCh37",
               "$ref": "core.json#/definitions/HGVSExpression"
            },
            "hgvs_g_38": {
               "title": "HGVS (g.) - GRCh38",
               "type": [
                  "string",
                  "null"
               ],
               "$ref": "core.json#/definitions/HGVSExpressionOrNone"
            },
            "hgvs_t": {
               "title": "HGVS (c.)",
               "$ref": "core.json#/definitions/HGVSExpression"
            },
            "hgvs_p": {
               "title": "HGVS (p.)",
               "$ref": "core.json#/definitions/HGVSExpression"
            },
            "display": {
               "title": "Display",
               "type": "string"
            }
         },
         "required": [
            "display"
         ],
         "examples": [
            {
               "hgvs_g": "NC_000017.11:g.43045685T>C",
               "hgvs_g_37": "NC_000017.11:g.43045685T>C",
               "hgvs_g_38": "NC_000017.11:g.43045685T>C",
               "hgvs_t": "NM_007294.4(BRCA1):c.5585A>G",
               "hgvs_p": "NP_009225.1:p.His1862Arg",
               "display": "NM_007294.4(BRCA1):c.5585A>G (p.His1862Arg)"
            }
         ]
      },
      "VariationClassification": {
         "type": "object",
         "additionalProperties": false,
         "required": [
            "classification"
         ],
         "properties": {
            "variantfinding_id": {
               "$ref": "ids.json#/definitions/VariantFindingId"
            },
            "finding_type": {
               "$ref": "core.json#/definitions/FindingType"
            },
            "disease": {
               "title": "Disease",
               "type": "string",
               "examples": [
                  "PMS2 is associated with..."
               ]
            },
            "variation": {
               "title": "Variation",
               "$ref": "#/definitions/Variation"
            },
            "event": {
               "title": "Pathogenic event",
               "type": "string"
            },
            "gene": {
               "title": "Gene",
               "$ref": "#/definitions/Gene"
            },
            "classification": {
               "title": "ACMG Classification",
               "anyOf": [
                  {
                     "$ref": "core.json#/definitions/ACMGClassification"
                  },
                  {
                     "const": "NEGATIVE"
                  }
               ]
            },
            "mode_of_inheritance": {
               "$ref": "core.json#/definitions/Inheritance"
            },
            "zygosity": {
               "$ref": "core.json#/definitions/Zygosity"
            },
            "evidence": {
               "title": "Evidence",
               "type": "string",
               "examples": [
                  "This variant has been seen in % of the individuals with condition. Has been observed to segreate with disease in at least on ene condition.\nFor these reasons the variant has been classified as pathogenic.\n* This variant has been seen in XXX% of the individuals with condition. Has been observed to segreate with disease in at least on econdition. * For these reasons the variant has been classified as pathogenic."
               ]
            },
            "references": {
               "title": "References",
               "type": "array",
               "items": {
                  "$ref": "#/definitions/Reference"
               }
            }
         }
      },
      "LabDirector": {
         "type": "object",
         "required": [
            "name",
            "npi"
         ],
         "properties": {
            "name": {
               "$ref": "#/definitions/Name"
            },
            "npi": {
               "$ref": "core.json#/definitions/NPI"
            }
         }
      },
      "Address": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "street_address": {
               "type": "string",
               "title": "Street Address",
               "description": "Number and street"
            },
            "street_address_2": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Street Address Line 2"
            },
            "city": {
               "type": "string",
               "title": "City"
            },
            "region": {
               "type": "string",
               "title": "Region",
               "description": "State, province, or other country-specific region"
            },
            "postal_code": {
               "type": "string",
               "title": "Postal Code",
               "description": "Country-specific code for geographic districts"
            },
            "country": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Country",
               "description": "Country name or abbreviation"
            }
         },
         "required": [
            "street_address",
            "city",
            "region",
            "postal_code"
         ],
         "examples": [
            {
               "street_address": "930 Brittan Ave",
               "city": "San Carlos",
               "region": "CA",
               "postal_code": "94070",
               "country": "USA"
            }
         ]
      },
      "AddressOptional": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "street_address": {
               "type": "string",
               "title": "Street Address",
               "description": "Number and street"
            },
            "street_address_2": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Street Address Line 2"
            },
            "city": {
               "type": "string",
               "title": "City"
            },
            "region": {
               "type": "string",
               "title": "Region",
               "description": "State, province, or other country-specific region"
            },
            "postal_code": {
               "type": "string",
               "title": "Postal Code",
               "description": "Country-specific code for geographic districts"
            },
            "country": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Country",
               "description": "Country name or abbreviation"
            }
         },
         "examples": [
            {
               "street_address": "930 Brittan Ave",
               "city": "San Carlos",
               "region": "CA",
               "postal_code": "94070",
               "country": "USA"
            }
         ]
      },
      "ContactInfo": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "address": {
               "title": "Address",
               "$ref": "#/definitions/Address"
            },
            "email": {
               "$ref": "core.json#/definitions/EmailAddress"
            },
            "phone": {
               "type": "string",
               "title": "Phone Number"
            },
            "fax": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Fax Number"
            }
         }
      },
      "ContactInfoOptional": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "address": {
               "title": "Address",
               "$ref": "#/definitions/AddressOptional"
            },
            "email": {
               "$ref": "core.json#/definitions/EmailAddress"
            },
            "phone": {
               "type": "string",
               "title": "Phone Number"
            },
            "fax": {
               "type": "string",
               "title": "Fax Number"
            }
         }
      },
      "ContactInfoForFamilyMember": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "prefill_button": {
               "type": "string",
               "title": "Prefill Button"
            },
            "address": {
               "title": "Address",
               "$ref": "#/definitions/Address"
            },
            "email": {
               "$ref": "core.json#/definitions/EmailAddress"
            },
            "phone": {
               "type": "string",
               "title": "Phone Number"
            },
            "fax": {
               "type": "string",
               "title": "Fax Number"
            }
         }
      },
      "Demographics": {
         "type": "object",
         "title": "Demographics",
         "properties": {
            "dob": {
               "$ref": "core.json#/definitions/Date",
               "title": "Date of Birth",
               "description": "mm/dd/yyyy"
            },
            "sex": {
               "$ref": "core.json#/definitions/BiologicalSex",
               "title": "Sex"
            },
            "gender": {
               "$ref": "core.json#/definitions/Gender"
            }
         }
      },
      "Insurance": {
         "title": "Insurance information",
         "type": "object",
         "required": [
            "policyholder_name",
            "company",
            "member_id",
            "relationship_to_policyholder"
         ],
         "properties": {
            "policyholder_name": {
               "title": "Policy Holder Name",
               "$ref": "#/definitions/Name",
               "required": [
                  "first",
                  "last"
               ]
            },
            "policyholder_dob": {
               "title": "Policyholder Date of Birth",
               "$ref": "core.json#/definitions/Date",
               "description": "mm/dd/yyyy"
            },
            "policyholder_sex": {
               "title": "Policyholder Sex",
               "$ref": "core.json#/definitions/BiologicalSex"
            },
            "policyholder_address": {
               "title": "Policyholder Address",
               "$ref": "#/definitions/Address"
            },
            "company": {
               "title": "Name of Insurance Company",
               "type": "string"
            },
            "phone": {
               "title": "Insurance Phone Number",
               "type": "string"
            },
            "member_id": {
               "title": "Member ID",
               "type": "string"
            },
            "group_number": {
               "title": "Group Number",
               "type": "string"
            },
            "prior_auth_number": {
               "title": "Prior Authorization Number",
               "type": "string"
            },
            "relationship_to_policyholder": {
               "title": "Patient Relationship to Policyholder",
               "description": "",
               "$ref": "core.json#/definitions/Relationship"
            },
            "relationship_to_policyholder_other": {
               "title": "Patient Relationship to Policyholder Other: ",
               "type": "string"
            },
            "epsdt_coverage": {
               "title": "EPSDT Coverage",
               "description": "If the patient is under 21 years old and has a Medicaid plan, please provide the following information for Early and Periodic Screening, Diagnosis, and Treatment (EPSDT) coverage.",
               "type": "object",
               "properties": {
                  "medicaid_plan": {
                     "title": "Medicaid Plan",
                     "type": "string"
                  },
                  "medicaid_number": {
                     "title": "Medicaid Number",
                     "type": "string"
                  },
                  "attestations": {
                     "title": "I attest that test results will impact medical management, including treatment or care decisions as follows:",
                     "type": "array",
                     "items": {
                        "type": "string",
                        "enum": [
                           "My patient may be eligible for specific drug therapies or clinical trials",
                           "My patient may be referred for additional medical consultations and/or support services for additional treatments and surveillance",
                           "My patient's medication may change if genetic findings indicate risk for adverse reactions or poor drug metabolism"
                        ]
                     },
                     "uniqueItems": true
                  }
               }
            }
         }
      },
      "Link": {
         "type": "object",
         "properties": {
            "uri": {
               "type": "string",
               "format": "uri"
            },
            "display": {
               "type": "string"
            }
         }
      },
      "Name": {
         "type": "object",
         "title": "Name",
         "additionalProperties": false,
         "properties": {
            "first": {
               "type": "string",
               "title": "First"
            },
            "middle": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Middle"
            },
            "last": {
               "type": "string",
               "title": "Last"
            },
            "credentials": {
               "type": [
                  "string",
                  "null"
               ],
               "title": "Credentials",
               "description": "e.g. M.D., Ph.D."
            }
         },
         "examples": [
            {
               "first": "Zaphod",
               "middle": "Vogon",
               "last": "Beeblebrox",
               "credentials": "M.D., Ph.D."
            }
         ]
      },
      "ToplineFinding": {
         "properties": {
            "finding": {
               "title": "Finding",
               "anyOf": [
                  {
                     "$ref": "core.json#/definitions/MonogenicToplineFinding"
                  },
                  {
                     "$ref": "core.json#/definitions/PRSToplineFinding"
                  },
                  {
                     "$ref": "core.json#/definitions/PGxImpactToplineFinding"
                  },
                  {
                     "$ref": "core.json#/definitions/RareDiseaseToplineFinding"
                  }
               ],
               "type": "string"
            },
            "text": {
               "title": "Text",
               "type": "string"
            }
         },
         "required": [
            "finding",
            "text"
         ]
      },
      "Text": {
         "description": "NOT IN USE YET",
         "type": "object",
         "properties": {
            "format": {
               "type": "string",
               "enum": [
                  "plain",
                  "markdown"
               ],
               "default": "plain"
            },
            "value": {
               "type": "string"
            }
         }
      },
      "LogItem": {
         "type": "object",
         "additionalProperties": false,
         "properties": {
            "facility": {
               "type": "string"
            },
            "ts": {
               "$ref": "core.json#/definitions/UTCTimestamp"
            },
            "level": {
               "$ref": "core.json#/definitions/LogLevel"
            },
            "text": {
               "type": "string"
            }
         },
         "examples": [
            {
               "facility": "pipeline",
               "level": "WARNING",
               "ts": "2018-11-13T20:20:39+00:00",
               "text": "oops!"
            },
            {
               "facility": "secondary",
               "level": "INFO",
               "ts": "2018-11-13T20:20:39+00:00",
               "text": "Sample is not human!"
            }
         ]
      },
      "Consent": {
         "type": "object",
         "properties": {
            "type": {
               "$ref": "core.json#/definitions/ConsentType"
            },
            "protocol_id": {
               "type": "string"
            }
         }
      },
      "ExternalIdentifiers": {
         "type": "object",
         "description": "External identifiers that can be associated with reports",
         "additionalProperties": false,
         "properties": {
            "external_order_id": {
               "type": "string"
            },
            "external_clinic_id": {
               "type": "string"
            },
            "external_deidentified_id": {
               "type": "string"
            },
            "original_external_order_id": {
               "type": "string"
            }
         },
         "examples": [
            {
               "external_order_id": "1234567890"
            },
            {
               "external_clinic_id": "Clinic-0123456"
            },
            {
               "external_deidentified_id": "1231-2312-3123-1231"
            },
            {
               "original_external_order_id": "1234567891"
            }
         ]
      }
   }
}