@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://johnmoehrke.github.io/correction/Observation/ex-observation-food> a fhir:Observation ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "ex-observation-food"] ; # 
  fhir:meta [
     fhir:security ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActReason"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/v3-ActReason>
       ] ;
       fhir:code [ fhir:v "HTEST" ]
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Observation ex-observation-food</b></p><a name=\"ex-observation-food\"> </a><a name=\"hcex-observation-food\"> </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\"/><p style=\"margin-bottom: 0px\">Security Label: test health data (Details: ActReason code HTEST = 'test health data')</p></div><p><b>identifier</b>: <code>http://example.org/observation-identifiers</code>/obs-food-allergy-001</p><p><b>status</b>: Final</p><p><b>category</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/observation-category symptom}\">Allergy</span></p><p><b>code</b>: <span title=\"Codes:{http://loinc.org 48765-2}\">Allergy to food</span></p><p><b>subject</b>: <a href=\"Patient-ex-patient.html\">John Schmidt  Other, DoB: 1923-07-25 ( http://example.org/mrn#123456)</a></p><p><b>effective</b>: 2023-01-15 10:00:00+0000</p><p><b>performer</b>: <a href=\"http://example.org/Practitioner/ex-practitioner\">http://example.org/Practitioner/ex-practitioner</a></p><p><b>value</b>: <span title=\"Codes:{http://snomed.info/sct 235719002}\">Allergy to peanuts</span></p><p><b>interpretation</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation A}\">Abnormal</span></p><p><b>note</b>: </p><blockquote><div><p>Patient has a known allergy to peanuts. Avoid all peanut-containing products.</p>\n</div></blockquote></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:identifier ( [
     fhir:system [
       fhir:v "http://example.org/observation-identifiers"^^xsd:anyURI ;
       fhir:l <http://example.org/observation-identifiers>
     ] ;
     fhir:value [ fhir:v "obs-food-allergy-001" ]
  ] ) ; # 
  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 "symptom" ]
     ] ) ;
     fhir:text [ fhir:v "Allergy" ]
  ] ) ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:48765-2 ;
       fhir:system [
         fhir:v "http://loinc.org"^^xsd:anyURI ;
         fhir:l <http://loinc.org>
       ] ;
       fhir:code [ fhir:v "48765-2" ]
     ] ) ;
     fhir:text [ fhir:v "Allergy to food" ]
  ] ; # 
  fhir:subject [
     fhir:l <http://johnmoehrke.github.io/correction/Patient/ex-patient> ;
     fhir:reference [ fhir:v "Patient/ex-patient" ]
  ] ; # 
  fhir:effective [
     a fhir:DateTime ;
     fhir:v "2023-01-15T10:00:00Z"^^xsd:dateTime
  ] ; # 
  fhir:performer ( [
     fhir:l <http://example.org/Practitioner/ex-practitioner> ;
     fhir:reference [ fhir:v "http://example.org/Practitioner/ex-practitioner" ]
  ] ) ; # 
  fhir:value [
     a fhir:CodeableConcept ;
     fhir:coding ( [
       a sct:235719002 ;
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "235719002" ]
     ] ) ;
     fhir:text [ fhir:v "Allergy to peanuts" ]
  ] ; # 
  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 "A" ]
     ] ) ;
     fhir:text [ fhir:v "Abnormal" ]
  ] ) ; # 
  fhir:note ( [
     fhir:text [ fhir:v "Patient has a known allergy to peanuts. Avoid all peanut-containing products." ]
  ] ) . # 

# -------------------------------------------------------------------------------------

