@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/Specimen/101> a fhir:Specimen ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "101"] ; # 
  fhir:identifier ( [
     fhir:system [
       fhir:v "http://ehr.acme.org/identifiers/collections"^^xsd:anyURI ;
       fhir:l <http://ehr.acme.org/identifiers/collections>
     ] ; #   a specimen identifier - e.g. assigned when the specimen was taken this is often not done  
     fhir:value [ fhir:v "23234352356" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/v2-0203>
         ] ;
         fhir:code [ fhir:v "ACSN" ] ;
         fhir:display [ fhir:v "Accession ID" ]
       ] )
     ] ;
     fhir:system [
       fhir:v "http://lab.acme.org/specimens/2011"^^xsd:anyURI ;
       fhir:l <http://lab.acme.org/specimens/2011>
     ] ;
     fhir:value [ fhir:v "X352356" ]
  ] ) ; #  text>
#    <status value="generated" />
#    <div xmlns="http://www.w3.org/1999/xhtml">[Put rendering here]</div>
#  </text> 
  fhir:status [ fhir:v "available"] ; # 
  fhir:type [
     fhir:coding ( [
       a sct:122555007 ;
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "122555007" ] ;
       fhir:display [ fhir:v "Venous blood specimen" ]
     ] ) #  \n   Type is a loosely defined field because there is such a lot of variation in how it is used.\n   The principal variation is how much information that could be represented elsewhere is also\n   represented here. For instance, here's some possible types:\n     lithium heparin plasma   (+ .container.additive) (e.g. SNOMED CT 446272009)\n     transfusion bag of blood (+ container.type)\n     Peritoneal lavage        (+ collection.bodySite)\n   If the type includes other fields, it would be normal not to populate the other fields\n\n   Note that this practice is so widespread that it's pointless to try and stop it  
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ] ;
     fhir:display [ fhir:v "Peter Patient" ]
  ] ; # 
  fhir:receivedTime [ fhir:v "2011-03-04T07:03:00Z"^^xsd:dateTime] ; # 
  fhir:request ( [
     fhir:l <http://hl7.org/fhir/ServiceRequest/example> ;
     fhir:reference [ fhir:v "ServiceRequest/example" ] #   this points to the order that caused the sample to be drawn  
  ] ) ; # 
  fhir:collection [
     fhir:collector [
       fhir:l <http://hl7.org/fhir/Practitioner/example> ;
       fhir:reference [ fhir:v "Practitioner/example" ] #   in practice, collecter is almost always recorded  
     ] ;
     fhir:collected [
       a fhir:DateTime ;
       fhir:v "2011-05-30T06:15:00Z"^^xsd:dateTime
     ] ; #   the time of collection is usually required. Usually a point in time, but can be a period\n      (collectedPeriod) if it's a timed collection (e.g. a 24 hour urine)  
     fhir:quantity [
       fhir:value [ fhir:v "6"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "mL" ]
     ] ; #   e.g. full  
     fhir:method [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/v2-0488"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/v2-0488>
         ] ;
         fhir:code [ fhir:v "LNV" ]
       ] )
     ] ; #   method is usually implied by type  
     fhir:bodySite [
       fhir:concept [
         fhir:coding ( [
           a sct:49852007 ;
           fhir:system [
             fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
             fhir:l <http://snomed.info/sct>
           ] ;
           fhir:code [ fhir:v "49852007" ] ;
           fhir:display [ fhir:v "Structure of median cubital vein (body structure)" ]
         ] )
       ]
     ] #   bodysite is usually implied by type too its here to demonstrate its usage to indicating the draw site in this case 
  ] ; # 
  fhir:container ( [
     fhir:device [
       a fhir:Canonical ;
       fhir:v "http://hl7.org/fhir/Device/device-example-specimen-container-green-gel-vacutainer"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/Device/device-example-specimen-container-green-gel-vacutainer>
     ] ;
     fhir:specimenQuantity [
       fhir:value [ fhir:v "3"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "mL" ]
     ] #   if there's only one container, then this value is the same\n     as .collection.quantity (usually). This is for when there is more\n     than one container  
  ] ) ; #  
#      the container identifier is not the same as the specimen identifier
#      usually, it is pre-printed/implanted etc.on the container prior to
#      use. It might a RFID in the container, or it might be a UDI
#      (http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/)
#     
  fhir:note ( [
     fhir:text [ fhir:v "Specimen is grossly lipemic" ]
  ] ) . # 

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

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

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

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

