@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/Bundle/bundle-response-simplesummary> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "bundle-response-simplesummary"] ; # 
  fhir:type [ fhir:v "batch-response"] ; # 
  fhir:entry ( [
     fhir:fullUrl [
       fhir:v "http://example.org/fhir/Patient/example"^^xsd:anyURI ;
       fhir:l <http://example.org/fhir/Patient/example>
     ] ;
     fhir:resource ( <http://example.org/fhir/Patient/example> ) ;
     fhir:response [
       fhir:status [ fhir:v "200" ] ;
       fhir:etag [ fhir:v "W/1" ] ;
       fhir:lastModified [ fhir:v "2018-11-12T03:35:20.717Z"^^xsd:dateTime ]
     ]
  ] [
     fhir:resource ( [
       a fhir:Bundle ;
       fhir:id [ fhir:v "2c2fb771-6c4b-4df8-89b2-47a1178e7c" ] ;
       fhir:meta [
         fhir:lastUpdated [ fhir:v "2018-11-12T05:42:49.445Z"^^xsd:dateTime ]
       ] ;
       fhir:type [ fhir:v "searchset" ] ;
       fhir:total [ fhir:v "4"^^xsd:nonNegativeInteger ] ;
       fhir:link ( [
         fhir:relation [ fhir:v "self" ] ;
         fhir:url [
           fhir:v "http://test.fhir.org/r5/Condition?_format=application/fhir+xml&search-id=36aac5c3-a9f6-4c3a-bf94-24d32ed604&&patient=example&_sort=_id"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Condition?_format=application/fhir+xml&search-id=36aac5c3-a9f6-4c3a-bf94-24d32ed604&&patient=example&_sort=_id>
         ]
       ] ) ;
       fhir:entry ( [
         fhir:fullUrl [
           fhir:v "http://test.fhir.org/r5/Condition/example"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Condition/example>
         ] ;
         fhir:resource ( <http://test.fhir.org/r5/Condition/example> ) ;
         fhir:search [
           fhir:mode [ fhir:v "match" ]
         ]
       ] [
         fhir:fullUrl [
           fhir:v "http://test.fhir.org/r5/Condition/example2"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Condition/example2>
         ] ;
         fhir:resource ( <http://test.fhir.org/r5/Condition/example2> ) ;
         fhir:search [
           fhir:mode [ fhir:v "match" ]
         ]
       ] [
         fhir:fullUrl [
           fhir:v "http://test.fhir.org/r5/Condition/family-history"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Condition/family-history>
         ] ;
         fhir:resource ( <http://test.fhir.org/r5/Condition/family-history> ) ;
         fhir:search [
           fhir:mode [ fhir:v "match" ]
         ]
       ] [
         fhir:fullUrl [
           fhir:v "http://test.fhir.org/r5/Condition/stroke"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Condition/stroke>
         ] ;
         fhir:resource ( <http://test.fhir.org/r5/Condition/stroke> ) ;
         fhir:search [
           fhir:mode [ fhir:v "match" ]
         ]
       ] )
     ] ) ;
     fhir:response [
       fhir:status [ fhir:v "200" ] ;
       fhir:etag [ fhir:v "W/1" ] ;
       fhir:lastModified [ fhir:v "2018-11-12T03:35:20.717Z"^^xsd:dateTime ]
     ]
  ] [
     fhir:resource ( [
       a fhir:Bundle ;
       fhir:id [ fhir:v "86846953-60dd-47ba-b37a-7e7d7e3312" ] ;
       fhir:meta [
         fhir:lastUpdated [ fhir:v "2018-11-12T05:42:49.476Z"^^xsd:dateTime ]
       ] ;
       fhir:type [ fhir:v "searchset" ] ;
       fhir:total [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:link ( [
         fhir:relation [ fhir:v "self" ] ;
         fhir:url [
           fhir:v "http://test.fhir.org/r5/MedicationStatement?_format=application/fhir+xml&search-id=0f08b401-5120-4444-9a83-3fd21d33df&&patient=example&_sort=_id"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/MedicationStatement?_format=application/fhir+xml&search-id=0f08b401-5120-4444-9a83-3fd21d33df&&patient=example&_sort=_id>
         ]
       ] )
     ] ) ;
     fhir:response [
       fhir:status [ fhir:v "200" ] ;
       fhir:etag [ fhir:v "W/1" ] ;
       fhir:lastModified [ fhir:v "2018-11-12T03:35:20.717Z"^^xsd:dateTime ]
     ]
  ] [
     fhir:resource ( [
       a fhir:Bundle ;
       fhir:id [ fhir:v "4bafe9c4-ba53-4d7b-89d0-d92ee0859a" ] ;
       fhir:meta [
         fhir:lastUpdated [ fhir:v "2018-11-12T05:42:49.498Z"^^xsd:dateTime ]
       ] ;
       fhir:type [ fhir:v "searchset" ] ;
       fhir:total [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
       fhir:link ( [
         fhir:relation [ fhir:v "self" ] ;
         fhir:url [
           fhir:v "http://test.fhir.org/r5/Observation?_format=application/fhir+xml&search-id=50df0414-1375-48a4-ba1e-66f580360a&&patient=example&code=http%3A//loinc.org%7C55284%2D4&date=ge2015%2D01%2D01&_sort=_id"^^xsd:anyURI ;
           fhir:l <http://test.fhir.org/r5/Observation?_format=application/fhir+xml&search-id=50df0414-1375-48a4-ba1e-66f580360a&&patient=example&code=http%3A//loinc.org%7C55284%2D4&date=ge2015%2D01%2D01&_sort=_id>
         ]
       ] )
     ] ) ;
     fhir:response [
       fhir:status [ fhir:v "200" ] ;
       fhir:etag [ fhir:v "W/1" ] ;
       fhir:lastModified [ fhir:v "2018-11-12T03:35:20.717Z"^^xsd:dateTime ]
     ]
  ] ) . # 

<http://example.org/fhir/Patient/example> a fhir:Patient ;
  fhir:id [ fhir:v "example"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2018-11-12T03:35:20.715Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n                        <table>\n                            <tbody>\n                                <tr>\n                                    <td>Name</td>\n                                    <td>Peter James \n                                        <b>Chalmers</b> (\"Jim\")\n                                    </td>\n                                </tr>\n                                <tr>\n                                    <td>Address</td>\n                                    <td>534 Erewhon, Pleasantville, Vic, 3999</td>\n                                </tr>\n                                <tr>\n                                    <td>Contacts</td>\n                                    <td>Home: unknown. Work: (03) 5555 6473</td>\n                                </tr>\n                                <tr>\n                                    <td>Id</td>\n                                    <td>MRN: 12345 (Acme Healthcare)</td>\n                                </tr>\n                            </tbody>\n                        </table>\n                    </div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:identifier ( [
     fhir:use [ fhir:v "usual" ] ;
     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 "MR" ]
       ] )
     ] ;
     fhir:system [
       fhir:v "urn:oid:1.2.36.146.595.217.0.1"^^xsd:anyURI ;
       fhir:l <urn:oid:1.2.36.146.595.217.0.1>
     ] ;
     fhir:value [ fhir:v "12345" ] ;
     fhir:period [
       fhir:start [ fhir:v "2001-05-06"^^xsd:date ]
     ] ;
     fhir:assigner [
       fhir:display [ fhir:v "Acme Healthcare" ]
     ]
  ] ) ; # 
  fhir:active [ fhir:v true] ; # 
  fhir:name ( [
     fhir:use [ fhir:v "official" ] ;
     fhir:family [ fhir:v "Chalmers" ] ;
     fhir:given ( [ fhir:v "Peter" ] [ fhir:v "James" ] )
  ] [
     fhir:use [ fhir:v "usual" ] ;
     fhir:given ( [ fhir:v "Jim" ] )
  ] [
     fhir:use [ fhir:v "maiden" ] ;
     fhir:family [ fhir:v "Windsor" ] ;
     fhir:given ( [ fhir:v "Peter" ] [ fhir:v "James" ] ) ;
     fhir:period [
       fhir:end [ fhir:v "2002"^^xsd:gYear ]
     ]
  ] ) ; # 
  fhir:telecom ( [
     fhir:use [ fhir:v "home" ]
  ] [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "(03) 5555 6473" ] ;
     fhir:use [ fhir:v "work" ] ;
     fhir:rank [ fhir:v "1"^^xsd:positiveInteger ]
  ] [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "(03) 3410 5613" ] ;
     fhir:use [ fhir:v "mobile" ] ;
     fhir:rank [ fhir:v "2"^^xsd:positiveInteger ]
  ] [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "(03) 5555 8834" ] ;
     fhir:use [ fhir:v "old" ] ;
     fhir:period [
       fhir:end [ fhir:v "2014"^^xsd:gYear ]
     ]
  ] ) ; # 
  fhir:gender [ fhir:v "male"] ; # 
  fhir:birthDate [
     fhir:v "1974-12-25"^^xsd:date ;
     fhir:extension ( [
       fhir:url [
         fhir:v "http://hl7.org/fhir/StructureDefinition/patient-birthTime"^^xsd:anyURI ;
         fhir:l <http://hl7.org/fhir/StructureDefinition/patient-birthTime>
       ] ;
       fhir:value [
         a fhir:DateTime ;
         fhir:v "1974-12-25T14:35:45-05:00"^^xsd:dateTime
       ]
     ] )
  ] ; # 
  fhir:deceased [
     a fhir:Boolean ;
     fhir:v false
  ] ; # 
  fhir:address ( [
     fhir:use [ fhir:v "home" ] ;
     fhir:type [ fhir:v "both" ] ;
     fhir:text [ fhir:v "534 Erewhon St PeasantVille, Rainbow, Vic  3999" ] ;
     fhir:line ( [ fhir:v "534 Erewhon St" ] ) ;
     fhir:city [ fhir:v "PleasantVille" ] ;
     fhir:district [ fhir:v "Rainbow" ] ;
     fhir:state [ fhir:v "Vic" ] ;
     fhir:postalCode [ fhir:v "3999" ] ;
     fhir:period [
       fhir:start [ fhir:v "1974-12-25"^^xsd:date ]
     ]
  ] ) ; # 
  fhir:contact ( [
     fhir:relationship ( [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/v2-0131"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/v2-0131>
         ] ;
         fhir:code [ fhir:v "N" ]
       ] )
     ] ) ;
     fhir:name [
       fhir:family [
         fhir:v "du Marché" ;
         fhir:extension ( [
           fhir:url [
             fhir:v "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix"^^xsd:anyURI ;
             fhir:l <http://hl7.org/fhir/StructureDefinition/humanname-own-prefix>
           ] ;
           fhir:value [
             a fhir:String ;
             fhir:v "VV"
           ]
         ] )
       ] ;
       fhir:given ( [ fhir:v "Bénédicte" ] )
     ] ;
     fhir:telecom ( [
       fhir:system [ fhir:v "phone" ] ;
       fhir:value [ fhir:v "+33 (237) 998327" ]
     ] ) ;
     fhir:address [
       fhir:use [ fhir:v "home" ] ;
       fhir:type [ fhir:v "both" ] ;
       fhir:line ( [ fhir:v "534 Erewhon St" ] ) ;
       fhir:city [ fhir:v "PleasantVille" ] ;
       fhir:district [ fhir:v "Rainbow" ] ;
       fhir:state [ fhir:v "Vic" ] ;
       fhir:postalCode [ fhir:v "3999" ] ;
       fhir:period [
         fhir:start [ fhir:v "1974-12-25"^^xsd:date ]
       ]
     ] ;
     fhir:gender [ fhir:v "female" ] ;
     fhir:period [
       fhir:start [ fhir:v "2012"^^xsd:gYear ]
     ]
  ] ) ; # 
  fhir:managingOrganization [
     fhir:l <http://hl7.org/fhir/Organization/1> ;
     fhir:reference [ fhir:v "Organization/1" ]
  ] . # 

