@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <https://loinc.org/rdf/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@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://openhie.org/fhir/sri-lanka/Bundle/HIMS-Blood-Pressure-Bundle> a fhir:Bundle ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "HIMS-Blood-Pressure-Bundle"] ; # 
  fhir:type [ fhir:v "transaction"] ; # 
  fhir:entry ( [
     fhir:fullUrl [ fhir:v "Observation/BloodPressureExample"^^xsd:anyURI ] ;
     fhir:resource ( <Observation/BloodPressureExample> ) ;
     fhir:request [
       fhir:method [ fhir:v "PUT" ] ;
       fhir:url [ fhir:v "Observation/BloodPressureExample"^^xsd:anyURI ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "Encounter/TargetFacilityEncounterExample"^^xsd:anyURI ] ;
     fhir:resource ( <Encounter/TargetFacilityEncounterExample> ) ;
     fhir:request [
       fhir:method [ fhir:v "PUT" ] ;
       fhir:url [ fhir:v "Encounter/TargetFacilityEncounterExample"^^xsd:anyURI ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "Patient/HIMSPatientExample"^^xsd:anyURI ] ;
     fhir:resource ( <Patient/HIMSPatientExample> ) ;
     fhir:request [
       fhir:method [ fhir:v "PUT" ] ;
       fhir:url [ fhir:v "Patient/HIMSPatientExample"^^xsd:anyURI ]
     ]
  ] [
     fhir:fullUrl [ fhir:v "Practitioner/GeneralPractitionerExample"^^xsd:anyURI ] ;
     fhir:resource ( <Practitioner/GeneralPractitionerExample> ) ;
     fhir:request [
       fhir:method [ fhir:v "PUT" ] ;
       fhir:url [ fhir:v "Practitioner/GeneralPractitionerExample"^^xsd:anyURI ]
     ]
  ] ) . # 

<Observation/BloodPressureExample> a fhir:Observation ;
  fhir:id [ fhir:v "BloodPressureExample"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/blood-pressure"^^xsd:anyURI ;
       fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/blood-pressure>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b><a name=\"BloodPressureExample\"> </a></p><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\">Resource Observation &quot;BloodPressureExample&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-blood-pressure.html\">Blood Pressure Observation</a></p></div><p><b>status</b>: final</p><p><b>category</b>: Vital Signs <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.3.0/CodeSystem-observation-category.html\">Observation Category Codes</a>#vital-signs)</span></p><p><b>code</b>: Blood Pressure <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#85354-9)</span></p><p><b>subject</b>: <a href=\"#Patient_HIMSPatientExample\">See above (Patient/HIMSPatientExample)</a></p><p><b>encounter</b>: <a href=\"#Encounter_TargetFacilityEncounterExample\">See above (Encounter/TargetFacilityEncounterExample)</a></p><p><b>effective</b>: 2022-11-30</p><p><b>performer</b>: </p><ul><li><a href=\"Organization-OrganizationExample.html\">Organization/OrganizationExample</a> &quot;Some Health Facility&quot;</li><li><a href=\"#Practitioner_GeneralPractitionerExample\">See above (Practitioner/GeneralPractitionerExample)</a></li></ul><blockquote><p><b>component</b></p><p><b>code</b>: 8480-6 <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#8480-6)</span></p><p><b>value</b>: 106 mmHg<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM code mm[Hg] = 'mm[Hg]')</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: 8462-4 <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#8462-4)</span></p><p><b>value</b>: 60 mmHg<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM code mm[Hg] = 'mm[Hg]')</span></p></blockquote></div>"
  ] ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "vital-signs" ]
     ] )
  ] ) ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:85354-9 ;
       fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "85354-9" ]
     ] ) ;
     fhir:text [ fhir:v "Blood Pressure" ]
  ] ; # 
  fhir:subject [
     fhir:link <http://openhie.org/fhir/sri-lanka/Patient/HIMSPatientExample> ;
     fhir:reference [ fhir:v "Patient/HIMSPatientExample" ]
  ] ; # 
  fhir:encounter [
     fhir:link <http://openhie.org/fhir/sri-lanka/Encounter/TargetFacilityEncounterExample> ;
     fhir:reference [ fhir:v "Encounter/TargetFacilityEncounterExample" ]
  ] ; # 
  fhir:effective [ fhir:v "2022-11-30"^^xsd:date] ; # 
  fhir:performer ( [
     fhir:link <http://openhie.org/fhir/sri-lanka/Organization/OrganizationExample> ;
     fhir:reference [ fhir:v "Organization/OrganizationExample" ]
  ] [
     fhir:link <http://openhie.org/fhir/sri-lanka/Practitioner/GeneralPractitionerExample> ;
     fhir:reference [ fhir:v "Practitioner/GeneralPractitionerExample" ]
  ] ) ; # 
  fhir:component ( [
     fhir:code [
       fhir:coding ( [
         a loinc:8480-6 ;
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "8480-6" ]
       ] )
     ] ;
     fhir:value [
       a fhir:Quantity ;
       fhir:value [ fhir:v "106"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "mmHg" ] ;
       fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "mm[Hg]" ]
     ]
  ] [
     fhir:code [
       fhir:coding ( [
         a loinc:8462-4 ;
         fhir:system [ fhir:v "http://loinc.org"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "8462-4" ]
       ] )
     ] ;
     fhir:value [
       a fhir:Quantity ;
       fhir:value [ fhir:v "60"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "mmHg" ] ;
       fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "mm[Hg]" ]
     ]
  ] ) . # 

