<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="variant" />
  <url value="https://fhir.gsilab.id//StructureDefinition/variant" />
  <name value="Variant" />
  <title value="Variant" />
  <status value="draft" />
  <description value="Details about a set of changes in the tested sample compared to a reference sequence." />
  <copyright value="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 value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Observation" />
  <baseDefinition value="https://fhir.gsilab.id//StructureDefinition/genomic-base" />
  <derivation value="constraint" />
  <differential>
    <element id="Observation.component">
      <path value="Observation.component" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="code" />
        </discriminator>
        <description value="Slice based on the component.code pattern" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="Observation.component:representative-coding-hgvs">
      <path value="Observation.component" />
      <sliceName value="representative-coding-hgvs" />
      <short value="DNA change (c.HGVS)" />
      <definition value="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 value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:representative-coding-hgvs.code">
      <path value="Observation.component.code" />
      <short value="48004-6" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="48004-6" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:representative-coding-hgvs.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="A valid HGVS-formatted 'c.' string, e.g. NM_005228.5:c.2369C&gt;T." />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://fhir.gsilab.id//ValueSet/hgvs-vs" />
      </binding>
    </element>
    <element id="Observation.component:genomic-ref-seq">
      <path value="Observation.component" />
      <sliceName value="genomic-ref-seq" />
      <short value="Genomic Reference Sequence" />
      <definition value="ID of the genomic reference sequence, which includes transcribed and non transcribed stretches" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:genomic-ref-seq.code">
      <path value="Observation.component.code" />
      <short value="48013-7" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="48013-7" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:genomic-ref-seq.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="Versioned genomic reference sequence identifier" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="Observation.component:representative-protein-ref-seq">
      <path value="Observation.component" />
      <sliceName value="representative-protein-ref-seq" />
      <short value="Protein Reference Sequence" />
      <definition value="ID of the protein reference sequence, which includes transcribed and non transcribed stretches. It covers the entire protein described." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:representative-protein-ref-seq.code">
      <path value="Observation.component.code" />
      <short value="protein-ref-seq" />
      <patternCodeableConcept>
        <coding>
          <system value="http://hl7.org/fhir/uv/genomics-reporting/CodeSystem/tbd-codes-cs" />
          <code value="protein-ref-seq" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:representative-protein-ref-seq.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="Versioned protein reference sequence identifier" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="Observation.component:representative-transcript-ref-seq">
      <path value="Observation.component" />
      <sliceName value="representative-transcript-ref-seq" />
      <short value="Reference Transcript" />
      <definition value="NCBI's RefSeq ('NM_...'), Ensembl ('ENST...'), and LRG ('LRG...' plus 't1' to indicate transcript)" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:representative-transcript-ref-seq.code">
      <path value="Observation.component.code" />
      <short value="51958-7" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="51958-7" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:representative-transcript-ref-seq.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="Versioned transcript reference sequence identifier" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="Observation.component:exact-start-end">
      <path value="Observation.component" />
      <sliceName value="exact-start-end" />
      <short value="Exact Start-End" />
      <definition value="The exact integer-based genomic coordinates of the start and end of the variant region." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:exact-start-end.code">
      <path value="Observation.component.code" />
      <short value="81254-5" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="81254-5" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:exact-start-end.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="Range in question. 'High' can be omitted for single nucleotide variants." />
      <type>
        <code value="Range" />
      </type>
    </element>
    <element id="Observation.component:allelic-read-depth">
      <path value="Observation.component" />
      <sliceName value="allelic-read-depth" />
      <short value="Allelic Read Depth" />
      <definition value="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 &gt;400, sometimes as few as 2-4." />
      <comment value="See [here](sequencing.html#variant-assessment) for usage guidance." />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Observation.component:allelic-read-depth.code">
      <path value="Observation.component.code" />
      <short value="82121-5" />
      <patternCodeableConcept>
        <coding>
          <system value="http://loinc.org" />
          <code value="82121-5" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Observation.component:allelic-read-depth.value[x]">
      <path value="Observation.component.value[x]" />
      <short value="Unfiltered count of supporting reads" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
  </differential>
</StructureDefinition>