<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="PharmacogeneticLaboratoryTest" />
  <url value="http://openehr.org.nl/zibs/StructureDefinition/PharmacogeneticLaboratoryTest" />
  <version value="1.0.0-alpha.3" />
  <name value="PharmacogeneticLaboratoryTest" />
  <title value="PGX - Pharmacogenetics diagnostic report" />
  <status value="active" />
  <description value="`[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 ]`&#xA;                             The result, including findings and the laboratory's interpretation, of Pharmacogenetics investigation performed on specimens collected from an individual.)" />
  <fhirVersion value="4.0.1" />
  <kind value="logical" />
  <abstract value="false" />
  <type value="http://openehr.org.nl/zibs/StructureDefinition/PharmacogeneticLaboratoryTest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Element" />
  <derivation value="specialization" />
  <differential>
    <element id="PharmacogeneticLaboratoryTest">
      <path value="PharmacogeneticLaboratoryTest" />
      <short value="PGX - Pharmacogenetics diagnostic report" />
      <definition value="`[openEHR-EHR-OBSERVATION.laboratory_test_result.v1 ]`&#xA;                             The result, including findings and the laboratory's interpretation, of Pharmacogenetics investigation performed on specimens collected from an individual.)" />
    </element>
    <element id="PharmacogeneticLaboratoryTest.time">
      <path value="PharmacogeneticLaboratoryTest.time" />
      <short value="time" />
      <definition value="`[RM ]`&#xA;                             `OBSERVATION.EVENT.time` - Time of this Observation event. If the width is non-zero, it is the time point of the trailing edge of the event.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.testName">
      <path value="PharmacogeneticLaboratoryTest.testName" />
      <short value="Test name" />
      <definition value="`[at0005 ]`&#xA;                             Name of the laboratory investigation performed on the specimen(s).)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.clinicalInformationProvided">
      <path value="PharmacogeneticLaboratoryTest.clinicalInformationProvided" />
      <short value="Clinical information provided" />
      <definition value="`[at0100 ]`&#xA;                             Description of clinical information available at the time of interpretation of results.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult" />
      <short value="Laboratory result" />
      <definition value="`[openEHR-EHR-CLUSTER.laboratory_test_analyte.v1 ]`&#xA;                             The result of a laboratory test for a single analyte value.)" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.analyteName">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.analyteName" />
      <short value="Analyte name" />
      <definition value="`[at0024 ]`&#xA;                             The name of the analyte result.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult" />
      <short value="Pharmacogenetic test result" />
      <definition value="`[openEHR-EHR-CLUSTER.pharmacogenetic_result.v0 ]`&#xA;                             Findings on pharmacogenetic testing for a single gene.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.geneSymbol">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.geneSymbol" />
      <short value="Gene symbol" />
      <definition value="`[at0003 ]`&#xA;                             The official gene symbol approved by the HGNC, which is a short abbreviated form of the gene name.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.diplotype">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.diplotype" />
      <short value="Diplotype" />
      <definition value="`[at0004 ]`&#xA;                             A textual representation of the diplotype, normally as string of characters, either as as gene change descriptors or star allele diplotypes.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.phenotype">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.phenotype" />
      <short value="Phenotype" />
      <definition value="`[at0052 ]`&#xA;                             The estimated pharmacological impact of the identified genotype.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="http://example.org/ValueSet/Phenotype" />
      </binding>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.overallActivityScore">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.overallActivityScore" />
      <short value="Overall activity score" />
      <definition value="`[at0080  | 1]`&#xA;                             An associated derived activity score, based on known association with specific genotypes and individual allele activity values, which is required to assess metaboliser status for some phenotypes.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue" />
      <short value="Individual activity value" />
      <definition value="`[at0084 ]`&#xA;                             A list of enzyme activity values each associated with a specific allele, which are used to derive the Overall activity score.)" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue.alleleHaplotype">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue.alleleHaplotype" />
      <short value="Allele haplotype" />
      <definition value="`[at0086 ]`&#xA;                             The allele haplotype descriptor associated with the activity value.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue.activityValue">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.individualActivityValue.activityValue" />
      <short value="Activity value" />
      <definition value="`[at0085  | 1]`&#xA;                             An associated derived activity score, based on known association with specific genotypes, which is required to assess metaboliser status for some phenotypes.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Quantity" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested" />
      <short value="Per-allele tested" />
      <definition value="`[at0097 ]`&#xA;                             A list of the specific alleles tested by this pharmacogenetic test, as the specific alleles may vary between tests.)" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber" />
      <short value="SNP rsNumber" />
      <definition value="`[openEHR-EHR-CLUSTER.knowledge_base_reference.v1 ]`&#xA;                             A citation of a digital resource used as an source of authoritative or expert information, and/or to items contained within the resource.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber.knowledgeBaseName">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber.knowledgeBaseName" />
      <short value="Knowledge base name" />
      <definition value="`[at0001 ]`&#xA;                             The name of the knowledge base.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber.itemName">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.perAlleleTested.sNPRsNumber.itemName" />
      <short value="Item name" />
      <definition value="`[at0005 ]`&#xA;                             The name of the referenced item within the knowledge base.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail" />
      <short value="Variant detail" />
      <definition value="`[openEHR-EHR-CLUSTER.genomic_variant_result.v1 ]`&#xA;                             Findings and annotations related to one variant found in a human individual by a sequencing test.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment" />
      <short value="GA4GH VRS attachment" />
      <definition value="`[openEHR-EHR-CLUSTER.media_file.v1 ]`&#xA;                             A media file that is acquired or used as part of the healthcare process, and associated metadata.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.content">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.content" />
      <short value="Content" />
      <definition value="`[at0001 ]`&#xA;                             Digital representation of the media file.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Attachment" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.contentName">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.contentName" />
      <short value="Content name" />
      <definition value="`[at0002 ]`&#xA;                             Descriptive name or title for the media file.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.created[x]">
      <path value="PharmacogeneticLaboratoryTest.laboratoryResult.pharmacogeneticTestResult.variantDetail.gA4GHVRSAttachment.created[x]" />
      <short value="Created" />
      <definition value="at0004: The date/time, partial date or period when the media file was generated or authored." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.overallRecommendation">
      <path value="PharmacogeneticLaboratoryTest.overallRecommendation" />
      <short value="Overall recommendation" />
      <definition value="`[at0057 ]`&#xA;                             Narrative description of the key findings.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.testMethod">
      <path value="PharmacogeneticLaboratoryTest.testMethod" />
      <short value="Test method" />
      <definition value="`[at0121 ]`&#xA;                             Description about the method used to perform the test.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.testingDevice">
      <path value="PharmacogeneticLaboratoryTest.testingDevice" />
      <short value="Testing device" />
      <definition value="`[openEHR-EHR-CLUSTER.device.v1 ]`&#xA;                             An instrument, apparatus, implant, material or similar, used in the provision of healthcare. In this context, a medical device includes a broad range of devices which act through a variety of physical, mechanical, thermal or similar means but specifically excludes devices which act through medicinal means such as pharmacological, metabolic or immunological methods.  The scope is inclusive of disposable devices as well as durable or persisting devices that require tracking, maintenance activities or regular calibration, recognising that each type of device has specific data recording requirements.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.testingDevice.deviceName">
      <path value="PharmacogeneticLaboratoryTest.testingDevice.deviceName" />
      <short value="Device name" />
      <definition value="`[at0001 ]`&#xA;                             Identification of the medical device, preferably by a common name, a formal fully descriptive name or, if required, by class or category of device.)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="PharmacogeneticLaboratoryTest.testingDevice.type">
      <path value="PharmacogeneticLaboratoryTest.testingDevice.type" />
      <short value="Type" />
      <definition value="`[at0003 ]`&#xA;                             The category or kind of device.)" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
  </differential>
</StructureDefinition>