@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <https://loinc.org/rdf/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/uv/cg-incubator/GenomicStudy/example-pgx> a fhir:GenomicStudy ;
  fhir:resourceDefinition http://hl7.org/fhir/StructureDefinition/GenomicStudy|0.1.0-ci-build ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example-pgx"] ; # 
  fhir:language [ fhir:v "en"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"><p class=\"res-header-id\"><b>Generated Narrative: GenomicStudy example-pgx</b></p><a name=\"example-pgx\"> </a><a name=\"hcexample-pgx\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Language: en</p></div><p><b>identifier</b>: <code>http://example.org/identifiers/genomicstudies</code>/urn:uuid:pgx-study-0001 (use: temp, )</p><p><b>status</b>: Available</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 405825005}\">Molecular genetic test (procedure)</span></p><p><b>subject</b>: <a href=\"Patient-pgxPatient.html\">Adam B. Everyman (official) Male, DoB: 1951-01-20 ( Medical record number: m123 (use: usual, period: 2021-01-01 --&gt; (ongoing)))</a></p><p><b>startDate</b>: 2021-01-01</p><p><b>basedOn</b>: <a href=\"ServiceRequest-pgxServiceRequest.html\">ServiceRequest </a></p><p><b>interpreter</b>: <a href=\"Practitioner-practitioner02.html\">Practitioner Jane Doel </a></p><h3>Reasons</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Concept</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://snomed.info/sct 182992009}\">Treatment completed (situation)</span></td></tr></table><p><b>note</b>: </p><blockquote><div><p>PGX panel ordered prior to initiating warfarin therapy to guide dosing based on CYP2C9 and VKORC1 genotype.</p>\n</div></blockquote><p><b>description</b>: </p><div><p>Pharmacogenomics sequencing panel targeting protein-coding and exon-splicing regions of CYP2C19, CYP2C9, and VKORC1 to inform drug selection and dosing.</p>\n</div><blockquote><p><b>analysis</b></p><p><b>identifier</b>: <code>http://example.org/identifiers/genomicAnalyses</code>/urn:uuid:pgx-analysis-0001 (use: temp, )</p><p><b>methodType</b>: <span title=\"Codes:{http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-methodtype sequence-analysis-of-the-entire-coding-region}\">Sequence analysis of the entire coding region</span></p><p><b>changeType</b>: <span title=\"Codes:{http://www.sequenceontology.org SO:0001483}\">SNV</span>, <span title=\"Codes:{http://www.sequenceontology.org SO:0001019}\">copy_number_variation</span></p><p><b>genomeBuild</b>: <span title=\"Codes:{http://loinc.org LA26806-2}\">GRCh38</span></p><p><b>genomicSourceClass</b>: <span title=\"Codes:{http://loinc.org LA6683-2}\">Germline</span></p><p><b>title</b>: PGX Targeted Gene Panel - Sequencing Analysis</p><p><b>specimen</b>: <a href=\"Specimen-pgxSpecimen.html\">Specimen: identifier = http://example.org/identifiers/specimens#pgx-spec-001; status = available; type = Blood specimen (specimen); receivedTime = 2020-12-20 10:00:00+0000</a></p><p><b>date</b>: 2021-01-01 01:01:10-0600</p><p><b>note</b>: </p><blockquote><div><p>Sequencing coverage of 100% achieved across all targeted regions.</p>\n</div></blockquote><h3>Metrics</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>SequencingCoverage</b></td><td><b>Description</b></td></tr><tr><td style=\"display: none\">*</td><td>100 %<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code% = '%')</span></td><td>100% coverage of protein-coding and exon-splicing regions for all three genes.</td></tr></table><blockquote><p><b>genomicRegion</b></p><p><b>type</b>: <span title=\"Codes:{http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype studied}\">Studied</span></p><h3>Locus</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Concept</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:2621}\">protein-coding and exon-splicing regions of CYP2C19</span></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:2623}\">protein-coding and exon-splicing regions of CYP2C9</span></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:23663}\">protein-coding and exon-splicing regions of VKORC1</span></td></tr></table></blockquote><blockquote><p><b>genomicRegion</b></p><p><b>type</b>: <span title=\"Codes:{http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype called}\">Called</span></p><h3>Locus</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Concept</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:2621}\">CYP2C19</span></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:2623}\">CYP2C9</span></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://www.genenames.org HGNC:23663}\">VKORC1</span></td></tr></table></blockquote><h3>Outputs</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>File</b></td><td><b>Type</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"DocumentReference-pgxVCFfile.html\">DocumentReference: identifier = http://example.org/identifiers/files#pgx-vcf-001; status = current; docStatus = final; description = VCF file containing PGX variant calls for CYP2C19, CYP2C9, and VKORC1; securityLabel = Restricted</a></td><td><span title=\"Codes:{http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-dataformat vcf}\">VCF</span></td></tr></table><h3>Performers</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Actor</b></td><td><b>Role</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"Practitioner-practitioner02.html\">Practitioner Jane Doel </a></td><td><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ParticipationType PRF}\">Performer</span></td></tr></table><h3>Devices</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Device</b></td><td><b>Function</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"Device-NGS-device.html\">Device: identifier = http://example.org/identifiers/devices#11111; status = active; manufacturer = Illumina; type = Device (physical object)</a></td><td><span title=\"Codes:{http://loinc.org LA26398-0}\">Sequencing</span></td></tr></table></blockquote></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:identifier ( [
     fhir:use [ fhir:v "temp" ] ;
     fhir:system [
       fhir:v "http://example.org/identifiers/genomicstudies"^^xsd:anyURI ;
       fhir:l <http://example.org/identifiers/genomicstudies>
     ] ;
     fhir:value [ fhir:v "urn:uuid:pgx-study-0001" ]
  ] ) ; # 
