@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/AllergyIntolerance/medication> a fhir:AllergyIntolerance ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "medication"] ; # 
  fhir:clinicalStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical>
       ] ;
       fhir:code [ fhir:v "active" ] ;
       fhir:display [ fhir:v "Active" ]
     ] )
  ] ; # 
  fhir:verificationStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/allergyintolerance-verification>
       ] ;
       fhir:code [ fhir:v "unconfirmed" ] ;
       fhir:display [ fhir:v "Unconfirmed" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/allergy-intolerance-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/allergy-intolerance-category>
       ] ;
       fhir:code [ fhir:v "medication" ] ;
       fhir:display [ fhir:v "Medication" ]
     ] )
  ] ) ; # 
  fhir:criticality [ fhir:v "high"] ; # 
  fhir:code [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://www.nlm.nih.gov/research/umls/rxnorm"^^xsd:anyURI ;
         fhir:l <http://www.nlm.nih.gov/research/umls/rxnorm>
       ] ;
       fhir:code [ fhir:v "7980" ] ;
       fhir:display [ fhir:v "Penicillin G" ]
     ] )
  ] ; # subtance, coded from RxNorm
  fhir:patient [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # the patient that actually has the risk of adverse reaction
  fhir:recordedDate [ fhir:v "2010-03-01"^^xsd:date] ; # the date that this entry was recorded
  fhir:recorder [
     fhir:l <http://hl7.org/fhir/Practitioner/example> ;
     fhir:reference [ fhir:v "Practitioner/example" ]
  ] ; # who made the record / last updated it
  fhir:reaction ( [
     fhir:manifestation ( [
       fhir:concept [
         fhir:coding ( [
           a sct:247472004 ;
           fhir:system [
             fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
             fhir:l <http://snomed.info/sct>
           ] ;
           fhir:code [ fhir:v "247472004" ] ;
           fhir:display [ fhir:v "Hives" ]
         ] )
       ]
     ] )
  ] ) . # 

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

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

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

