@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 sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/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://hl7.org/fhir/us/quality-core/StructureDefinition/us-quality-core-encounter" ;
       fhir:index -1 ;
       fhir:link <http://hl7.org/fhir/us/quality-core/StructureDefinition/us-quality-core-encounter>
     ]
  ] ;
  fhir:Resource.language [ fhir:value "en"] ;
  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://hospital.example.org/encounter-ids</code>/ENC-2026-987654 (use: official, )</p><p><b>status</b>: Finished</p><p><b>class</b>: <a href=\"http://terminology.hl7.org/7.2.0/CodeSystem-v3-ActCode.html#v3-ActCode-IMP\">ActCode: IMP</a> (inpatient encounter)</p><p><b>type</b>: <span title=\"Codes:{http://snomed.info/sct 32485007}, {http://www.ama-assn.org/go/cpt 99223}\">Inpatient Hospital Admission</span></p><p><b>priority</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ActPriority UR}\">urgent</span></p><p><b>subject</b>: <a href=\"Patient-example.html\">Example Patient</a></p><p><b>period</b>: 2026-08-01 10:30:00-0400 --&gt; 2026-08-05 14: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><td><b>Use</b></td><td><b>Rank</b></td></tr><tr><td style=\"display: none\">*</td><td/><td><a href=\"Condition-appendicitis-example.html\">Appendicitis</a></td><td><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/diagnosis-role AD}\">Admission diagnosis</span></td><td>1</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}\">Discharged to 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>2026-08-01 11:00:00-0400 --&gt; 2026-08-05 14:00:00-0400</td></tr></table></div>"
  ] ;
  fhir:Encounter.identifier [
     fhir:index -1 ;
     fhir:Identifier.use [ fhir:value "official" ] ;
     fhir:Identifier.system [ fhir:value "http://hospital.example.org/encounter-ids" ] ;
     fhir:Identifier.value [ fhir:value "ENC-2026-987654" ]
  ] ;
  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 -1 ;
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       a sct:32485007 ;
       fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
       fhir:Coding.code [ fhir:value "32485007" ] ;
       fhir:Coding.display [ fhir:value "Hospital admission" ]
     ], [
       fhir:index -1 ;
       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:CodeableConcept.text [ fhir:value "Inpatient Hospital Admission" ]
  ] ;
  fhir:Encounter.priority [
     fhir:CodeableConcept.coding [
       fhir:index -1 ;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-ActPriority" ] ;
       fhir:Coding.code [ fhir:value "UR" ] ;
       fhir:Coding.display [ fhir:value "urgent" ]
     ]
  ] ;
  fhir:Encounter.subject [
     fhir:link <http://hl7.org/fhir/us/quality-core/Patient/example> ;
     fhir:Reference.reference [ fhir:value "Patient/example" ] ;
     fhir:Reference.display [ fhir:value "Example Patient" ]
  ] ;
  fhir:Encounter.period [
     fhir:Period.start [ fhir:value "2026-08-01T10:30:00-04:00"^^xsd:dateTime ] ;
     fhir:Period.end [ fhir:value "2026-08-05T14:00:00-04:00"^^xsd:dateTime ]
  ] ;
  fhir:Encounter.diagnosis [
     fhir:index -1 ;
     fhir:Element.extension [
       fhir:index -1 ;
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/us/quality-core/StructureDefinition/us-quality-core-diagnosis-present-on-admission" ] ;
       fhir:Extension.valueCodeableConcept [
         fhir:CodeableConcept.coding [
           fhir:index -1 ;
           fhir:Coding.system [ fhir:value "https://www.cms.gov/Medicare/Medicare-Fee-for-Service-Payment/HospitalAcqCond/Coding" ] ;
           fhir:Coding.code [ fhir:value "Y" ]
         ] ;
         fhir:CodeableConcept.text [ fhir:value "Yes" ]
       ]
     ] ;
     fhir:Encounter.diagnosis.condition [
       fhir:link <http://hl7.org/fhir/us/quality-core/Condition/appendicitis-example> ;
       fhir:Reference.reference [ fhir:value "Condition/appendicitis-example" ] ;
       fhir:Reference.display [ fhir:value "Appendicitis" ]
     ] ;
     fhir:Encounter.diagnosis.use [
       fhir:CodeableConcept.coding [
         fhir:index -1 ;
         fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/diagnosis-role" ] ;
         fhir:Coding.code [ fhir:value "AD" ] ;
         fhir:Coding.display [ fhir:value "Admission diagnosis" ]
       ]
     ] ;
     fhir:Encounter.diagnosis.rank [ fhir:value "1"^^xsd:positiveInteger ]
  ] ;
  fhir:Encounter.hospitalization [
     fhir:Encounter.hospitalization.dischargeDisposition [
       fhir:CodeableConcept.coding [
         fhir:index -1 ;
         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:CodeableConcept.text [ fhir:value "Discharged to Home" ]
     ]
  ] ;
  fhir:Encounter.location [
     fhir:index -1 ;
     fhir:Encounter.location.location [
       fhir:link <http://hl7.org/fhir/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 "2026-08-01T11:00:00-04:00"^^xsd:dateTime ] ;
       fhir:Period.end [ fhir:value "2026-08-05T14:00:00-04:00"^^xsd:dateTime ]
     ]
  ] .

<http://hl7.org/fhir/us/quality-core/Patient/example> a fhir:us .

<http://hl7.org/fhir/us/quality-core/Condition/appendicitis-example> a fhir:us .

<http://hl7.org/fhir/us/quality-core/Location/example> a fhir:us .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/us/quality-core/Encounter/example.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/us/quality-core/Encounter/example.ttl> .

# -------------------------------------------------------------------------------------

