@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://emahealth.io/fhir/billing/Invoice/EjemploEmaInvoice> a fhir:Invoice ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "EjemploEmaInvoice"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "https://emahealth.io/fhir/billing/StructureDefinition/ema-invoice"^^xsd:anyURI ;
       fhir:l <https://emahealth.io/fhir/billing/StructureDefinition/ema-invoice>
     ] )
  ] ; # 
  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: Invoice EjemploEmaInvoice</b></p><a name=\"EjemploEmaInvoice\"> </a><a name=\"hcEjemploEmaInvoice\"> </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-ema-invoice.html\">EMA Invoice</a></p></div><p><b>status</b>: issued</p><p><b>subject</b>: <a href=\"Patient/ejemplo-patient\">María Fernández</a></p><p><b>date</b>: 2026-03-14</p><h3>Participants</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Role</b></td><td><b>Actor</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-ParticipationType PPRF}\">primary performer</span></td><td><a href=\"Practitioner/ejemplo-practitioner\">Dr. Carlos Muñoz</a></td></tr></table><blockquote><p><b>lineItem</b></p><p><b>chargeItem</b>: <a href=\"ChargeItem-EjemploEmaChargeItem.html\">Consulta medicina general</a></p><blockquote><p><b>priceComponent</b></p><p><b>type</b>: base price</p><h3>Amounts</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Value</b></td><td><b>Currency</b></td></tr><tr><td style=\"display: none\">*</td><td>25000</td><td>Chilean peso</td></tr></table></blockquote></blockquote><h3>TotalGrosses</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Value</b></td><td><b>Currency</b></td></tr><tr><td style=\"display: none\">*</td><td>25000</td><td>Chilean peso</td></tr></table></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:status [ fhir:v "issued"] ; # 
  fhir:subject [
     fhir:l <https://emahealth.io/fhir/billing/Patient/ejemplo-patient> ;
     fhir:reference [ fhir:v "Patient/ejemplo-patient" ] ;
     fhir:display [ fhir:v "María Fernández" ]
  ] ; # 
  fhir:date [ fhir:v "2026-03-14"^^xsd:date] ; # 
  fhir:participant ( [
     fhir:role [
       fhir:coding ( [
         fhir:system [
           fhir:v "http://terminology.hl7.org/CodeSystem/v3-ParticipationType"^^xsd:anyURI ;
           fhir:l <http://terminology.hl7.org/CodeSystem/v3-ParticipationType>
         ] ;
         fhir:code [ fhir:v "PPRF" ] ;
         fhir:display [ fhir:v "primary performer" ]
       ] )
     ] ;
     fhir:actor [
       fhir:l <https://emahealth.io/fhir/billing/Practitioner/ejemplo-practitioner> ;
       fhir:reference [ fhir:v "Practitioner/ejemplo-practitioner" ] ;
       fhir:display [ fhir:v "Dr. Carlos Muñoz" ]
     ]
  ] ) ; # 
  fhir:lineItem ( [
     fhir:chargeItem [
       a fhir:Reference ;
       fhir:l <https://emahealth.io/fhir/billing/ChargeItem/EjemploEmaChargeItem> ;
       fhir:reference [ fhir:v "ChargeItem/EjemploEmaChargeItem" ] ;
       fhir:display [ fhir:v "Consulta medicina general" ]
     ] ;
     fhir:priceComponent ( [
       fhir:type [ fhir:v "base" ] ;
       fhir:amount [
         fhir:value [ fhir:v "25000"^^xsd:decimal ] ;
         fhir:currency [ fhir:v "CLP" ]
       ]
     ] )
  ] ) ; # 
  fhir:totalGross [
     fhir:value [ fhir:v "25000"^^xsd:decimal ] ;
     fhir:currency [ fhir:v "CLP" ]
  ] . # 

# -------------------------------------------------------------------------------------

