@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/Observation/blood-pressure-dar> a fhir:Observation ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "blood-pressure-dar"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://hl7.org/fhir/StructureDefinition/vitalsigns"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/StructureDefinition/vitalsigns>
     ] )
  ] ; # 
  fhir:identifier ( [
     fhir:system [
       fhir:v "urn:ietf:rfc:3986"^^xsd:anyURI ;
       fhir:l <urn:ietf:rfc:3986>
     ] ;
     fhir:value [ fhir:v "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281" ]
  ] ) ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/observation-category>
       ] ;
       fhir:code [ fhir:v "vital-signs" ] ;
       fhir:display [ fhir:v "Vital Signs" ]
     ] )
  ] ) ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:85354-9 ;
       fhir:system [
         fhir:v "http://loinc.org"^^xsd:anyURI ;
         fhir:l <http://loinc.org>
       ] ;
       fhir:code [ fhir:v "85354-9" ] ;
       fhir:display [ fhir:v "Blood pressure panel with all children optional" ]
     ] ) ; #   replaced by 85354-9\n				<coding>\n					<system value=\"http:\/\/loinc.org\"\/>\n					<code value=\"85354-9\"\/>\n					<display value=\"Blood pressure systolic &amp; diastolic\"\/>\n				<\/coding>\n		 
     fhir:text [ fhir:v "Blood pressure systolic & diastolic" ]
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:effective [
     a fhir:DateTime ;
     fhir:v "2012-09-17"^^xsd:date
  ] ; # 
  fhir:performer ( [
     fhir:l <http://hl7.org/fhir/Practitioner/example> ;
     fhir:reference [ fhir:v "Practitioner/example" ]
  ] ) ; # 
  fhir:interpretation ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation>
       ] ;
       fhir:code [ fhir:v "L" ] ;
       fhir:display [ fhir:v "low" ]
     ] ) ;
     fhir:text [ fhir:v "Below low normal" ]
  ] ) ; #     an interpretation offered to the combination observation
#        generally, it would only be appropriate to offer an interpretation
#        of an observation that has no value if it has "COMP" (component)
#        observations    
  fhir:bodySite [
     fhir:coding ( [
       a sct:368209003 ;
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "368209003" ] ;
       fhir:display [ fhir:v "Right arm" ]
     ] )
  ] ; #  The BodySite can be captured in a LOINC code but am showing it here to demonstrate populating the element  
  fhir:component ( [
     fhir:code [
       fhir:coding ( [
         a loinc:8480-6 ;
         fhir:system [
           fhir:v "http://loinc.org"^^xsd:anyURI ;
           fhir:l <http://loinc.org>
         ] ;
         fhir:code [ fhir:v "8480-6" ] ;
         fhir:display [ fhir:v "Systolic blood pressure" ]
       ] [
         a sct:271649006 ;
         fhir:system [
           fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
           fhir:l <http://snomed.info/sct>
         ] ;
         fhir:code [ fhir:v "271649006" ] ;
         fhir:display [ fhir:v "Systolic blood pressure" ]
       ] [
         fhir:system [
           fhir:v "http://acme.org/devices/clinical-codes"^^xsd:anyURI ;
           fhir:l <http://acme.org/devices/clinical-codes>
         ] ;
         fhir:code [ fhir:v "bp-s" ] ;
         fhir:display [ fhir:v "Systolic Blood pressure" ]
       ] ) #     LOINC -code    
     ] ; #  \n           Observations are often coded in multiple code systems.\n           - LOINC provides a very specific code (though not more specific in this particular case)\n           - snomed provides a clinically relevant code that is usually less granular than LOINC\n           - the source system provides its own code, which may be less or more granular than LOINC\n\nthis is shown here to demonstrate  the concept of translations within the codeableConcept datatype. The diastolic code below only has a LOINC code\n            
     fhir:value [
       a fhir:Quantity ;
       fhir:value [ fhir:v "107"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "mmHg" ] ;
       fhir:system [
         fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
         fhir:l <http://unitsofmeasure.org>
       ] ;
       fhir:code [ fhir:v "mm[Hg]" ]
     ]
  ] [
     fhir:code [
       fhir:coding ( [
         a loinc:8462-4 ;
         fhir:system [
           fhir:v "http://loinc.org"^^xsd:anyURI ;
           fhir:l <http://loinc.org>
         ] ;
         fhir:code [ fhir:v "8462-4" ] ;
         fhir:display [ fhir:v "Diastolic blood pressure" ]
       ] )
     ] ;
     fhir:dataAbsentReason [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/data-absent-reason"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/data-absent-reason>
         ] ;
         fhir:code [ fhir:v "not-performed" ] ;
         fhir:display [ fhir:v "Not Performed" ]
       ] )
     ] #     Here the Diastolic measurement is missing and we give a reason using the DataAbsentReason element    
  ] ) . #    	Should have a refrange as well   

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

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

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

