@prefix fhir: <http://hl7.org/fhir/> .
@prefix loinc: <https://loinc.org/rdf/> .
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://hl7.or.cr/fhir/laboratory-results/Observation/ObservationHbA1cExample> a fhir:Observation ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "ObservationHbA1cExample"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "https://hl7.or.cr/fhir/laboratory-results/StructureDefinition/cr-lab-result-hba1c"^^xsd:anyURI ;
       fhir:l <https://hl7.or.cr/fhir/laboratory-results/StructureDefinition/cr-lab-result-hba1c>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Observation ObservationHbA1cExample</b></p><a name=\"ObservationHbA1cExample\"> </a><a name=\"hcObservationHbA1cExample\"> </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-cr-lab-result-hba1c.html\">Resultado de Laboratorio - HbA1c</a></p></div><p><b>identifier</b>: <code>http://laboratorio.cr/identifier</code>/LAB-2025-001234</p><p><b>status</b>: Final</p><p><b>category</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/observation-category laboratory}\">Laboratory</span></p><p><b>code</b>: <span title=\"Codes:{http://loinc.org 4548-4}\">Hemoglobina A1c / Hemoglobina total: Sangre : Punto temporal: Fracción de masa: Cuantitativo:</span></p><p><b>subject</b>: <a href=\"Patient-PatientLabResultExample.html\">Juan Carlos Pérez García</a></p><p><b>effective</b>: 2025-12-15 14:30:00-0600</p><p><b>issued</b>: 2025-12-15 15:45:00-0600</p><p><b>performer</b>: <a href=\"Organization-organization-example.html\">Laboratorio Central Costa Rica</a></p><p><b>value</b>: 7.5 %<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code% = '%')</span></p><p><b>interpretation</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation H}\">Alto</span></p><p><b>note</b>: </p><blockquote><div><p>Paciente en seguimiento por diabetes mellitus tipo 2. Se recomienda ajuste de medicamentos.</p>\n</div></blockquote><h3>ReferenceRanges</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Low</b></td><td><b>High</b></td><td><b>Text</b></td></tr><tr><td style=\"display: none\">*</td><td>4 %<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code% = '%')</span></td><td>6 %<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  code% = '%')</span></td><td><div><p>Rango normal: 4.0% - 6.0%</p>\n</div></td></tr></table></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:identifier ( [
     fhir:system [
       fhir:v "http://laboratorio.cr/identifier"^^xsd:anyURI ;
       fhir:l <http://laboratorio.cr/identifier>
     ] ;
     fhir:value [ fhir:v "LAB-2025-001234" ]
  ] ) ; # 
  fhir:status [ fhir:v "final"] ; # 
  fhir:category ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/observation-category"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/observation-category>
       ] ;
       fhir:code [ fhir:v "laboratory" ]
     ] )
  ] ) ; # 
  fhir:code [
     fhir:coding ( [
       a loinc:4548-4 ;
       fhir:system [
         fhir:v "http://loinc.org"^^xsd:anyURI ;
         fhir:l <http://loinc.org>
       ] ;
       fhir:code [ fhir:v "4548-4" ]
     ] )
  ] ; # 
  fhir:subject [
     fhir:l <https://hl7.or.cr/fhir/laboratory-results/Patient/PatientLabResultExample> ;
     fhir:reference [ fhir:v "Patient/PatientLabResultExample" ] ;
     fhir:display [ fhir:v "Juan Carlos Pérez García" ]
  ] ; # 
  fhir:effective [
     a fhir:DateTime ;
     fhir:v "2025-12-15T14:30:00-06:00"^^xsd:dateTime
  ] ; # 
  fhir:issued [ fhir:v "2025-12-15T15:45:00-06:00"^^xsd:dateTime] ; # 
  fhir:performer ( [
     fhir:l <https://hl7.or.cr/fhir/laboratory-results/Organization/organization-example> ;
     fhir:reference [ fhir:v "Organization/organization-example" ] ;
     fhir:display [ fhir:v "Laboratorio Central Costa Rica" ]
  ] ) ; # 
  fhir:value [
     a fhir:Quantity ;
     fhir:value [ fhir:v 7.5 ] ;
     fhir:unit [ fhir:v "%" ] ;
     fhir:system [
       fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
       fhir:l <http://unitsofmeasure.org>
     ] ;
     fhir:code [ fhir:v "%" ]
  ] ; # 
  fhir:interpretation ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation"^^xsd:anyURI ;
         fhir:l <http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation>
       ] ;
       fhir:code [ fhir:v "H" ]
     ] ) ;
     fhir:text [ fhir:v "Alto" ]
  ] ) ; # 
  fhir:note ( [
     fhir:text [ fhir:v "Paciente en seguimiento por diabetes mellitus tipo 2. Se recomienda ajuste de medicamentos." ]
  ] ) ; # 
  fhir:referenceRange ( [
     fhir:low [
       fhir:value [ fhir:v "4"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "%" ] ;
       fhir:system [
         fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
         fhir:l <http://unitsofmeasure.org>
       ] ;
       fhir:code [ fhir:v "%" ]
     ] ;
     fhir:high [
       fhir:value [ fhir:v "6"^^xsd:decimal ] ;
       fhir:unit [ fhir:v "%" ] ;
       fhir:system [
         fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ;
         fhir:l <http://unitsofmeasure.org>
       ] ;
       fhir:code [ fhir:v "%" ]
     ] ;
     fhir:text [ fhir:v "Rango normal: 4.0% - 6.0%" ]
  ] ) . # 

# -------------------------------------------------------------------------------------

