Guía de Implementación de Homologación Regional (PH4H) de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.
| Page standards status: Draft |
@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://hl7.org/fhir/StructureMap/CRPatientToLACPatient> a fhir:StructureMap ;
fhir:nodeRole fhir:treeRoot ;
fhir:Resource.id [ fhir:value "CRPatientToLACPatient"] ;
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: StructureMap CRPatientToLACPatient</b></p><a name=\"CRPatientToLACPatient\"> </a><a name=\"hcCRPatientToLACPatient\"> </a><pre class=\"fml\">#xD;\n<b>map</b><span style=\"color: navy\"> \"</span>https://hl7.or.cr/fhir/ph4h/StructureMap/CRPatientToLACPatient<span style=\"color: navy\">\" = \"</span>CRPatientToLACPatient<span style=\"color: navy\">\"#xD;\n#xD;\n</span><b>uses</b><span style=\"color: navy\"> \"</span>http://hl7.org/fhir/5.0/StructureDefinition/Patient<span style=\"color: navy\">\" </span><b>alias </b>Patient <b>as </b><b>source</b>#xD;\n<b>uses</b><span style=\"color: navy\"> \"</span>http://hl7.org/fhir/4.0/StructureDefinition/Patient<span style=\"color: navy\">\" </span><b>alias </b>PatientR4 <b>as </b><b>target</b>#xD;\n#xD;\n<b>imports</b><span style=\"color: navy\"> \"</span><a href=\"StructureMap-CRComun.html\" title=\"CRComun\">https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun</a><span style=\"color: navy\">\"#xD;\n</span>#xD;\n<b>group </b>CRPatientToLACPatient<span style=\"color: navy\">(</span><b>source</b> <span style=\"color: maroon\">src</span><span style=\"color: navy\"> : </span>Patient, <b>target</b> <span style=\"color: maroon\">tgt</span><span style=\"color: navy\"> : </span>PatientR4<span style=\"color: navy\">)</span><span style=\"color: navy\"> {#xD;\n</span> src.id<b> as </b><span style=\"color: maroon\">v</span><span style=\"color: navy\"><b> -> </b></span>tgt.id = <span style=\"color: maroon\">v</span><span style=\"color: navy\">;</span>#xD;\n src<span style=\"color: navy\"><b> -> </b></span>tgt.meta<b> as </b><span style=\"color: maroon\">m</span><b> then</b><span style=\"color: navy\"> {#xD;\n</span> src<span style=\"color: navy\"><b> -> </b></span>m.profile = <span style=\"color: blue\">'http://racsel.org/StructureDefinition/LACPatient'</span> <i>\"perfil\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">}</span> <i>\"meta\"</i><span style=\"color: navy\">;</span>#xD;\n <span style=\"color: navy\">// </span><span style=\"color: green\">Pasaporte primero y luego los nacionales, como los slices international y national de LACPatient.</span>#xD;\n src.identifier<b> as </b><span style=\"color: maroon\">id</span><b> where </b><span style=\"color: navy\">(</span>(use = 'official') and type.coding.where((system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion') and (code = 'pasaporte')).exists()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -> </b></span>tgt.identifier<b> as </b><span style=\"color: maroon\">ti</span><b> then </b>Identificador<span style=\"color: navy\">(</span><span style=\"color: maroon\">id</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ti</span><span style=\"color: navy\">)</span> <i>\"pasaporte\"</i><span style=\"color: navy\">;</span>#xD;\n src.identifier<b> as </b><span style=\"color: maroon\">id</span><b> where </b><span style=\"color: navy\">(</span>(use = 'official') and type.coding.where((system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion') and (code in ('cedula-nacional' | 'dimex' | 'ccss'))).exists()<span style=\"color: navy\">)</span><span style=\"color: navy\"><b> -> </b></span>tgt.identifier<b> as </b><span style=\"color: maroon\">ti</span><b> then </b>Identificador<span style=\"color: navy\">(</span><span style=\"color: maroon\">id</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ti</span><span style=\"color: navy\">)</span> <i>\"nacional\"</i><span style=\"color: navy\">;</span>#xD;\n src.name<b> as </b><span style=\"color: maroon\">n</span><span style=\"color: navy\"><b> -> </b></span>tgt.name<b> as </b><span style=\"color: maroon\">tn</span><b> then </b>Nombre<span style=\"color: navy\">(</span><span style=\"color: maroon\">n</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tn</span><span style=\"color: navy\">)</span> <i>\"nombre\"</i><span style=\"color: navy\">;</span>#xD;\n src.gender<b> as </b><span style=\"color: maroon\">g</span><span style=\"color: navy\"><b> -> </b></span>tgt.gender = <span style=\"color: maroon\">g</span> <i>\"sexo\"</i><span style=\"color: navy\">;</span>#xD;\n src.birthDate<b> as </b><span style=\"color: maroon\">b</span><span style=\"color: navy\"><b> -> </b></span>tgt.birthDate = <span style=\"color: maroon\">b</span> <i>\"nacimiento\"</i><span style=\"color: navy\">;</span>#xD;\n src.telecom<b> as </b><span style=\"color: maroon\">t</span><span style=\"color: navy\"><b> -> </b></span>tgt.telecom<b> as </b><span style=\"color: maroon\">tt</span><b> then </b>Telecom<span style=\"color: navy\">(</span><span style=\"color: maroon\">t</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">tt</span><span style=\"color: navy\">)</span><span style=\"color: navy\">;</span>#xD;\n src.address<b> as </b><span style=\"color: maroon\">a</span><span style=\"color: navy\"><b> -> </b></span>tgt.address<b> as </b><span style=\"color: maroon\">ta</span><b> then </b>Direccion<span style=\"color: navy\">(</span><span style=\"color: maroon\">a</span><span style=\"color: navy\">, </span><span style=\"color: maroon\">ta</span><span style=\"color: navy\">)</span> <i>\"direccion\"</i><span style=\"color: navy\">;</span>#xD;\n<span style=\"color: navy\">}#xD;\n#xD;\n</span></pre></div>"
] ;
fhir:StructureMap.url [ fhir:value "https://hl7.or.cr/fhir/ph4h/StructureMap/CRPatientToLACPatient"] ;
fhir:StructureMap.version [ fhir:value "0.1.0"] ;
fhir:StructureMap.name [ fhir:value "CRPatientToLACPatient"] ;
fhir:StructureMap.status [ fhir:value "draft"] ;
fhir:StructureMap.date [ fhir:value "2026-09-30T16:04:28-06:00"^^xsd:dateTime] ;
fhir:StructureMap.publisher [ fhir:value "HL7 Costa Rica"] ;
fhir:StructureMap.contact [
fhir:index -1 ;
fhir:ContactDetail.name [ fhir:value "HL7 Costa Rica" ] ;
fhir:ContactDetail.telecom [
fhir:index -1 ;
fhir:ContactPoint.system [ fhir:value "url" ] ;
fhir:ContactPoint.value [ fhir:value "https://hl7.or.cr" ]
]
] ;
fhir:StructureMap.jurisdiction [
fhir:index -1 ;
fhir:CodeableConcept.coding [
fhir:index -1 ;
fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
fhir:Coding.code [ fhir:value "CR" ] ;
fhir:Coding.display [ fhir:value "Costa Rica" ]
]
] ;
fhir:StructureMap.structure [
fhir:index -1 ;
fhir:StructureMap.structure.url [
fhir:value "http://hl7.org/fhir/5.0/StructureDefinition/Patient" ;
fhir:link <http://hl7.org/fhir/5.0/StructureDefinition/Patient>
] ;
fhir:StructureMap.structure.mode [ fhir:value "source" ] ;
fhir:StructureMap.structure.alias [ fhir:value "Patient" ]
], [
fhir:index -1 ;
fhir:StructureMap.structure.url [
fhir:value "http://hl7.org/fhir/4.0/StructureDefinition/Patient" ;
fhir:link <http://hl7.org/fhir/4.0/StructureDefinition/Patient>
] ;
fhir:StructureMap.structure.mode [ fhir:value "target" ] ;
fhir:StructureMap.structure.alias [ fhir:value "PatientR4" ]
] ;
fhir:StructureMap.import [
fhir:value "https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun" ;
fhir:index -1 ;
fhir:link <https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun>
] ;
fhir:StructureMap.group [
fhir:index -1 ;
fhir:StructureMap.group.name [ fhir:value "CRPatientToLACPatient" ] ;
fhir:StructureMap.group.typeMode [ fhir:value "none" ] ;
fhir:StructureMap.group.input [
fhir:index -1 ;
fhir:StructureMap.group.input.name [ fhir:value "src" ] ;
fhir:StructureMap.group.input.type [ fhir:value "Patient" ] ;
fhir:StructureMap.group.input.mode [ fhir:value "source" ]
], [
fhir:index -1 ;
fhir:StructureMap.group.input.name [ fhir:value "tgt" ] ;
fhir:StructureMap.group.input.type [ fhir:value "PatientR4" ] ;
fhir:StructureMap.group.input.mode [ fhir:value "target" ]
] ;
fhir:StructureMap.group.rule [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "id" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "id" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "v" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "id" ] ;
fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
fhir:StructureMap.group.rule.target.parameter [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "v" ]
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "meta" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "meta" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "m" ]
] ;
fhir:StructureMap.group.rule.rule [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "perfil" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "m" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "profile" ] ;
fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
fhir:StructureMap.group.rule.target.parameter [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.parameter.valueString [ fhir:value "http://racsel.org/StructureDefinition/LACPatient" ]
]
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "pasaporte" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "id" ] ;
fhir:StructureMap.group.rule.source.condition [ fhir:value "(use = 'official') and type.coding.where((system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion') and (code = 'pasaporte')).exists()" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "ti" ]
] ;
fhir:StructureMap.group.rule.dependent [
fhir:index -1 ;
fhir:StructureMap.group.rule.dependent.name [ fhir:value "Identificador" ] ;
fhir:StructureMap.group.rule.dependent.variable [
fhir:value "id" ;
fhir:index -1
], [
fhir:value "ti" ;
fhir:index -1
]
] ;
fhir:StructureMap.group.rule.documentation [ fhir:value "Pasaporte primero y luego los nacionales, como los slices international y national de LACPatient." ]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "nacional" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "identifier" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "id" ] ;
fhir:StructureMap.group.rule.source.condition [ fhir:value "(use = 'official') and type.coding.where((system = 'https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion') and (code in ('cedula-nacional' | 'dimex' | 'ccss'))).exists()" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "identifier" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "ti" ]
] ;
fhir:StructureMap.group.rule.dependent [
fhir:index -1 ;
fhir:StructureMap.group.rule.dependent.name [ fhir:value "Identificador" ] ;
fhir:StructureMap.group.rule.dependent.variable [
fhir:value "id" ;
fhir:index -1
], [
fhir:value "ti" ;
fhir:index -1
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "nombre" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "name" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "n" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "name" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "tn" ]
] ;
fhir:StructureMap.group.rule.dependent [
fhir:index -1 ;
fhir:StructureMap.group.rule.dependent.name [ fhir:value "Nombre" ] ;
fhir:StructureMap.group.rule.dependent.variable [
fhir:value "n" ;
fhir:index -1
], [
fhir:value "tn" ;
fhir:index -1
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "sexo" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "gender" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "g" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "gender" ] ;
fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
fhir:StructureMap.group.rule.target.parameter [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "g" ]
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "nacimiento" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "birthDate" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "b" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "birthDate" ] ;
fhir:StructureMap.group.rule.target.transform [ fhir:value "copy" ] ;
fhir:StructureMap.group.rule.target.parameter [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.parameter.valueId [ fhir:value "b" ]
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "telecom" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "telecom" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "t" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "telecom" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "tt" ]
] ;
fhir:StructureMap.group.rule.dependent [
fhir:index -1 ;
fhir:StructureMap.group.rule.dependent.name [ fhir:value "Telecom" ] ;
fhir:StructureMap.group.rule.dependent.variable [
fhir:value "t" ;
fhir:index -1
], [
fhir:value "tt" ;
fhir:index -1
]
]
], [
fhir:index -1 ;
fhir:StructureMap.group.rule.name [ fhir:value "direccion" ] ;
fhir:StructureMap.group.rule.source [
fhir:index -1 ;
fhir:StructureMap.group.rule.source.context [ fhir:value "src" ] ;
fhir:StructureMap.group.rule.source.element [ fhir:value "address" ] ;
fhir:StructureMap.group.rule.source.variable [ fhir:value "a" ]
] ;
fhir:StructureMap.group.rule.target [
fhir:index -1 ;
fhir:StructureMap.group.rule.target.context [ fhir:value "tgt" ] ;
fhir:StructureMap.group.rule.target.contextType [ fhir:value "variable" ] ;
fhir:StructureMap.group.rule.target.element [ fhir:value "address" ] ;
fhir:StructureMap.group.rule.target.variable [ fhir:value "ta" ]
] ;
fhir:StructureMap.group.rule.dependent [
fhir:index -1 ;
fhir:StructureMap.group.rule.dependent.name [ fhir:value "Direccion" ] ;
fhir:StructureMap.group.rule.dependent.variable [
fhir:value "a" ;
fhir:index -1
], [
fhir:value "ta" ;
fhir:index -1
]
]
]
] .
# - ontology header ------------------------------------------------------------
<http://hl7.org/fhir/StructureMap/CRPatientToLACPatient.ttl> a owl:Ontology ;
owl:imports fhir:fhir.ttl ;
owl:versionIRI <http://build.fhir.org/StructureMap/CRPatientToLACPatient.ttl> .
IG © 2026+ Iniciativa HL7 Costa Rica.
Package hl7.fhir.cr.ph4h#0.1.0 based on FHIR 4.0.1.
Generated
2026-10-06
Links: Table of Contents |
QA Report