{
  "resourceType": "StructureDefinition",
  "id": "variant",
  "url": "https://fhir.gsilab.id//StructureDefinition/variant",
  "name": "Variant",
  "title": "Variant",
  "status": "draft",
  "description": "Details about a set of changes in the tested sample compared to a reference sequence.",
  "copyright": "This material contains content from LOINC (http://loinc.org). LOINC is copyright © 1995-2020, Regenstrief Institute, Inc. and the Logical Observation Identifiers Names and Codes (LOINC) Committee and is available at no cost under the license at http://loinc.org/license. LOINC® is a registered United States trademark of Regenstrief Institute, Inc.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Observation",
  "baseDefinition": "https://fhir.gsilab.id//StructureDefinition/genomic-base",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Observation.component",
        "path": "Observation.component",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open",
          "description": "Slice based on the component.code pattern"
        }
      },
      {
        "id": "Observation.component:representative-coding-hgvs",
        "path": "Observation.component",
        "sliceName": "representative-coding-hgvs",
        "short": "DNA change (c.HGVS)",
        "definition": "Human Genome Variation Society (HGVS) nomenclature for a single DNA marker. The use of the nomenclature must be extended to describe non-variations (aka. wild types) see samples for wild type examples.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:representative-coding-hgvs.code",
        "path": "Observation.component.code",
        "short": "48004-6",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "48004-6",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.component:representative-coding-hgvs.value[x]",
        "path": "Observation.component.value[x]",
        "short": "A valid HGVS-formatted 'c.' string, e.g. NM_005228.5:c.2369C>T.",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "https://fhir.gsilab.id//ValueSet/hgvs-vs"
        }
      },
      {
        "id": "Observation.component:genomic-ref-seq",
        "path": "Observation.component",
        "sliceName": "genomic-ref-seq",
        "short": "Genomic Reference Sequence",
        "definition": "ID of the genomic reference sequence, which includes transcribed and non transcribed stretches",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:genomic-ref-seq.code",
        "path": "Observation.component.code",
        "short": "48013-7",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "48013-7",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.component:genomic-ref-seq.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Versioned genomic reference sequence identifier",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.component:representative-protein-ref-seq",
        "path": "Observation.component",
        "sliceName": "representative-protein-ref-seq",
        "short": "Protein Reference Sequence",
        "definition": "ID of the protein reference sequence, which includes transcribed and non transcribed stretches. It covers the entire protein described.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:representative-protein-ref-seq.code",
        "path": "Observation.component.code",
        "short": "protein-ref-seq",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "protein-ref-seq",
              "system": "http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/tbd-codes-cs"
            }
          ]
        }
      },
      {
        "id": "Observation.component:representative-protein-ref-seq.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Versioned protein reference sequence identifier",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.component:representative-transcript-ref-seq",
        "path": "Observation.component",
        "sliceName": "representative-transcript-ref-seq",
        "short": "Reference Transcript",
        "definition": "NCBI's RefSeq ('NM_...'), Ensembl ('ENST...'), and LRG ('LRG...' plus 't1' to indicate transcript)",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:representative-transcript-ref-seq.code",
        "path": "Observation.component.code",
        "short": "51958-7",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "51958-7",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.component:representative-transcript-ref-seq.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Versioned transcript reference sequence identifier",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Observation.component:exact-start-end",
        "path": "Observation.component",
        "sliceName": "exact-start-end",
        "short": "Exact Start-End",
        "definition": "The exact integer-based genomic coordinates of the start and end of the variant region.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:exact-start-end.code",
        "path": "Observation.component.code",
        "short": "81254-5",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "81254-5",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.component:exact-start-end.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Range in question. 'High' can be omitted for single nucleotide variants.",
        "type": [
          {
            "code": "Range"
          }
        ]
      },
      {
        "id": "Observation.component:allelic-read-depth",
        "path": "Observation.component",
        "sliceName": "allelic-read-depth",
        "short": "Allelic Read Depth",
        "definition": "Specifies the number of reads that identified the allele in question whether it consists of one or a small sequence of contiguous nucleotides. Different methods and purposes require different numbers of reads to be acceptable. Often >400, sometimes as few as 2-4.",
        "comment": "See [here](sequencing.html#variant-assessment) for usage guidance.",
        "min": 0,
        "max": "1"
      },
      {
        "id": "Observation.component:allelic-read-depth.code",
        "path": "Observation.component.code",
        "short": "82121-5",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "82121-5",
              "system": "http://loinc.org"
            }
          ]
        }
      },
      {
        "id": "Observation.component:allelic-read-depth.value[x]",
        "path": "Observation.component.value[x]",
        "short": "Unfiltered count of supporting reads",
        "type": [
          {
            "code": "Quantity"
          }
        ]
      }
    ]
  }
}