Guía de Implementación Core de Costa Rica
0.1.0 - ci-build
Guía de Implementación Core de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.
| URL oficial: https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient | Versión: 0.1.0 | ||||
| Standards status: Draft | Nombre computable: CRPatient | ||||
Persona que recibe atención de salud en Costa Rica: su identificación (cédula, DIMEX, pasaporte o expediente del establecimiento), su nombre, su sexo asignado al nacer, su fecha de nacimiento, sus datos de contacto, sus direcciones y sus contactos. Implementa el modelo lógico del paciente.
Usos:
También puede consultar los usos en las estadísticas de IG de FHIR
Descripción de perfiles, diferenciales, instantáneas y sus representaciones.
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Resource | Contained, inline Resources | |
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality |
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "code" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |
![]() ![]() ![]() ![]() ![]() |
0..1 | Extension | Nationality Period | |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "period" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | Period | Value of extension | |
![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/patient-nationality" | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored |
![]() ![]() |
SΣC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso |
![]() ![]() ![]() |
?!SΣ | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) |
![]() ![]() ![]() |
SΣ | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) |
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} Example General: http://www.acme.com/identifiers/patient |
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento, sin guiones ni espacios Example General: 123456 |
![]() ![]() ![]() |
SΣ | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) |
![]() ![]() |
?!Σ | 0..1 | boolean | Whether this patient's record is in active use |
![]() ![]() |
SΣ | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad |
![]() ![]() |
SΣC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono |
![]() ![]() |
SΣ | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() |
SΣC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento |
![]() ![]() |
?!Σ | 0..1 | Indicates if the individual is deceased or not | |
![]() ![]() ![]() |
boolean | |||
![]() ![]() ![]() |
dateTime | |||
![]() ![]() |
SΣC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct |
![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |
![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home |
![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 |
![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 |
![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon |
![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison |
![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. |
![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 |
![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) |
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) |
![]() ![]() |
SC | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución Constraints: pat-1 |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) |
![]() ![]() ![]() |
SC | 1..1 | CRHumanName | Nombre del contacto |
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono |
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |
![]() ![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 |
![]() ![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 |
![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) |
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() ![]() |
SC | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL |
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica |
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido |
![]() ![]() |
?!Σ | 0..* | BackboneElement | Link to a Patient or RelatedPerson resource that concerns the same actual individual |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
Σ | 1..1 | Reference(Patient | RelatedPerson) | The other patient or related person resource that the link refers to |
![]() ![]() ![]() |
Σ | 1..1 | code | replaced-by | replaces | refer | seealso Vinculación: LinkType (required): The type of link between this patient resource and another Patient resource, or Patient/RelatedPerson when using the seealso code |
Documentación de este formato | ||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
| dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Patient | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| pat-1 | error | Patient.contact | SHALL at least contain a contact's details or a reference to an organization |
name.exists() or telecom.exists() or address.exists() or organization.exists()
|
Esta estructura se deriva de Patient .
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia |
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality |
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |
![]() ![]() |
SC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso |
![]() ![]() ![]() |
S | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) |
![]() ![]() ![]() |
S | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} |
![]() ![]() ![]() |
S | 1..1 | string | Número del documento, sin guiones ni espacios |
![]() ![]() ![]() |
S | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) |
![]() ![]() |
S | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad |
![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono |
![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() |
SC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento |
![]() ![]() |
SC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() |
S | 1..1 | code | home (residencia) | temp (temporal) |
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) |
![]() ![]() |
S | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución |
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) |
![]() ![]() ![]() |
S | 1..1 | CRHumanName | Nombre del contacto |
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono |
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() ![]() |
S | 1..1 | code | home (residencia) | temp (temporal) |
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() ![]() |
S | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) |
![]() ![]() ![]() ![]() |
SC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica |
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido |
Documentación de este formato | ||||
| Ruta | Estado | Uso | ValueSet | Versión | Fuente |
| Patient.extension:nacionalidad.extension:code.value[x] | Base | extensible | Iso 3166 Part 1: 3 Letter Codes | 📦5.0.0 | Estándar FHIR |
| Patient.identifier.use | Base | required | IdentifierUse | 📦5.0.0 | Estándar FHIR |
| Patient.identifier.type | Base | required | Tipos de identificación del paciente | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.gender | Base | required | Sexo asignado al nacer | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.maritalStatus | Base | required | Estado civil | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.contact.relationship | Base | extensible | Tipo de relación con el paciente | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.contact.gender | Base | required | Sexo asignado al nacer | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||||||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad | ||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "code" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Extension | Nationality Period | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "period" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | Period | Value of extension | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/patient-nationality" | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
SΣC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
?!SΣ | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) | ||||
![]() ![]() ![]() |
SΣ | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) | ||||
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} Example General: http://www.acme.com/identifiers/patient | ||||
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento, sin guiones ni espacios Example General: 123456 | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
![]() ![]() ![]() |
SΣ | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) | ||||
![]() ![]() |
?!Σ | 0..1 | boolean | Whether this patient's record is in active use | ||||
![]() ![]() |
SΣ | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad | ||||
![]() ![]() |
SΣC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono | ||||
![]() ![]() |
SΣ | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) | ||||
![]() ![]() |
SΣC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento | ||||
![]() ![]() |
?!Σ | 0..1 | Indicates if the individual is deceased or not | |||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() |
SΣC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |||||
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |||||
![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home | ||||
![]() ![]() ![]() |
Σ | 0..1 | code | postal | physical | both Vinculación: AddressType (required): The type of an address (physical / postal). Example General: both | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 | ||||
![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 | ||||
![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when address was/is in use Example General: {"start":"2010-03-23","end":"2010-07-01"} | ||||
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) | ||||
![]() ![]() |
0..1 | Whether patient is part of a multiple birth | ||||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
integer | |||||||
![]() ![]() |
0..* | Attachment | Image of the patient | |||||
![]() ![]() |
SC | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución Constraints: pat-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) | ||||
![]() ![]() ![]() |
SC | 1..1 | CRHumanName | Nombre del contacto | ||||
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono | ||||
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct | ||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |||||
![]() ![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | code | postal | physical | both Vinculación: AddressType (required): The type of an address (physical / postal). Example General: both | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 | ||||
![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when address was/is in use Example General: {"start":"2010-03-23","end":"2010-07-01"} | ||||
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) | ||||
![]() ![]() ![]() |
SC | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Vinculación: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica | ||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Text alternative for the resource | ||||
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido | ||||
![]() ![]() |
0..* | BackboneElement | A language which may be used to communicate with the patient about his or her health | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
1..1 | CodeableConcept | The language which can be used to communicate with the patient about his or her health Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() ![]() |
0..1 | boolean | Language preference indicator | |||||
![]() ![]() |
0..* | Reference(Organization | Practitioner | PractitionerRole) | Patient's nominated primary care provider | |||||
![]() ![]() |
Σ | 0..1 | Reference(Organization) | Organization that is the custodian of the patient record | ||||
![]() ![]() |
?!Σ | 0..* | BackboneElement | Link to a Patient or RelatedPerson resource that concerns the same actual individual | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
Σ | 1..1 | Reference(Patient | RelatedPerson) | The other patient or related person resource that the link refers to | ||||
![]() ![]() ![]() |
Σ | 1..1 | code | replaced-by | replaces | refer | seealso Vinculación: LinkType (required): The type of link between this patient resource and another Patient resource, or Patient/RelatedPerson when using the seealso code | ||||
Documentación de este formato | ||||||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
| dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Patient | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| pat-1 | error | Patient.contact | SHALL at least contain a contact's details or a reference to an organization |
name.exists() or telecom.exists() or address.exists() or organization.exists()
|
Esta estructura se deriva de Patient .
Resumen
Obligatorios: 7 elementos(8 nested mandatory elementos)
Must-Support: 25 elementos
Estructuras
Esta estructura hace referencia a estas otras estructuras:
Extensiones
This structure refers to these extensions:
Vista de elementos clave
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Resource | Contained, inline Resources | |
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality |
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "code" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |
![]() ![]() ![]() ![]() ![]() |
0..1 | Extension | Nationality Period | |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "period" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | Period | Value of extension | |
![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/patient-nationality" | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored |
![]() ![]() |
SΣC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso |
![]() ![]() ![]() |
?!SΣ | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) |
![]() ![]() ![]() |
SΣ | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) |
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} Example General: http://www.acme.com/identifiers/patient |
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento, sin guiones ni espacios Example General: 123456 |
![]() ![]() ![]() |
SΣ | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) |
![]() ![]() |
?!Σ | 0..1 | boolean | Whether this patient's record is in active use |
![]() ![]() |
SΣ | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad |
![]() ![]() |
SΣC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono |
![]() ![]() |
SΣ | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() |
SΣC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento |
![]() ![]() |
?!Σ | 0..1 | Indicates if the individual is deceased or not | |
![]() ![]() ![]() |
boolean | |||
![]() ![]() ![]() |
dateTime | |||
![]() ![]() |
SΣC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct |
![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |
![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home |
![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 |
![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 |
![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon |
![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison |
![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. |
![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 |
![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) |
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) |
![]() ![]() |
SC | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución Constraints: pat-1 |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) |
![]() ![]() ![]() |
SC | 1..1 | CRHumanName | Nombre del contacto |
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono |
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct |
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |
![]() ![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 |
![]() ![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. |
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 |
![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) |
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() ![]() |
SC | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL |
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica |
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido |
![]() ![]() |
?!Σ | 0..* | BackboneElement | Link to a Patient or RelatedPerson resource that concerns the same actual individual |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
Σ | 1..1 | Reference(Patient | RelatedPerson) | The other patient or related person resource that the link refers to |
![]() ![]() ![]() |
Σ | 1..1 | code | replaced-by | replaces | refer | seealso Vinculación: LinkType (required): The type of link between this patient resource and another Patient resource, or Patient/RelatedPerson when using the seealso code |
Documentación de este formato | ||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
| dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Patient | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| pat-1 | error | Patient.contact | SHALL at least contain a contact's details or a reference to an organization |
name.exists() or telecom.exists() or address.exists() or organization.exists()
|
Vista diferencial
Esta estructura se deriva de Patient .
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia |
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality |
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad | |
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad |
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |
![]() ![]() |
SC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso |
![]() ![]() ![]() |
S | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) |
![]() ![]() ![]() |
S | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} |
![]() ![]() ![]() |
S | 1..1 | string | Número del documento, sin guiones ni espacios |
![]() ![]() ![]() |
S | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) |
![]() ![]() |
S | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad |
![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono |
![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() |
SC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento |
![]() ![]() |
SC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() |
S | 1..1 | code | home (residencia) | temp (temporal) |
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) |
![]() ![]() |
S | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución |
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) |
![]() ![]() ![]() |
S | 1..1 | CRHumanName | Nombre del contacto |
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono |
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona |
![]() ![]() ![]() ![]() |
S | 1..1 | code | home (residencia) | temp (temporal) |
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) |
![]() ![]() ![]() |
S | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) |
![]() ![]() ![]() ![]() |
SC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica |
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido |
Documentación de este formato | ||||
| Ruta | Estado | Uso | ValueSet | Versión | Fuente |
| Patient.extension:nacionalidad.extension:code.value[x] | Base | extensible | Iso 3166 Part 1: 3 Letter Codes | 📦5.0.0 | Estándar FHIR |
| Patient.identifier.use | Base | required | IdentifierUse | 📦5.0.0 | Estándar FHIR |
| Patient.identifier.type | Base | required | Tipos de identificación del paciente | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.gender | Base | required | Sexo asignado al nacer | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.maritalStatus | Base | required | Estado civil | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.contact.relationship | Base | extensible | Tipo de relación con el paciente | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Patient.contact.gender | Base | required | Sexo asignado al nacer | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
Vista instantáneaView
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | Patient | Paciente: persona que recibe atención de salud en Costa Rica Constraints: cr-identificador-unico, cr-paciente-identificador-vigente, cr-paciente-documento-unico, cr-paciente-pasaporte-expediente, cr-persona-apatrida, cr-persona-residencia | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
Σ | 0..1 | Meta | Metadata about the resource | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Extensiones: la nacionalidad Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
S | 0..* | (Complex) | Nacionalidad: una por país URL: http://hl7.org/fhir/StructureDefinition/patient-nationality | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
1..* | Extension | País y periodo de la nacionalidad Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
Content/Rules for all slices | |||||||
![]() ![]() ![]() ![]() ![]() |
S | 1..1 | Extension | País de la nacionalidad | ||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "code" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | CodeableConcept | Código ISO 3166-1 alfa-3 del país (CRI), con el nombre en español en text Vinculación: Iso316613 (extensible) | |||||
![]() ![]() ![]() ![]() ![]() |
0..1 | Extension | Nationality Period | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "period" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | Period | Value of extension | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/patient-nationality" | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
SΣC | 1..* | Identifier | Identificación del paciente: cédula, DIMEX, pasaporte, número CCSS o expediente Constraints: cr-paciente-identificador-system, cr-cedula-nacional-value, cr-dimex-value, cr-pasaporte-system, cr-expediente-system, cr-expediente-assigner, cr-paciente-identificador-uso | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
?!SΣ | 1..1 | code | official (temp para el expediente) si está vigente; old si es histórico Vinculación: IdentifierUse (required) | ||||
![]() ![]() ![]() |
SΣ | 0..1 | CodeableConcept | Tipo de documento (opcional: el system ya lo indica) Vinculación: Tipos de identificación del paciente (required) | ||||
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/{cedula-nacional | dimex | ccss | pasaporte/{país} | expediente/{establecimiento}} Example General: http://www.acme.com/identifiers/patient | ||||
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento, sin guiones ni espacios Example General: 123456 | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
![]() ![]() ![]() |
SΣ | 0..1 | Reference(Organización) | Establecimiento que asignó el expediente (obligatorio en el expediente) | ||||
![]() ![]() |
?!Σ | 0..1 | boolean | Whether this patient's record is in active use | ||||
![]() ![]() |
SΣ | 1..1 | CRHumanName | Nombre oficial, según el documento de identidad | ||||
![]() ![]() |
SΣC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico Constraints: cr-telefono | ||||
![]() ![]() |
SΣ | 1..1 | code | Sexo asignado al nacer: female | male | unknown Vinculación: Sexo asignado al nacer (required) | ||||
![]() ![]() |
SΣC | 1..1 | date | Fecha de nacimiento, según el documento de identidad Constraints: cr-persona-fecha-nacimiento | ||||
![]() ![]() |
?!Σ | 0..1 | Indicates if the individual is deceased or not | |||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
dateTime | |||||||
![]() ![]() |
SΣC | 0..* | CRAddress | Dirección en Costa Rica o en otro país Constraints: cr-direccion-uso-persona | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |||||
![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |||||
![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home | ||||
![]() ![]() ![]() |
Σ | 0..1 | code | postal | physical | both Vinculación: AddressType (required): The type of an address (physical / postal). Example General: both | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 | ||||
![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. | ||||
![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 | ||||
![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when address was/is in use Example General: {"start":"2010-03-23","end":"2010-07-01"} | ||||
![]() ![]() |
S | 0..1 | CodeableConcept | Estado civil: soltero, casado, divorciado, viudo o unión de hecho Vinculación: Estado civil (required) | ||||
![]() ![]() |
0..1 | Whether patient is part of a multiple birth | ||||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
integer | |||||||
![]() ![]() |
0..* | Attachment | Image of the patient | |||||
![]() ![]() |
SC | 0..* | BackboneElement | Contacto de emergencia, familiar o de una institución Constraints: pat-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..* | CodeableConcept | Relación con el paciente: cónyuge, padre, madre, tutor, hijo, hermano u otro familiar Vinculación: Tipo de relación con el paciente (extensible) | ||||
![]() ![]() ![]() |
SC | 1..1 | CRHumanName | Nombre del contacto | ||||
![]() ![]() ![]() |
SC | 0..* | ContactPoint | Teléfono (+506 y 8 dígitos) o correo electrónico del contacto Constraints: cr-telefono | ||||
![]() ![]() ![]() |
SC | 0..1 | CRAddress | Dirección del contacto Constraints: cr-direccion-uso-persona | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
S | 0..1 | (Complex) | Barrio (zona urbana) o poblado (zona rural) URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct | ||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
0..0 | Extension Slice: Sin orden, Abierto by value:url | ||||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | uri | "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct" | |||||
![]() ![]() ![]() ![]() ![]() ![]() |
1..1 | string | Nombre del barrio o del poblado Max Length:100 | |||||
![]() ![]() ![]() ![]() |
?!SΣ | 1..1 | code | home (residencia) | temp (temporal) Vinculación: AddressUse (required): The use of an address (home / work / etc.). Example General: home | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | code | postal | physical | both Vinculación: AddressType (required): The type of an address (physical / postal). Example General: both | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito Example General: 137 Nowhere Street, Erewhon 9132 Max Length:250 | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..* | string | Señas (Costa Rica) o calle y número (otro país) This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street Max Length:250 | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Cantón (código de la DTA en Costa Rica) o ciudad Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. Example General: Erewhon | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Distrito (código de la DTA en Costa Rica) Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia). Example General: Madison | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Provincia (código de la DTA en Costa Rica) o estado, región o departamento Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre. | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..1 | string | Código postal Example General: 9132 | ||||
![]() ![]() ![]() ![]() |
SΣ | 1..1 | string | País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica) Vinculación: Iso316613 (required) | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when address was/is in use Example General: {"start":"2010-03-23","end":"2010-07-01"} | ||||
![]() ![]() ![]() |
S | 1..1 | code | Sexo asignado al nacer del contacto: female | male | unknown Vinculación: Sexo asignado al nacer (required) | ||||
![]() ![]() ![]() |
SC | 0..1 | Reference(Organización) | Institución en cuyo nombre actúa el contacto (PANI) | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Vinculación: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Cédula jurídica de la organización Constraints: cr-referencia-cedula-juridica | ||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Text alternative for the resource | ||||
![]() ![]() ![]() |
S | 0..1 | Period | Periodo en que el contacto es válido | ||||
![]() ![]() |
0..* | BackboneElement | A language which may be used to communicate with the patient about his or her health | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
1..1 | CodeableConcept | The language which can be used to communicate with the patient about his or her health Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() ![]() |
0..1 | boolean | Language preference indicator | |||||
![]() ![]() |
0..* | Reference(Organization | Practitioner | PractitionerRole) | Patient's nominated primary care provider | |||||
![]() ![]() |
Σ | 0..1 | Reference(Organization) | Organization that is the custodian of the patient record | ||||
![]() ![]() |
?!Σ | 0..* | BackboneElement | Link to a Patient or RelatedPerson resource that concerns the same actual individual | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
Σ | 1..1 | Reference(Patient | RelatedPerson) | The other patient or related person resource that the link refers to | ||||
![]() ![]() ![]() |
Σ | 1..1 | code | replaced-by | replaces | refer | seealso Vinculación: LinkType (required): The type of link between this patient resource and another Patient resource, or Patient/RelatedPerson when using the seealso code | ||||
Documentación de este formato | ||||||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-cedula-nacional-value | error | Patient.identifier | Una cédula nacional (system https://hl7.or.cr/fhir/sid/cedula-nacional) tiene 9 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' implies value.matches('^[1-9][0-9]{8}$')
|
| cr-dimex-value | error | Patient.identifier | Un DIMEX (system https://hl7.or.cr/fhir/sid/dimex) tiene 11 o 12 dígitos, sin ceros a la izquierda. |
system = 'https://hl7.or.cr/fhir/sid/dimex' implies value.matches('^[1-9][0-9]{10,11}$')
|
| cr-direccion-uso-persona | error | Patient.address, Patient.contact.address | La dirección de una persona es su residencia (home) o una dirección temporal (temp). |
use.empty() or use = 'home' or use = 'temp'
|
| cr-expediente-assigner | error | Patient.identifier | Un expediente indica el establecimiento que lo asignó (assigner). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente/') implies assigner.exists()
|
| cr-expediente-system | error | Patient.identifier | Un expediente usa el system https://hl7.or.cr/fhir/sid/expediente/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
system.startsWith('https://hl7.or.cr/fhir/sid/expediente') implies system.matches('^https://hl7\\.or\\.cr/fhir/sid/expediente/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
|
| cr-identificador-unico | error | Patient | No hay dos identificadores con el mismo system y el mismo valor. |
identifier.select(system & '|' & value).isDistinct()
|
| cr-paciente-documento-unico | error | Patient | Entre los identificadores vigentes hay a lo sumo una cédula nacional, un DIMEX y un número CCSS, y la cédula y el DIMEX no están vigentes a la vez. |
identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').count() <= 1 and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/ccss').count() <= 1 and (identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/cedula-nacional').exists() and identifier.where(use != 'old' and system = 'https://hl7.or.cr/fhir/sid/dimex').exists()).not()
|
| cr-paciente-identificador-system | error | Patient.identifier | El identificador es una cédula nacional, un DIMEX, un número CCSS, un pasaporte o un expediente, con su system de https://hl7.or.cr/fhir/sid/. |
system = 'https://hl7.or.cr/fhir/sid/cedula-nacional' or system = 'https://hl7.or.cr/fhir/sid/dimex' or system = 'https://hl7.or.cr/fhir/sid/ccss' or system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/') or system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')
|
| cr-paciente-identificador-uso | error | Patient.identifier | Un identificador vigente es temp si es un expediente y official si es de otro tipo; uno que ya no está vigente es old. |
iif(system.startsWith('https://hl7.or.cr/fhir/sid/expediente/'), use = 'temp' or use = 'old', use = 'official' or use = 'old')
|
| cr-paciente-identificador-vigente | error | Patient | El paciente tiene al menos un identificador vigente (use distinto de old). |
identifier.where(use != 'old').exists()
|
| cr-paciente-pasaporte-expediente | error | Patient | Los pasaportes vigentes son de países emisores distintos y los expedientes vigentes, de establecimientos distintos. |
identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte/')).system.isDistinct() and identifier.where(use != 'old' and system.startsWith('https://hl7.or.cr/fhir/sid/expediente/')).system.isDistinct()
|
| cr-pasaporte-system | error | Patient.identifier | Un pasaporte usa el system https://hl7.or.cr/fhir/sid/pasaporte/ seguido del código ISO 3166-1 alfa-3 del país emisor, y su número tiene de 6 a 15 letras o dígitos. |
system.startsWith('https://hl7.or.cr/fhir/sid/pasaporte') implies (system.matches('^https://hl7\\.or\\.cr/fhir/sid/pasaporte/[A-Z]{3}$') and value.matches('^[A-Za-z0-9]{6,15}$'))
|
| cr-persona-apatrida | error | Patient | Una persona apátrida (nacionalidad con data-absent-reason not-applicable) no tiene otra nacionalidad. |
extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').extension('code').value.extension('http://hl7.org/fhir/StructureDefinition/data-absent-reason').where(value = 'not-applicable').exists() implies extension('http://hl7.org/fhir/StructureDefinition/patient-nationality').count() = 1
|
| cr-persona-fecha-nacimiento | error | Patient.birthDate | La fecha de nacimiento no es posterior a hoy ni anterior a 130 años. |
$this <= today() and $this >= today() - 130 years
|
| cr-persona-residencia | error | Patient | La persona tiene a lo sumo una dirección de residencia (home). |
address.where(use = 'home').count() <= 1
|
| cr-referencia-cedula-juridica | error | Patient.contact.organization.identifier | La organización se identifica con su cédula jurídica: system https://hl7.or.cr/fhir/sid/cedula-juridica y 10 dígitos, sin guiones ni cero inicial. |
system = 'https://hl7.or.cr/fhir/sid/cedula-juridica' and value.matches('^[1-9][0-9]{9}$')
|
| cr-telefono | error | Patient.telecom, Patient.contact.telecom | Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. |
(system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
|
| dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource |
contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().ofType(canonical) | %resource.descendants().ofType(uri) | %resource.descendants().ofType(url))) or descendants().where(reference = '#').exists() or descendants().where(ofType(canonical) = '#').exists() or descendants().where(ofType(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
|
| dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated |
contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
|
| dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Patient | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
| pat-1 | error | Patient.contact | SHALL at least contain a contact's details or a reference to an organization |
name.exists() or telecom.exists() or address.exists() or organization.exists()
|
Esta estructura se deriva de Patient .
Resumen
Obligatorios: 7 elementos(8 nested mandatory elementos)
Must-Support: 25 elementos
Estructuras
Esta estructura hace referencia a estas otras estructuras:
Extensiones
This structure refers to these extensions:
Otras representaciones de perfil: CSV, Excel, Schematron
Registro de pacientes. Pacientes del MPI Nacional. Las uniones de registros se registran con Patient.link y con una procedencia (cr-provenance).
Ver también Servicios del HIE.
Lo que el servidor debe responder para este perfil. En la forma, [base] es la URL base del servidor del servicio y lo que va entre llaves se reemplaza por un valor. Cada solicitud usa valores reales de los ejemplos de esta guía, y la respuesta trae los que coinciden; los cuerpos JSON se expanden al hacer clic. Todas las solicitudes llevan el token de acceso al HIE (Authorization: Bearer [token]). Las búsquedas de texto encuentran los valores que empiezan con el texto, sin distinguir mayúsculas ni tildes; las de fecha admiten los prefijos ge, gt, le y lt. En la URL los valores van codificados (| como %7C, + como %2B, un espacio como %20); aquí se muestran sin codificar para que se lean mejor.
Ir a: Leer · Buscar · Crear · Actualizar · Historial · Emparejar
Leer
Forma: GET [base]/Patient/{id}
Lee un paciente del MPI Nacional por su id, la parte final de su URL. Se usa para resolver una referencia que otro recurso hace a un paciente. En el ejemplo se lee «Costarricense adulta (C1)»; la segunda respuesta es la de un id que no existe.
Solicitud
GET [base]/Patient/ejemplo-paciente-nacional HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta si el recurso existe
HTTP/1.1 200 OK
ETag: W/"1"
Last-Modified: 2026-10-01T10:00:00-06:00
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Respuesta si no existe
HTTP/1.1 404 Not Found
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "not-found",
"diagnostics": "No existe el recurso Patient/no-existe."
}
]
}
Leer una versión
Forma: GET [base]/Patient/{id}/_history/{versión}
Lee una versión anterior de un paciente. Sirve para ver los datos tal como estaban cuando otro recurso los citó; por ejemplo, cuando se firmó un documento. En el ejemplo se lee la versión 1 de «Costarricense adulta (C1)».
Solicitud
GET [base]/Patient/ejemplo-paciente-nacional/_history/1 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: la versión 1
HTTP/1.1 200 OK
ETag: W/"1"
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Buscar por id
Forma: GET [base]/Patient?_id={id}
Lee al paciente por su id en el MPI, con la forma de una búsqueda. Sirve para combinarla con otros parámetros o para recibir el resultado en un Bundle. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: _id=ejemplo-paciente-nacional.
Solicitud
GET [base]/Patient?_id=ejemplo-paciente-nacional HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?_id=ejemplo-paciente-nacional"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por cédula u otro identificador
Forma: GET [base]/Patient?identifier={sistema}|{valor}
Encuentra al paciente por su cédula, DIMEX, pasaporte u otro identificador. Es lo primero que hace un sistema al atender a una persona: si el MPI ya la tiene, usa ese registro en lugar de crear otro (IHE PDQm ITI-78, PIXm ITI-83). En el ejemplo se usa el dato de «Costarricense adulta (C1)»: identifier=https://hl7.or.cr/fhir/sid/cedula-nacional|114250387.
Solicitud
GET [base]/Patient?identifier=https://hl7.or.cr/fhir/sid/cedula-nacional|114250387 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?identifier=https://hl7.or.cr/fhir/sid/cedula-nacional|114250387"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por registro activo
Forma: GET [base]/Patient?active={true o false}
Trae solo los registros activos del MPI, que son los que un sistema debe usar al atender a una persona. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: active=true.
Solicitud
GET [base]/Patient?active=true&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 5 resultados, de 2 en 2 con _count; la primera página trae Costarricense adulta (C1); Extranjero residente con DIMEX (C4)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 5,
"link": [
{
"relation": "self",
"url": "[base]/Patient?active=true&_count=2"
},
{
"relation": "next",
"url": "[base]/Patient?active=true&_count=2&_offset=2"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "[base]/Patient/ejemplo-paciente-dimex",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-dimex",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "dimex",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "DIMEX"
},
{
"code": "PRC",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "Permanent Resident Card Number"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/dimex",
"value": "155812345678"
},
{
"assigner": {
"display": "Nicaragua"
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/pasaporte/NIC",
"value": "C01234567"
}
],
"name": [
{
"given": [
"José"
],
"use": "official",
"family": "Mendoza",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Mendoza"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
}
]
}
}
],
"telecom": [
{
"system": "phone",
"value": "+50670001122"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "NIC",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Nicaragua"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"line": [
"Calle 3, 100 metros al este de la rotonda, apartamento 4"
],
"use": "home",
"country": "CRI",
"state": "1",
"city": "115",
"district": "11501",
"text": "Calle 3, 100 metros al este de la rotonda, apartamento 4, San Pedro, Montes de Oca, San José"
}
],
"active": true,
"gender": "male",
"birthDate": "1984-11-02"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por apellidos
Forma: GET [base]/Patient?family={texto}
Busca por apellidos cuando no se tiene la identificación. family lleva los dos apellidos, así que se puede buscar por el primero o por los dos. Conviene combinarla con la fecha de nacimiento para acotar el resultado. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: family=Solís Araya.
Solicitud
GET [base]/Patient?family=Solís Araya HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?family=Solís Araya"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por nombre
Forma: GET [base]/Patient?given={texto}
Busca por nombre. Sola trae muchos resultados: se combina con los apellidos o con la fecha de nacimiento. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: given=Laura.
Solicitud
GET [base]/Patient?given=Laura HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?given=Laura"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por apellido de origen materno
Forma: GET [base]/Patient?mothers-family={texto}
Busca por el apellido que proviene de la madre, sin importar si es el primero o el segundo. Reemplaza el parámetro mothersMaidenName de IHE PDQm; R5 no lo trae y lo define esta guía. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: mothers-family=Araya.
Solicitud
GET [base]/Patient?mothers-family=Araya HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?mothers-family=Araya"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por fecha de nacimiento
Forma: GET [base]/Patient?birthdate={fecha}
Busca por fecha de nacimiento. Es el dato que más acota una búsqueda demográfica cuando no se tiene la identificación. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: birthdate=1990-04-12.
Solicitud
GET [base]/Patient?birthdate=1990-04-12 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?birthdate=1990-04-12"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por sexo
Forma: GET [base]/Patient?gender={código}
Filtra por sexo asignado al nacer. Se usa combinado con otros datos, no sola. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: gender=female.
Solicitud
GET [base]/Patient?gender=female&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 3 resultados, de 2 en 2 con _count; la primera página trae Costarricense adulta (C1); Persona naturalizada (C8)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 3,
"link": [
{
"relation": "self",
"url": "[base]/Patient?gender=female&_count=2"
},
{
"relation": "next",
"url": "[base]/Patient?gender=female&_count=2&_offset=2"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "[base]/Patient/ejemplo-paciente-naturalizado",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-naturalizado",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "801230456"
},
{
"type": {
"coding": [
{
"code": "dimex",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "DIMEX"
},
{
"code": "PRC",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "Permanent Resident Card Number"
}
]
},
"use": "old",
"system": "https://hl7.or.cr/fhir/sid/dimex",
"value": "155898765432"
}
],
"name": [
{
"given": [
"Valentina"
],
"use": "official",
"family": "Restrepo Gómez",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Restrepo"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Gómez"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "T",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Domestic partner"
}
],
"text": "Unión de hecho"
},
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
},
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "COL",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Colombia"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"active": true,
"gender": "female",
"birthDate": "1979-03-21"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por teléfono o correo
Forma: GET [base]/Patient?telecom={teléfono o correo}
Busca por teléfono o correo, por ejemplo para encontrar a la persona que llamó. El teléfono va en formato E.164, con el +506. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: telecom=+50688881234.
Solicitud
GET [base]/Patient?telecom=+50688881234 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?telecom=+50688881234"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por provincia
Forma: GET [base]/Patient?address-state={texto}
Trae los pacientes de una provincia, por su código de la División Territorial Administrativa (DTA). Sirve para reportes y para acotar una búsqueda. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: address-state=4.
Solicitud
GET [base]/Patient?address-state=4 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?address-state=4"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por cantón
Forma: GET [base]/Patient?address-city={texto}
Trae los pacientes de un cantón, por su código de la DTA. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: address-city=402.
Solicitud
GET [base]/Patient?address-city=402 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?address-city=402"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por distrito
Forma: GET [base]/Patient?address-district={texto}
Trae los pacientes de un distrito, por su código de la DTA. R5 no trae este parámetro: lo define esta guía. En el ejemplo se usa el dato de «Costarricense adulta (C1)»: address-district=40201.
Solicitud
GET [base]/Patient?address-district=40201 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 1 resultado: Costarricense adulta (C1)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?address-district=40201"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por fecha de actualización
Forma: GET [base]/Patient?_lastUpdated={prefijo}{fecha}
Trae los pacientes que cambiaron desde una fecha. La usa un sistema que guarda una copia del registro para traer solo lo nuevo, en lugar de descargarlo todo. En el ejemplo se piden los cambios desde el 2026-10-01 (prefijo ge: en esa fecha o después).
Solicitud
GET [base]/Patient?_lastUpdated=ge2026-10-01&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: 5 resultados, de 2 en 2 con _count; la primera página trae Costarricense adulta (C1); Extranjero residente con DIMEX (C4)
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 5,
"link": [
{
"relation": "self",
"url": "[base]/Patient?_lastUpdated=ge2026-10-01&_count=2"
},
{
"relation": "next",
"url": "[base]/Patient?_lastUpdated=ge2026-10-01&_count=2&_offset=2"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
},
{
"fullUrl": "[base]/Patient/ejemplo-paciente-dimex",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-dimex",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "dimex",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "DIMEX"
},
{
"code": "PRC",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "Permanent Resident Card Number"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/dimex",
"value": "155812345678"
},
{
"assigner": {
"display": "Nicaragua"
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/pasaporte/NIC",
"value": "C01234567"
}
],
"name": [
{
"given": [
"José"
],
"use": "official",
"family": "Mendoza",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Mendoza"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
}
]
}
}
],
"telecom": [
{
"system": "phone",
"value": "+50670001122"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "NIC",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Nicaragua"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"line": [
"Calle 3, 100 metros al este de la rotonda, apartamento 4"
],
"use": "home",
"country": "CRI",
"state": "1",
"city": "115",
"district": "11501",
"text": "Calle 3, 100 metros al este de la rotonda, apartamento 4, San Pedro, Montes de Oca, San José"
}
],
"active": true,
"gender": "male",
"birthDate": "1984-11-02"
},
"search": {
"mode": "match"
}
}
]
}
Buscar por cédula u otro identificador, con POST
Forma: POST [base]/Patient/_searchcuerpo: identifier={sistema}|{valor}
Hace cualquier búsqueda con POST: los parámetros van en el cuerpo, como un formulario, en lugar de la URL. Se usa cuando los valores son datos personales, como una cédula, para que no queden en los registros de los servidores ni en el historial; la respuesta es la misma que con GET. En el ejemplo se repite la búsqueda por cédula u otro identificador.
Solicitud
POST [base]/Patient/_search HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/x-www-form-urlencoded
identifier=https://hl7.or.cr/fhir/sid/cedula-nacional|114250387
Respuesta: 1 resultado: Costarricense adulta (C1), igual que con GET
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "[base]/Patient?identifier=https://hl7.or.cr/fhir/sid/cedula-nacional|114250387"
}
],
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"mode": "match"
}
}
]
}
Crear
Forma: POST [base]/Patient
Registra un paciente en el MPI Nacional. El servidor valida el recurso contra el perfil, le asigna su id y devuelve su dirección. Lo hace el sistema que atiende a la persona por primera vez. Antes de crearlo debe buscarlo por su identificación o con $match, para no duplicarlo en el MPI (IHE PIXm ITI-104 y PMIR ITI-93). En el ejemplo se registra «Costarricense adulta (C1)»; la segunda respuesta es el rechazo de un recurso que no cumple la invariante cr-identificador-unico (No hay dos identificadores con el mismo system y el mismo valor).
Solicitud
POST [base]/Patient HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"meta": {
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Respuesta si se crea
HTTP/1.1 201 Created
Location: [base]/Patient/ejemplo-paciente-nacional/_history/1
ETag: W/"1"
Last-Modified: 2026-10-01T10:00:00-06:00
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Respuesta si no cumple el perfil (invariante cr-identificador-unico)
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "invariant",
"diagnostics": "cr-identificador-unico: No hay dos identificadores con el mismo system y el mismo valor.",
"expression": [
"Patient"
]
}
]
}
Actualizar
Forma: PUT [base]/Patient/{id}If-Match: W/"{versión}"
Reemplaza un paciente con una versión nueva completa, por ejemplo para corregir un dato. If-Match lleva la versión que se leyó: si otro sistema hizo un cambio mientras tanto, el servidor rechaza este, y así nadie pisa el trabajo de otro sin darse cuenta. En el ejemplo se actualiza «Costarricense adulta (C1)» sobre su versión 1; la segunda respuesta es el rechazo cuando otra persona ya la había cambiado.
Solicitud
PUT [base]/Patient/ejemplo-paciente-nacional HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
If-Match: W/"1"
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Respuesta si se actualiza
HTTP/1.1 200 OK
ETag: W/"2"
Last-Modified: 2026-10-02T08:15:00-06:00
Content-Type: application/fhir+json
{
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "2",
"lastUpdated": "2026-10-02T08:15:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
}
Respuesta si otra persona lo modificó antes (la versión ya no es la 1)
HTTP/1.1 412 Precondition Failed
Content-Type: application/fhir+json
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "conflict",
"diagnostics": "La versión actual de Patient/ejemplo-paciente-nacional no es la 1: léalo de nuevo y repita el cambio."
}
]
}
Historial del recurso
Forma: GET [base]/Patient/{id}/_history
Trae todas las versiones de un paciente, de la más reciente a la más antigua: qué cambió y cuándo, por ejemplo para revisar una corrección de datos o una unión de registros. En el ejemplo, «Costarricense adulta (C1)» tiene dos versiones: la creación y la actualización anterior.
Solicitud
GET [base]/Patient/ejemplo-paciente-nacional/_history HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Respuesta: las dos versiones, después de la actualización anterior
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "history",
"total": 2,
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "2",
"lastUpdated": "2026-10-02T08:15:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"request": {
"method": "PUT",
"url": "Patient/ejemplo-paciente-nacional"
},
"response": {
"status": "200 OK",
"etag": "W/\"2\""
}
},
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"request": {
"method": "POST",
"url": "Patient"
},
"response": {
"status": "201 Created",
"etag": "W/\"1\""
}
}
]
}
Emparejar (IHE PDQm ITI-119)
Forma: POST [base]/Patient/$match
Busca al paciente con los datos que tiene el sistema (nombre, sexo, fecha de nacimiento) cuando no tiene su identificación. El MPI devuelve los candidatos con un puntaje y un grado de coincidencia; el sistema o la persona usuaria decide cuál es (IHE PDQm ITI-119). En el ejemplo se busca con el nombre, el sexo y la fecha de nacimiento de «Costarricense adulta (C1)».
Solicitud
POST [base]/Patient/$match HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/fhir+json
{
"resourceType": "Parameters",
"parameter": [
{
"name": "resource",
"resource": {
"resourceType": "Patient",
"meta": {
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya"
}
],
"gender": "female",
"birthDate": "1990-04-12"
}
},
{
"name": "onlyCertainMatches",
"valueBoolean": false
},
{
"name": "count",
"valueInteger": 3
}
]
}
Respuesta: un candidato probable, con su puntaje
HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
"resourceType": "Bundle",
"type": "searchset",
"total": 1,
"entry": [
{
"fullUrl": "[base]/Patient/ejemplo-paciente-nacional",
"resource": {
"resourceType": "Patient",
"id": "ejemplo-paciente-nacional",
"meta": {
"versionId": "1",
"lastUpdated": "2026-10-01T10:00:00-06:00",
"profile": [
"https://hl7.or.cr/fhir/core/StructureDefinition/cr-patient"
]
},
"identifier": [
{
"type": {
"coding": [
{
"code": "cedula-nacional",
"system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
"display": "Cédula Nacional"
},
{
"code": "NI",
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"display": "National unique individual identifier"
}
]
},
"use": "official",
"system": "https://hl7.or.cr/fhir/sid/cedula-nacional",
"value": "114250387"
}
],
"name": [
{
"given": [
"Laura",
"Patricia"
],
"use": "official",
"family": "Solís Araya",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Solís"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Araya"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
}
],
"maritalStatus": {
"coding": [
{
"code": "M",
"system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
"display": "Married"
}
],
"text": "Casada"
},
"telecom": [
{
"system": "phone",
"value": "+50688881234",
"use": "mobile"
},
{
"system": "email",
"value": "laura.solis@correo-ejemplo.cr"
}
],
"extension": [
{
"extension": [
{
"valueCodeableConcept": {
"coding": [
{
"code": "CRI",
"system": "urn:iso:std:iso:3166"
}
],
"text": "Costa Rica"
},
"url": "code"
}
],
"url": "http://hl7.org/fhir/StructureDefinition/patient-nationality"
}
],
"address": [
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct",
"valueString": "San Pedro"
}
],
"line": [
"Del templo católico 300 metros norte, casa verde a mano derecha"
],
"use": "home",
"country": "CRI",
"state": "4",
"city": "402",
"district": "40201",
"text": "Del templo católico 300 metros norte, casa verde a mano derecha, San Pedro, Barva, Barva, Heredia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"code": "SPS",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "spouse"
}
],
"text": "Cónyuge"
}
],
"name": {
"given": [
"Andrés"
],
"use": "official",
"family": "Quesada Mora",
"_family": {
"extension": [
{
"extension": [
{
"url": "valor",
"valueString": "Quesada"
},
{
"url": "origen",
"valueCoding": {
"code": "FTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "father"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
},
{
"extension": [
{
"url": "valor",
"valueString": "Mora"
},
{
"url": "origen",
"valueCoding": {
"code": "MTH",
"system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
"display": "mother"
}
}
],
"url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
}
]
}
},
"telecom": [
{
"system": "phone",
"value": "+50688885678"
}
],
"gender": "male"
}
],
"active": true,
"gender": "female",
"birthDate": "1990-04-12"
},
"search": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/match-grade",
"valueCode": "probable"
}
],
"mode": "match",
"score": 0.9
}
}
]
}