<http://hl7.org/fhir/Organization/1> a fhir:Organization .

<http://test.fhir.org/r5/Condition/example> a fhir:Condition ;
  fhir:id [ fhir:v "example"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2018-11-12T03:34:46.552Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">Severe burn of left ear (Date: 24-May 2012)</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:clinicalStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-clinical"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-clinical>
       ] ;
       fhir:code [ fhir:v "active" ]
     ] )
  ] ; # 
  fhir:verificationStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-ver-status"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-ver-status>
       ] ;
       fhir:code [ fhir:v "confirmed" ]
     ] )
  ] ; # 
  fhir:category ( [
     a sct:439401001 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-category>
       ] ;
       fhir:code [ fhir:v "encounter-diagnosis" ] ;
       fhir:display [ fhir:v "Encounter Diagnosis" ]
     ] [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "439401001" ] ;
       fhir:display [ fhir:v "Diagnosis" ]
     ] )
  ] ) ; # 
  fhir:severity [
     a sct:24484000 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "24484000" ] ;
       fhir:display [ fhir:v "Severe" ]
     ] )
  ] ; # 
  fhir:code [
     a sct:39065001 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "39065001" ] ;
       fhir:display [ fhir:v "Burn of ear" ]
     ] ) ;
     fhir:text [ fhir:v "Burnt Ear" ]
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:onset [
     a fhir:DateTime ;
     fhir:v "2012-05-24"^^xsd:date
  ] . # 

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