<Encounter/TargetFacilityEncounterExample> a fhir:Encounter ;
  fhir:id [ fhir:v "TargetFacilityEncounterExample"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/target-facility-encounter"^^xsd:anyURI ;
       fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/target-facility-encounter>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Encounter</b><a name=\"TargetFacilityEncounterExample\"> </a></p><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\">Resource Encounter &quot;TargetFacilityEncounterExample&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-target-facility-encounter.html\">Target Facility Encounter</a></p></div><p><b>status</b>: finished</p><p><b>class</b>: ambulatory (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code AMB = 'ambulatory', stated as 'null')</p><p><b>subject</b>: <a href=\"#Patient_HIMSPatientExample\">See above (Patient/HIMSPatientExample)</a></p><h3>Participants</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Individual</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"#Practitioner_GeneralPractitionerExample\">See above (Practitioner/GeneralPractitionerExample)</a></td></tr></table><p><b>period</b>: 2022-12-01 --&gt; 2023-01-20</p><p><b>reasonCode</b>: 140004 <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#140004)</span></p><h3>Locations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Location</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"Location-ProvidersLocationExample.html\">Location/ProvidersLocationExample</a> &quot;Name for the location&quot;</td></tr></table></div>"
  ] ; # 
  fhir:status [ fhir:v "finished"] ; # 
  fhir:class [
     fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v3-ActCode"^^xsd:anyURI ] ;
     fhir:code [ fhir:v "AMB" ]
  ] ; # 
  fhir:subject [
     fhir:link <http://openhie.org/fhir/sri-lanka/Patient/HIMSPatientExample> ;
     fhir:reference [ fhir:v "Patient/HIMSPatientExample" ]
  ] ; # 
  fhir:participant ( [
     fhir:individual [
       fhir:link <http://openhie.org/fhir/sri-lanka/Practitioner/GeneralPractitionerExample> ;
       fhir:reference [ fhir:v "Practitioner/GeneralPractitionerExample" ]
     ]
  ] ) ; # 
  fhir:period [
     fhir:start [ fhir:v "2022-12-01"^^xsd:date ] ;
     fhir:end [ fhir:v "2023-01-20"^^xsd:date ]
  ] ; # 
  fhir:reasonCode ( [
     fhir:coding ( [
       a sct:140004 ;
       fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
       fhir:code [ fhir:v "140004" ]
     ] )
  ] ) ; # 
  fhir:location ( [
     fhir:location [
       fhir:link <http://openhie.org/fhir/sri-lanka/Location/ProvidersLocationExample> ;
       fhir:reference [ fhir:v "Location/ProvidersLocationExample" ]
     ]
  ] ) . # 

