@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://fhir.org/guides/onc/us-quality-core/Encounter/example> a fhir:Encounter ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "example"] ;
  fhir:Resource.meta [
     fhir:Meta.profile [
       fhir:value "http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-encounter" ;
       fhir:index 0 ;
       fhir:link <http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-encounter>
     ]
  ] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Encounter example</b></p><a name=\"example\"> </a><a name=\"hcexample\"> </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\">Profile: <a href=\"StructureDefinition-us-quality-core-encounter.html\">US Quality Core Encounter</a></p></div><p><b>identifier</b>: <code>http://example.org/encounters</code>/ENC-20130404-appendicitis</p><p><b>status</b>: Finished</p><p><b>class</b>: <a href=\"http://terminology.hl7.org/7.1.0/CodeSystem-v3-ActCode.html#v3-ActCode-IMP\">ActCode: IMP</a> (inpatient encounter)</p><p><b>type</b>: <span title=\"Codes:{http://www.ama-assn.org/go/cpt 99223}\">Initial hospital inpatient or observation care, per day, for the evaluation and management of a patient, which requires a medically appropriate history and/or examination and high level of medical decision making. When using total time on the date of the encounter for code selection, 75 minutes must be met or exceeded.</span></p><p><b>subject</b>: <a href=\"Patient-example.html\">Jim Chalmers  Male, DoB: 1974-12-25 ( Social Security number (use: usual, period: 2001-05-06 --&gt; (ongoing)))</a></p><p><b>period</b>: 2013-04-04 18:00:00-0400 --&gt; 2013-04-06 11:00:00-0400</p><h3>Diagnoses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Extension</b></td><td><b>Condition</b></td></tr><tr><td style=\"display: none\">*</td><td/><td><a href=\"Condition-appendicitis-example.html\">Condition Appendicitis (disorder)</a></td></tr></table><h3>Hospitalizations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>DischargeDisposition</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/discharge-disposition home}\">Home</span></td></tr></table><h3>Locations</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Location</b></td><td><b>Status</b></td><td><b>Period</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"Location-example.html\">South Wing, second floor</a></td><td>Completed</td><td>2013-04-04 18:00:00-0400 --&gt; 2013-04-06 11:00:00-0400</td></tr></table></div>"
  ] ;
  fhir:Encounter.identifier [
     fhir:index 0 ;
     fhir:Identifier.system [ fhir:value "http://example.org/encounters" ] ;
     fhir:Identifier.value [ fhir:value "ENC-20130404-appendicitis" ]
  ] ;
  fhir:Encounter.status [ fhir:value "finished"] ;
  fhir:Encounter.class [
     fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActCode" ] ;
     fhir:Coding.code [ fhir:value "IMP" ] ;
     fhir:Coding.display [ fhir:value "inpatient encounter" ]
  ] ;
  fhir:Encounter.type [
     fhir:index 0 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://www.ama-assn.org/go/cpt" ] ;
       fhir:Coding.code [ fhir:value "99223" ] ;
       fhir:Coding.display [ fhir:value "Initial hospital inpatient or observation care, per day, for the evaluation and management of a patient, which requires a medically appropriate history and/or examination and high level of medical decision making. When using total time on the date of the encounter for code selection, 75 minutes must be met or exceeded." ]
     ]
  ] ;
  fhir:Encounter.subject [
     fhir:link <http://fhir.org/guides/onc/us-quality-core/Patient/example> ;
     fhir:Reference.reference [ fhir:value "Patient/example" ]
  ] ;
  fhir:Encounter.period [
     fhir:Period.start [ fhir:value "2013-04-04T18:00:00-04:00"^^xsd:dateTime ] ;
     fhir:Period.end [ fhir:value "2013-04-06T11:00:00-04:00"^^xsd:dateTime ]
  ] ;
  fhir:Encounter.diagnosis [
     fhir:index 0 ;
     fhir:Element.extension [
       fhir:index 0 ;
       fhir:Extension.url [ fhir:value "http://fhir.org/guides/onc/us-quality-core/StructureDefinition/us-quality-core-encounter-diagnosisPresentOnAdmission" ] ;
       fhir:Extension.valueCodeableConcept [
         fhir:CodeableConcept.coding [
           fhir:index 0 ;
           fhir:Coding.system [ fhir:value "https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalAcqCond/Coding" ] ;
           fhir:Coding.code [ fhir:value "Y" ]
         ]
       ]
     ] ;
     fhir:Encounter.diagnosis.condition [
       fhir:link <http://fhir.org/guides/onc/us-quality-core/Condition/appendicitis-example> ;
       fhir:Reference.reference [ fhir:value "Condition/appendicitis-example" ]
     ]
  ] ;
  fhir:Encounter.hospitalization [
     fhir:Encounter.hospitalization.dischargeDisposition [
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/discharge-disposition" ] ;
         fhir:Coding.code [ fhir:value "home" ] ;
         fhir:Coding.display [ fhir:value "Home" ]
       ]
     ]
  ] ;
  fhir:Encounter.location [
     fhir:index 0 ;
     fhir:Encounter.location.location [
       fhir:link <http://fhir.org/guides/onc/us-quality-core/Location/example> ;
       fhir:Reference.reference [ fhir:value "Location/example" ] ;
       fhir:Reference.display [ fhir:value "South Wing, second floor" ]
     ] ;
     fhir:Encounter.location.status [ fhir:value "completed" ] ;
     fhir:Encounter.location.period [
       fhir:Period.start [ fhir:value "2013-04-04T18:00:00-04:00"^^xsd:dateTime ] ;
       fhir:Period.end [ fhir:value "2013-04-06T11:00:00-04:00"^^xsd:dateTime ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://fhir.org/guides/onc/us-quality-core/Encounter/example.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

