@prefix fhir: <http://hl7.org/fhir/> .
@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/Encounter/colonoscopy> a fhir:Encounter ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "colonoscopy"] ; # 
  fhir:status [ fhir:v "completed"] ; # 
  fhir:class ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActCode"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/v3-ActCode>
       ] ; #  Inpatient encounter for colonoscopy  
       fhir:code [ fhir:v "IMP" ] ;
       fhir:display [ fhir:v "inpatient encounter" ]
     ] )
  ] ) ; #  Encounter has been completed 
  fhir:type ( [
     fhir:coding ( [
       a sct:73761001 ;
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "73761001" ] ;
       fhir:display [ fhir:v "Colonoscopy (procedure)" ]
     ] ) ;
     fhir:text [ fhir:v "Colonoscopy" ]
  ] ) ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/glossy> ;
     fhir:reference [ fhir:v "Patient/glossy" ] ;
     fhir:display [ fhir:v "Henry Levin the 7th" ]
  ] ; #   
#            Note that this patient record is associated with Organization/2,
#            however the service provider is Organization/1 who contracts 
#            gastroenterology services (in this case performed by Dr Adam).
#         
  fhir:serviceProvider [
     fhir:l <http://hl7.org/fhir/Organization/1> ;
     fhir:reference [ fhir:v "Organization/1" ] ;
     fhir:display [ fhir:v "Gastroenterology @ Acme Hospital" ]
  ] ; # 
  fhir:participant ( [
     fhir:type ( [
       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 "PART" ]
       ] )
     ] ) ;
     fhir:actor [
       fhir:l <http://hl7.org/fhir/Practitioner/example> ;
       fhir:reference [ fhir:v "Practitioner/example" ] ;
       fhir:display [ fhir:v "Dr Adam Careful" ]
     ]
  ] ) ; # 
  fhir:actualPeriod [
     fhir:start [ fhir:v "2013-03-11"^^xsd:date ] ;
     fhir:end [ fhir:v "2013-03-20"^^xsd:date ]
  ] ; # 
  fhir:reason ( [
     fhir:value ( [
       fhir:concept [
         fhir:text [ fhir:v "Routine investigation" ]
       ]
     ] )
  ] ) . # 

<http://hl7.org/fhir/Patient/glossy> a fhir:Patient .

<http://hl7.org/fhir/Organization/1> a fhir:Organization .

<http://hl7.org/fhir/Practitioner/example> a fhir:Practitioner .

# -------------------------------------------------------------------------------------