<Patient/HIMSPatientExample> a fhir:Patient ;
  fhir:id [ fhir:v "HIMSPatientExample"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/hims-patient"^^xsd:anyURI ;
       fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/hims-patient>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Patient</b><a name=\"HIMSPatientExample\"> </a></p><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\">Resource Patient &quot;HIMSPatientExample&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-hims-patient.html\">HIMS Patient</a></p></div><p><b>identifier</b>: Personal Health Number: personal health number, Passport number: Passport-1, Passport number: Passport-2, Driver's license number: Drivers license-1, Driver's license number: Drivers license-2, National identity number: National identity number-1, National identity number: National identity number-2, Senior Citizen Number: Senior citizen number-1, Senior Citizen Number: Senior citizen number-2</p><p><b>name</b>: Mr. Mike John Smith (OFFICIAL)</p><p><b>telecom</b>: <a href=\"tel:+27829999999\">+27829999999</a>, <a href=\"mailto:someone@something.com\">someone@something.com</a>, <a href=\"mailto:someone2@something.com\">someone2@something.com</a></p><p><b>gender</b>: male</p><p><b>birthDate</b>: 1983-05-22</p><p><b>address</b>: 177 Nawala Road Nugegoda Colombo 32350 Sri Lanka </p></div>"
  ] ; # 
  fhir:identifier ( [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/CodeSystem/cs-identifier-types"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PHN" ]
       ] ) ;
       fhir:text [ fhir:v "Personal Health Number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/phn"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "personal health number" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PPN" ]
       ] ) ;
       fhir:text [ fhir:v "Passport number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/passport"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Passport-1" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "PPN" ]
       ] ) ;
       fhir:text [ fhir:v "Passport number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/passport"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Passport-2" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "DL" ]
       ] ) ;
       fhir:text [ fhir:v "Driver's license number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/drivers"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Drivers license-1" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "DL" ]
       ] ) ;
       fhir:text [ fhir:v "Driver's license number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/drivers"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Drivers license-2" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "NNLKA" ]
       ] ) ;
       fhir:text [ fhir:v "National identity number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/nic"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "National identity number-1" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/v2-0203"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "NNLKA" ]
       ] ) ;
       fhir:text [ fhir:v "National identity number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/nic"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "National identity number-2" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/CodeSystem/cs-identifier-types"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "SCN" ]
       ] ) ;
       fhir:text [ fhir:v "Senior Citizen Number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/scn"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Senior citizen number-1" ]
  ] [
     fhir:type [
       fhir:coding ( [
         fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/CodeSystem/cs-identifier-types"^^xsd:anyURI ] ;
         fhir:code [ fhir:v "SCN" ]
       ] ) ;
       fhir:text [ fhir:v "Senior Citizen Number" ]
     ] ;
     fhir:system [ fhir:v "http://openhie.org/fhir/sri-lanka/identifier/scn"^^xsd:anyURI ] ;
     fhir:value [ fhir:v "Senior citizen number-2" ]
  ] ) ; # 
  fhir:name ( [
     fhir:use [ fhir:v "official" ] ;
     fhir:family [ fhir:v "Smith" ] ;
     fhir:given ( [ fhir:v "Mr." ] [ fhir:v "Mike" ] [ fhir:v "John" ] )
  ] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "+27829999999" ]
  ] [
     fhir:system [ fhir:v "email" ] ;
     fhir:value [ fhir:v "someone@something.com" ]
  ] [
     fhir:system [ fhir:v "email" ] ;
     fhir:value [ fhir:v "someone2@something.com" ]
  ] ) ; # 
  fhir:gender [ fhir:v "male"] ; # 
  fhir:birthDate [ fhir:v "1983-05-22"^^xsd:date] ; # 
  fhir:address ( [
     fhir:type [ fhir:v "postal" ] ;
     fhir:line ( [ fhir:v "177" ] [ fhir:v "Nawala Road" ] ) ;
     fhir:city [ fhir:v "Nugegoda" ] ;
     fhir:district [ fhir:v "Ampara" ] ;
     fhir:state [ fhir:v "Colombo" ] ;
     fhir:postalCode [ fhir:v "32350" ] ;
     fhir:country [ fhir:v "Sri Lanka" ]
  ] ) . # 

<Practitioner/GeneralPractitionerExample> a fhir:Practitioner ;
  fhir:id [ fhir:v "GeneralPractitionerExample"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://openhie.org/fhir/sri-lanka/StructureDefinition/practitioner"^^xsd:anyURI ;
       fhir:link <http://openhie.org/fhir/sri-lanka/StructureDefinition/practitioner>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Practitioner</b><a name=\"GeneralPractitionerExample\"> </a></p><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\">Resource Practitioner &quot;GeneralPractitionerExample&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-practitioner.html\">Practitioner</a></p></div><p><b>name</b>: Tom Junes Smith </p><p><b>telecom</b>: ph: 27537652509(WORK), <a href=\"mailto:someone@something.org\">someone@something.org</a></p></div>"
  ] ; # 
  fhir:name ( [
     fhir:family [ fhir:v "Smith" ] ;
     fhir:given ( [ fhir:v "Tom" ] [ fhir:v "Junes" ] ) ;
     fhir:prefix ( [ fhir:v "Dr" ] )
  ] ) ; # 
  fhir:telecom ( [
     fhir:system [ fhir:v "phone" ] ;
     fhir:value [ fhir:v "27537652509" ] ;
     fhir:use [ fhir:v "work" ]
  ] [
     fhir:system [ fhir:v "email" ] ;
     fhir:value [ fhir:v "someone@something.org" ] ;
     fhir:use [ fhir:v "home" ]
  ] ) . # 

# -------------------------------------------------------------------------------------