<http://test.fhir.org/r5/Condition/example2> a fhir:Condition ;
  fhir:id [ fhir:v "example2"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2018-11-12T03:34:46.626Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">Mild Asthma (Date: 12-Nov 2012)</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:clinicalStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-clinical"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-clinical>
       ] ;
       fhir:code [ fhir:v "active" ]
     ] )
  ] ; # 
  fhir:verificationStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-ver-status"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-ver-status>
       ] ;
       fhir:code [ fhir:v "confirmed" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-category>
       ] ;
       fhir:code [ fhir:v "problem-list-item" ] ;
       fhir:display [ fhir:v "Problem List Item" ]
     ] )
  ] ) ; # 
  fhir:severity [
     a sct:255604002 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "255604002" ] ;
       fhir:display [ fhir:v "Mild" ]
     ] )
  ] ; # 
  fhir:code [
     fhir:text [ fhir:v "Asthma" ]
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:onset [
     a fhir:String ;
     fhir:v "approximately November 2012"
  ] . # 

<http://test.fhir.org/r5/Condition/family-history> a fhir:Condition ;
  fhir:id [ fhir:v "family-history"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2018-11-12T03:34:47.274Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">Family history of cancer of colon</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:clinicalStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-clinical"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-clinical>
       ] ;
       fhir:code [ fhir:v "active" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-category>
       ] ;
       fhir:code [ fhir:v "problem-list-item" ] ;
       fhir:display [ fhir:v "Problem List Item" ]
     ] )
  ] ) ; # 
  fhir:code [
     a sct:312824007 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "312824007" ] ;
       fhir:display [ fhir:v "Family history of cancer of colon" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] . # 

