Guía de Implementación de Homologación Regional (PH4H) de Costa Rica
0.1.0 - ci-build
Guía de Implementación de Homologación Regional (PH4H) de Costa Rica - Versión en desarrollo (v0.1.0): no se debe usar en producción. Es un borrador en discusión en las mesas de trabajo de la Iniciativa HL7® Costa Rica y cambia sin aviso. Vea el ciclo de vida de las guías.
| URL oficial: https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun | Versión: 0.1.0 | ||||
| Standards status: Draft | Nivel de madurez: 0 | Nombre computable: CRComun | |||
Identificador: el system pasa de URI a OID (ConceptMap cr-sistema-identificador-oid, opción (a) de la homologación) y el tipo conserva solo el coding de HL7 v2-0203, que entienden los demás países.
Idioma: es
map "https://hl7.or.cr/fhir/ph4h/StructureMap/CRComun" = "CRComun" // Identificador: el system pasa de URI a OID (ConceptMap cr-sistema-identificador-oid, opción (a) de la // homologación) y el tipo conserva solo el coding de HL7 v2-0203, que entienden los demás países. group Identificador(source origen : Identifier, target destino : Identifier) { origen.use as uso -> destino.use = uso; origen.type as tipo -> destino.type as tipoDestino then { tipo.coding as codificacionV2 where (system = 'http://terminology.hl7.org/CodeSystem/v2-0203') -> tipoDestino.coding as codificacionDestino then Codificacion(codificacionV2, codificacionDestino) "v2"; }; origen.system as sistema -> destino.system = translate(sistema, 'https://hl7.or.cr/fhir/ph4h/ConceptMap/cr-sistema-identificador-oid', 'code'); origen.value as valor -> destino.value = valor; origen.period as periodo -> destino.period as periodoDestino then Periodo(periodo, periodoDestino); origen.assigner as asignador -> destino.assigner as asignadorDestino then Referencia(asignador, asignadorDestino); } // Referencia: se conserva la referencia. Si es lógica (por identificador), su system también pasa a OID y se // agrega el tipo de HL7 v2-0203, porque con el OID del país el system ya no distingue el tipo de identificador. group Referencia(source origen : Reference, target destino : Reference) { origen.reference as referencia -> destino.reference = referencia; origen.type as tipoRecurso -> destino.type = tipoRecurso; origen.identifier as identificador -> destino.identifier as identificadorDestino then { identificador.type as tipo -> identificadorDestino.type as tipoDestino then Concepto(tipo, tipoDestino) "tipoExplicito"; identificador where (type.exists().not() and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')) -> identificadorDestino.type as tipoDestino, tipoDestino.coding as codificacionDestino then { identificador -> codificacionDestino.system = 'http://terminology.hl7.org/CodeSystem/v2-0203', codificacionDestino.code = 'PPN' "ppn"; } "tipoPasaporte"; identificador where (type.exists().not() and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/').not()) -> identificadorDestino.type as tipoDestino, tipoDestino.coding as codificacionDestino then { identificador.system as sistema -> codificacionDestino.system = 'http://terminology.hl7.org/CodeSystem/v2-0203', codificacionDestino.code = translate(sistema, 'https://hl7.or.cr/fhir/ph4h/ConceptMap/cr-sistema-identificador-tipo', 'code') "v2"; } "tipoDelSystem"; identificador.system as sistema -> identificadorDestino.system = translate(sistema, 'https://hl7.or.cr/fhir/ph4h/ConceptMap/cr-sistema-identificador-oid', 'code'); identificador.value as valor -> identificadorDestino.value = valor; }; origen.display as texto -> destino.display = texto; } group Concepto(source origen : CodeableConcept, target destino : CodeableConcept) { origen.coding as codificacion -> destino.coding as codificacionDestino then Codificacion(codificacion, codificacionDestino); origen.text as texto -> destino.text = texto; } group Codificacion(source origen : Coding, target destino : Coding) { origen.system as sistema -> destino.system = sistema; origen.version as version -> destino.version = version; origen.code as codigo -> destino.code = codigo; origen.display as texto -> destino.display = texto; } group Nombre(source origen : HumanName, target destino : HumanName) { origen.use as uso -> destino.use = uso; origen.text as texto -> destino.text = texto; origen.family as apellidos -> destino.family = apellidos; origen.given as nombres -> destino.given = nombres; origen.prefix as prefijo -> destino.prefix = prefijo; origen.suffix as sufijo -> destino.suffix = sufijo; } group Telecom(source origen : ContactPoint, target destino : ContactPoint) { origen.system as sistema -> destino.system = sistema; origen.value as valor -> destino.value = valor; origen.use as uso -> destino.use = uso; origen.rank as orden -> destino.rank = orden; } // Dirección: el país pasa de alfa-3 a alfa-2 (ConceptMap cr-pais-alfa3-alfa2 de la IG terminológica). // Provincia (state), cantón (city) y distrito (district) van con su código de la DTA; el barrio, en la // extensión estándar precinct. group Direccion(source origen : Address, target destino : Address) { origen.extension as barrio where (url = 'http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct') -> destino.extension as barrioDestino then { barrio.url as urlExtension -> barrioDestino.url = urlExtension; barrio.value : string as nombreBarrio -> barrioDestino.value = nombreBarrio; } "precinct"; origen.use as uso -> destino.use = uso; origen.text as texto -> destino.text = texto; origen.line as linea -> destino.line = linea; origen.city as canton -> destino.city = canton; origen.district as distrito -> destino.district = distrito; origen.state as provincia -> destino.state = provincia; origen.postalCode as codigoPostal -> destino.postalCode = codigoPostal; origen.country as paisAlfa3 -> destino.country = translate(paisAlfa3, 'https://hl7.or.cr/fhir/terminology/ConceptMap/cr-pais-alfa3-alfa2', 'code'); } group Periodo(source origen : Period, target destino : Period) { origen.start as inicio -> destino.start = inicio; origen.end as fin -> destino.end = fin; }