#        Pharmacogenomics (PGX) targeted gene panel study.
#        Germline sequencing of CYP2C19, CYP2C9, and VKORC1 protein-coding and
#        exon-splicing regions to guide drug dosing decisions.
#        Demonstrates: coded gene genomicRegion.studied (HGNC), genomicRegion.called, metrics (sequencing coverage),
#        germline genomicSourceClass.
#    
  fhir:status [ fhir:v "available"] ; # 
  fhir:type ( [
     fhir:coding ( [
       a sct:405825005 ;
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "405825005" ] ;
       fhir:display [ fhir:v "Molecular genetic test (procedure)" ]
     ] )
  ] ) ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/uv/cg-incubator/Patient/pgxPatient> ;
     fhir:reference [ fhir:v "Patient/pgxPatient" ]
  ] ; # 
  fhir:startDate [ fhir:v "2021-01-01"^^xsd:date] ; # 
  fhir:basedOn ( [
     fhir:l <http://hl7.org/fhir/uv/cg-incubator/ServiceRequest/pgxServiceRequest> ;
     fhir:reference [ fhir:v "ServiceRequest/pgxServiceRequest" ]
  ] ) ; # 
  fhir:interpreter ( [
     fhir:l <http://hl7.org/fhir/uv/cg-incubator/Practitioner/practitioner02> ;
     fhir:reference [ fhir:v "Practitioner/practitioner02" ]
  ] ) ; # 
  fhir:reason ( [
     fhir:concept [
       fhir:coding ( [
         a sct:182992009 ;
         fhir:system [
           fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
           fhir:l <http://snomed.info/sct>
         ] ;
         fhir:code [ fhir:v "182992009" ] ;
         fhir:display [ fhir:v "Treatment completed (situation)" ]
       ] )
     ]
  ] ) ; # 
  fhir:note ( [
     fhir:text [ fhir:v "PGX panel ordered prior to initiating warfarin therapy to guide dosing based on CYP2C9 and VKORC1 genotype." ]
  ] ) ; # 
  fhir:description [ fhir:v "Pharmacogenomics sequencing panel targeting protein-coding and exon-splicing regions of CYP2C19, CYP2C9, and VKORC1 to inform drug selection and dosing."] ; # 
  fhir:analysis ( [
     fhir:identifier ( [
       fhir:use [ fhir:v "temp" ] ;
       fhir:system [
         fhir:v "http://example.org/identifiers/genomicAnalyses"^^xsd:anyURI ;
         fhir:l <http://example.org/identifiers/genomicAnalyses>
       ] ;
       fhir:value [ fhir:v "urn:uuid:pgx-analysis-0001" ]
     ] ) ;
     fhir:methodType ( [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-methodtype"^^xsd:anyURI ;
           fhir:l <http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-methodtype>
         ] ;
         fhir:code [ fhir:v "sequence-analysis-of-the-entire-coding-region" ] ;
         fhir:display [ fhir:v "Sequence analysis of the entire coding region" ]
       ] )
     ] ) ;
     fhir:changeType ( [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://www.sequenceontology.org"^^xsd:anyURI ;
           fhir:l <http://www.sequenceontology.org>
         ] ;
         fhir:code [ fhir:v "SO:0001483" ] ;
         fhir:display [ fhir:v "SNV" ]
       ] )
     ] [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://www.sequenceontology.org"^^xsd:anyURI ;
           fhir:l <http://www.sequenceontology.org>
         ] ;
         fhir:code [ fhir:v "SO:0001019" ] ;
         fhir:display [ fhir:v "copy_number_variation" ]
       ] )
     ] ) ;
     fhir:genomeBuild [
       fhir:coding ( [
         a loinc:LA26806-2 ;
         fhir:system [
           fhir:v "http://loinc.org"^^xsd:anyURI ;
           fhir:l <http://loinc.org>
         ] ;
         fhir:code [ fhir:v "LA26806-2" ] ;
         fhir:display [ fhir:v "GRCh38" ]
       ] )
     ] ;
     fhir:genomicSourceClass [
       fhir:coding ( [
         a loinc:LA6683-2 ;
         fhir:system [
           fhir:v "http://loinc.org"^^xsd:anyURI ;
           fhir:l <http://loinc.org>
         ] ;
         fhir:code [ fhir:v "LA6683-2" ] ;
         fhir:display [ fhir:v "Germline" ]
       ] )
     ] ;
     fhir:title [ fhir:v "PGX Targeted Gene Panel - Sequencing Analysis" ] ;
     fhir:specimen ( [
       fhir:l <http://hl7.org/fhir/uv/cg-incubator/Specimen/pgxSpecimen> ;
       fhir:reference [ fhir:v "Specimen/pgxSpecimen" ]
     ] ) ;
     fhir:date [ fhir:v "2021-01-01T01:01:10-06:00"^^xsd:dateTime ] ;
     fhir:note ( [
       fhir:text [ fhir:v "Sequencing coverage of 100% achieved across all targeted regions." ]
     ] ) ;
     fhir:metrics [
       fhir:sequencingCoverage [
         fhir:value [ fhir:v "100"^^xsd:decimal ] ;
         fhir:unit [ fhir:v "%" ] ;
         fhir:system [
           fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
           fhir:l <http://unitsofmeasure.org>
         ] ;
         fhir:code [ fhir:v "%" ]
       ] ;
       fhir:description [ fhir:v "100% coverage of protein-coding and exon-splicing regions for all three genes." ]
     ] ;
     fhir:genomicRegion ( [
       fhir:type [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype>
           ] ;
           fhir:code [ fhir:v "studied" ] ;
           fhir:display [ fhir:v "Studied" ]
         ] )
       ] ;
       fhir:locus ( [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:2621" ] ;
             fhir:display [ fhir:v "CYP2C19" ]
           ] ) ;
           fhir:text [ fhir:v "protein-coding and exon-splicing regions of CYP2C19" ]
         ]
       ] [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:2623" ] ;
             fhir:display [ fhir:v "CYP2C9" ]
           ] ) ;
           fhir:text [ fhir:v "protein-coding and exon-splicing regions of CYP2C9" ]
         ]
       ] [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:23663" ] ;
             fhir:display [ fhir:v "VKORC1" ]
           ] ) ;
           fhir:text [ fhir:v "protein-coding and exon-splicing regions of VKORC1" ]
         ]
       ] )
     ] [
       fhir:type [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-regiontype>
           ] ;
           fhir:code [ fhir:v "called" ] ;
           fhir:display [ fhir:v "Called" ]
         ] )
       ] ;
       fhir:locus ( [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:2621" ] ;
             fhir:display [ fhir:v "CYP2C19" ]
           ] )
         ]
       ] [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:2623" ] ;
             fhir:display [ fhir:v "CYP2C9" ]
           ] )
         ]
       ] [
         fhir:concept [
           fhir:coding ( [
             fhir:system [
               fhir:v "http://www.genenames.org"^^xsd:anyURI ;
               fhir:l <http://www.genenames.org>
             ] ;
             fhir:code [ fhir:v "HGNC:23663" ] ;
             fhir:display [ fhir:v "VKORC1" ]
           ] )
         ]
       ] )
     ] ) ; #  genomicRegion: studied = all three PGx gene targets (protein-coding and exon-splicing regions) 
     fhir:output ( [
       fhir:file [
         fhir:l <http://hl7.org/fhir/uv/cg-incubator/DocumentReference/pgxVCFfile> ;
         fhir:reference [ fhir:v "DocumentReference/pgxVCFfile" ]
       ] ;
       fhir:type [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-dataformat"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/uv/cg-incubator/CodeSystem/genomicstudy-dataformat>
           ] ;
           fhir:code [ fhir:v "vcf" ] ;
           fhir:display [ fhir:v "VCF" ]
         ] )
       ]
     ] ) ;
     fhir:performer ( [
       fhir:actor [
         fhir:l <http://hl7.org/fhir/uv/cg-incubator/Practitioner/practitioner02> ;
         fhir:reference [ fhir:v "Practitioner/practitioner02" ]
       ] ;
       fhir:role [
         fhir:coding ( [
           fhir:system [
             fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"^^xsd:anyURI ;
             fhir:l <http://terminology.hl7.org/CodeSystem/v3-ParticipationType>
           ] ;
           fhir:code [ fhir:v "PRF" ] ;
           fhir:display [ fhir:v "Performer" ]
         ] )
       ]
     ] ) ;
     fhir:device ( [
       fhir:device [
         fhir:l <http://hl7.org/fhir/uv/cg-incubator/Device/NGS-device> ;
         fhir:reference [ fhir:v "Device/NGS-device" ]
       ] ;
       fhir:function [
         fhir:coding ( [
           a loinc:LA26398-0 ;
           fhir:system [
             fhir:v "http://loinc.org"^^xsd:anyURI ;
             fhir:l <http://loinc.org>
           ] ;
           fhir:code [ fhir:v "LA26398-0" ] ;
           fhir:display [ fhir:v "Sequencing" ]
         ] )
       ]
     ] )
  ] ) . # 

<http://hl7.org/fhir/uv/cg-incubator/Patient/pgxPatient> a fhir:Uv .

<http://hl7.org/fhir/uv/cg-incubator/ServiceRequest/pgxServiceRequest> a fhir:Uv .

<http://hl7.org/fhir/uv/cg-incubator/Practitioner/practitioner02> a fhir:Uv .

<http://hl7.org/fhir/uv/cg-incubator/Specimen/pgxSpecimen> a fhir:Uv .

<http://hl7.org/fhir/uv/cg-incubator/DocumentReference/pgxVCFfile> a fhir:Uv .

<http://hl7.org/fhir/uv/cg-incubator/Device/NGS-device> a fhir:Uv .

# -------------------------------------------------------------------------------------

