@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 -------------------------------------------------------------------

#   This example is a fully populated example where a patient reports they are taking a certain medication and has the bottle   

<http://hl7.org/fhir/MedicationStatement/example001> a fhir:MedicationStatement ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "example001"] ; # 
  fhir:contained ( [
     a fhir:Medication ;
     fhir:id [ fhir:v "med0309" ] ;
     fhir:code [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://hl7.org/fhir/sid/ndc"^^xsd:anyURI ;
           fhir:l <http://hl7.org/fhir/sid/ndc>
         ] ;
         fhir:code [ fhir:v "50580-608-02" ] ;
         fhir:display [ fhir:v "Tylenol PM Extra Strength, 1 BOTTLE in 1 CARTON (50580-608-02) > 100 TABLET, FILM COATED in 1 BOTTLE (package)" ]
       ] ) ;
       fhir:text [ fhir:v "Tylenol PM" ]
     ] ;
     fhir:doseForm [
       fhir:coding ( [
         a sct:385057009 ;
         fhir:system [
           fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
           fhir:l <http://snomed.info/sct>
         ] ;
         fhir:code [ fhir:v "385057009" ] ;
         fhir:display [ fhir:v "Film-coated tablet (basic dose form)" ]
       ] )
     ] ;
     fhir:ingredient ( [
       fhir:item [
         fhir:concept [
           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 "315266" ] ;
             fhir:display [ fhir:v "Acetaminophen 500 MG" ]
           ] )
         ]
       ] ;
       fhir:strength [
         a fhir:Ratio ;
         fhir:numerator [
           fhir:value [ fhir:v "500"^^xsd:decimal ] ;
           fhir:system [
             fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
             fhir:l <http://unitsofmeasure.org>
           ] ;
           fhir:code [ fhir:v "mg" ]
         ] ;
         fhir:denominator [
           fhir:value [ fhir:v "1"^^xsd:decimal ] ;
           fhir:system [
             fhir:v "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"^^xsd:anyURI ;
             fhir:l <http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm>
           ] ;
           fhir:code [ fhir:v "TAB" ]
         ]
       ]
     ] [
       fhir:item [
         fhir:concept [
           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 "901813" ] ;
             fhir:display [ fhir:v "Diphenhydramine Hydrochloride 25 mg" ]
           ] )
         ]
       ] ;
       fhir:strength [
         a fhir:Ratio ;
         fhir:numerator [
           fhir:value [ fhir:v "25"^^xsd:decimal ] ;
           fhir:system [
             fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
             fhir:l <http://unitsofmeasure.org>
           ] ;
           fhir:code [ fhir:v "mg" ]
         ] ;
         fhir:denominator [
           fhir:value [ fhir:v "1"^^xsd:decimal ] ;
           fhir:system [
             fhir:v "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm"^^xsd:anyURI ;
             fhir:l <http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm>
           ] ;
           fhir:code [ fhir:v "TAB" ]
         ]
       ]
     ] )
  ] ) ; # 
  fhir:identifier ( [
     fhir:use [ fhir:v "official" ] ;
     fhir:system [
       fhir:v "http://www.bmc.nl/portal/medstatements"^^xsd:anyURI ;
       fhir:l <http://www.bmc.nl/portal/medstatements>
     ] ;
     fhir:value [ fhir:v "12345689" ]
  ] ) ; # 
  fhir:status [ fhir:v "recorded"] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/medication-statement-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/medication-statement-category>
       ] ;
       fhir:code [ fhir:v "inpatient" ] ;
       fhir:display [ fhir:v "Inpatient" ]
     ] )
  ] ) ; # 
  fhir:medication [
     fhir:reference [
       fhir:l <#med0309> ;
       fhir:reference [ fhir:v "#med0309" ]
     ] #   Linked to a RESOURCE Medication  
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/pat1> ;
     fhir:reference [ fhir:v "Patient/pat1" ] ;
     fhir:display [ fhir:v "Donald Duck" ]
  ] ; # 
  fhir:effective [
     a fhir:DateTime ;
     fhir:v "2015-01-23"^^xsd:date
  ] ; # 
  fhir:dateAsserted [ fhir:v "2015-02-22"^^xsd:date] ; # 
  fhir:informationSource ( [
     fhir:l <http://hl7.org/fhir/Patient/pat1> ;
     fhir:reference [ fhir:v "Patient/pat1" ] ;
     fhir:display [ fhir:v "Donald Duck" ]
  ] ) ; # 
  fhir:derivedFrom ( [
     fhir:l <http://hl7.org/fhir/MedicationRequest/medrx002> ;
     fhir:reference [ fhir:v "MedicationRequest/medrx002" ]
  ] ) ; # 
  fhir:reason ( [
     fhir:concept [
       fhir:coding ( [
         a sct:32914008 ;
         fhir:system [
           fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
           fhir:l <http://snomed.info/sct>
         ] ;
         fhir:code [ fhir:v "32914008" ] ;
         fhir:display [ fhir:v "Restless Legs" ]
       ] )
     ]
  ] ) ; # 
  fhir:note ( [
     fhir:text [ fhir:v "Patient indicates they miss the occasional dose" ]
  ] ) ; # 
  fhir:dosage [] . # 

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

<http://hl7.org/fhir/MedicationRequest/medrx002> a fhir:MedicationRequest .

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