<http://test.fhir.org/r5/Condition/stroke> a fhir:Condition ;
  fhir:id [ fhir:v "stroke"] ; # 
  fhir:meta [
     fhir:versionId [ fhir:v "1" ] ;
     fhir:lastUpdated [ fhir:v "2018-11-12T03:34:47.337Z"^^xsd:dateTime ]
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ischemic stroke, July 18, 2010</div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:clinicalStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-clinical"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-clinical>
       ] ;
       fhir:code [ fhir:v "active" ]
     ] )
  ] ; # 
  fhir:verificationStatus [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-ver-status"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-ver-status>
       ] ;
       fhir:code [ fhir:v "confirmed" ]
     ] )
  ] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/condition-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/condition-category>
       ] ;
       fhir:code [ fhir:v "encounter-diagnosis" ] ;
       fhir:display [ fhir:v "Encounter Diagnosis" ]
     ] )
  ] ) ; # 
  fhir:code [
     a sct:422504002 ;
     fhir:coding ( [
       fhir:system [
         fhir:v "http://snomed.info/sct"^^xsd:anyURI ;
         fhir:l <http://snomed.info/sct>
       ] ;
       fhir:code [ fhir:v "422504002" ] ;
       fhir:display [ fhir:v "Ischemic stroke (disorder)" ]
     ] ) ;
     fhir:text [ fhir:v "Stroke" ]
  ] ; # 
  fhir:subject [
     fhir:l <http://hl7.org/fhir/Patient/example> ;
     fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:onset [
     a fhir:DateTime ;
     fhir:v "2010-07-18"^^xsd:date
  ] . # 

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

