Guía de Implementación Core de Costa Rica
0.1.0 - ci-build Costa Rica bandera

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.

Perfil de los recursos: Referencia a documento

URL oficial: https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference Versión: 0.1.0
Standards status: Draft Nombre computable: CRDocumentReference

Ficha con que el HIE de Costa Rica indexa un documento clínico, sin contenerlo: qué documento es, de qué paciente, quién lo emitió, qué tan confidencial es y dónde está. Hay una por cada versión del documento, que puede ser un documento clínico FHIR o un PDF.

Usos:

También puede consultar los usos en las estadísticas de IG de FHIR

Vistas formales del contenido del perfil

Descripción de perfiles, diferenciales, instantáneas y sus representaciones.

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: docRef-1, docRef-2, cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... meta SΣ 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... security SΣ 1..* Coding Las mismas etiquetas de seguridad del documento
Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... identifier SΣ 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
.... system SΣ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string The value that is unique
Example General: 123456
... version SΣC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... status ?!SΣ 1..1 code Estado de la ficha: current | superseded | entered-in-error
Vinculación: DocumentReferenceStatus (required): The status of the document reference.
... modality SΣ 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type SΣ 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category SΣ 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject SΣ 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context SC 0..1 Reference(Atención) Atención de la que resulta el documento
... facilityType SC 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting SC 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SΣC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date SΣ 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author SΣ 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo SΣ 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code SΣ 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target SΣ 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... Slices for securityLabel SΣ 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
Vinculación: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
.... securityLabel:confidencialidad SΣ 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
.... securityLabel:sensibilidad SΣ 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
... content SΣC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Where to access the document
..... contentType SΣC 1..1 code application/fhir+json | application/pdf
Vinculación: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language SΣ 1..1 code Idioma del documento (es)
Vinculación: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... url SΣ 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
Example General: http://www.acme.com/logo-small.png
..... size SΣ 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash SΣ 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... creation SΣC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
.... profile SΣ 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... value[x] SΣ 1..1 Code|uri|canonical
Vinculación: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.meta.​security Base extensible All Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
DocumentReference.status Base required DocumentReferenceStatus 📍5.0.0 Estándar FHIR
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel Base example Example set of Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.content.​attachment.contentType Base required Mime Types 📍5.0.0 Estándar FHIR
DocumentReference.content.​attachment.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.4

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference 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 DocumentReference 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 DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
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()

Esta estructura se deriva de DocumentReference .

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... meta S 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... security S 1..* Coding Las mismas etiquetas de seguridad del documento
... identifier S 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... system S 1..1 uri The namespace for the identifier value
.... value S 1..1 string The value that is unique
... version SC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... docStatus 0..0 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
... modality S 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type S 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category S 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject S 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context S 0..1 Reference(Atención) Atención de la que resulta el documento
... facilityType S 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting S 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date S 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author S 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo S 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... code S 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target S 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... Slices for securityLabel S 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
.... securityLabel:confidencialidad S 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
.... securityLabel:sensibilidad S 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode
... content SC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... attachment S 1..1 Attachment Where to access the document
..... contentType S 1..1 code application/fhir+json | application/pdf
..... language S 1..1 code Idioma del documento (es)
..... url S 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
..... size S 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash S 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... creation SC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
.... profile S 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... value[x] S 1..1 Code|uri|canonical
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas (diferencial)

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'
NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: docRef-1, docRef-2, cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... id Σ 0..1 id Logical id of this artifact
... meta SΣ 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... versionId Σ 0..1 id Version specific identifier
.... lastUpdated Σ 0..1 instant When the resource version last changed
.... source Σ 0..1 uri Identifies where the resource comes from
.... profile Σ 0..* canonical(StructureDefinition) Profiles this resource claims to conform to
.... security SΣ 1..* Coding Las mismas etiquetas de seguridad del documento
Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
.... tag Σ 0..* Coding Tags applied to this resource
Vinculación: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Vinculación: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... identifier SΣ 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
.... type Σ 0..1 CodeableConcept Description of identifier
Vinculación: IdentifierTypeCodes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
.... system SΣ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string The value that is unique
Example General: 123456
.... period Σ 0..1 Period Time period when id is/was valid for use
.... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... version SΣC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... basedOn 0..* Reference(Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | ImmunizationRecommendation | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | SupplyRequest | VisionPrescription) Procedure that caused this media to be created
... status ?!SΣ 1..1 code Estado de la ficha: current | superseded | entered-in-error
Vinculación: DocumentReferenceStatus (required): The status of the document reference.
... modality SΣ 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type SΣ 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category SΣ 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject SΣ 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context SC 0..1 Reference(Atención) Atención de la que resulta el documento
... event 0..* CodeableReference() Main clinical acts documented
Vinculación: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
... bodySite Σ 0..* CodeableReference(BodyStructure) Body part included
Vinculación: SNOMEDCTBodyStructures (example): SNOMED CT Body site concepts
... facilityType SC 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting SC 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SΣC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date SΣ 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author SΣ 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo SΣ 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code SΣ 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target SΣ 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... description Σ 0..1 markdown Human-readable description
... Slices for securityLabel SΣ 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
Vinculación: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
.... securityLabel:confidencialidad SΣ 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
.... securityLabel:sensibilidad SΣ 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
... content SΣC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Where to access the document
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... contentType SΣC 1..1 code application/fhir+json | application/pdf
Vinculación: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language SΣ 1..1 code Idioma del documento (es)
Vinculación: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... data C 0..1 base64Binary Data inline, base64ed
..... url SΣ 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
Example General: http://www.acme.com/logo-small.png
..... size SΣ 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash SΣ 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... title Σ 0..1 string Label to display in place of the data
Example General: Official Corporate Logo
..... creation SΣC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
..... height 0..1 positiveInt Height of the image in pixels (photo/video)
..... width 0..1 positiveInt Width of the image in pixels (photo/video)
..... frames 0..1 positiveInt Number of frames if > 1 (photo)
..... duration 0..1 decimal Length in seconds (audio / video)
..... pages 0..1 positiveInt Number of printed pages
.... profile SΣ 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... value[x] SΣ 1..1 Code|uri|canonical
Vinculación: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.meta.​security Base extensible All Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.meta.​tag Base example Common Tags 📍5.0.0 Estándar FHIR
DocumentReference.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​type Base extensible Identifier Type Codes 📍5.0.0 Estándar FHIR
DocumentReference.status Base required DocumentReferenceStatus 📍5.0.0 Estándar FHIR
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.event Base example v3 Code System ActCode 📦3.0.0 THO v7.4
DocumentReference.bodySite Base example SNOMED CT Body Structures 📍5.0.0 Estándar FHIR
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel Base example Example set of Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.content.​attachment.contentType Base required Mime Types 📍5.0.0 Estándar FHIR
DocumentReference.content.​attachment.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.4

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference 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 DocumentReference 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 DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
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()

Esta estructura se deriva de DocumentReference .

Vista de elementos clave

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: docRef-1, docRef-2, cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... meta SΣ 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... security SΣ 1..* Coding Las mismas etiquetas de seguridad del documento
Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... identifier SΣ 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
.... system SΣ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string The value that is unique
Example General: 123456
... version SΣC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... status ?!SΣ 1..1 code Estado de la ficha: current | superseded | entered-in-error
Vinculación: DocumentReferenceStatus (required): The status of the document reference.
... modality SΣ 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type SΣ 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category SΣ 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject SΣ 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context SC 0..1 Reference(Atención) Atención de la que resulta el documento
... facilityType SC 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting SC 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SΣC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date SΣ 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author SΣ 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo SΣ 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code SΣ 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target SΣ 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... Slices for securityLabel SΣ 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
Vinculación: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
.... securityLabel:confidencialidad SΣ 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
.... securityLabel:sensibilidad SΣ 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
... content SΣC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Where to access the document
..... contentType SΣC 1..1 code application/fhir+json | application/pdf
Vinculación: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language SΣ 1..1 code Idioma del documento (es)
Vinculación: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... url SΣ 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
Example General: http://www.acme.com/logo-small.png
..... size SΣ 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash SΣ 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... creation SΣC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
.... profile SΣ 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... value[x] SΣ 1..1 Code|uri|canonical
Vinculación: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.meta.​security Base extensible All Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
DocumentReference.status Base required DocumentReferenceStatus 📍5.0.0 Estándar FHIR
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel Base example Example set of Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.content.​attachment.contentType Base required Mime Types 📍5.0.0 Estándar FHIR
DocumentReference.content.​attachment.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.4

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference 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 DocumentReference 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 DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
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()

Vista diferencial

Esta estructura se deriva de DocumentReference .

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... meta S 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... security S 1..* Coding Las mismas etiquetas de seguridad del documento
... identifier S 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... system S 1..1 uri The namespace for the identifier value
.... value S 1..1 string The value that is unique
... version SC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... docStatus 0..0 registered | partial | preliminary | final | amended | corrected | appended | cancelled | entered-in-error | deprecated | unknown
... modality S 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type S 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category S 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject S 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context S 0..1 Reference(Atención) Atención de la que resulta el documento
... facilityType S 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting S 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date S 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author S 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo S 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... code S 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target S 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... Slices for securityLabel S 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
.... securityLabel:confidencialidad S 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
.... securityLabel:sensibilidad S 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode
... content SC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... attachment S 1..1 Attachment Where to access the document
..... contentType S 1..1 code application/fhir+json | application/pdf
..... language S 1..1 code Idioma del documento (es)
..... url S 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
..... size S 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash S 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... creation SC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
.... profile S 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... value[x] S 1..1 Code|uri|canonical
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas (diferencial)

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'

Vista instantáneaView

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. DocumentReference C 0..* DocumentReference Referencia a documento: la ficha del documento en el HIE
Constraints: docRef-1, docRef-2, cr-referencia-establecimiento-servicio, cr-referencia-identificador-unico, cr-referencia-identificador-documento, cr-referencia-etiquetas, cr-referencia-sensibilidad, cr-referencia-sensibilidad-v
... id Σ 0..1 id Logical id of this artifact
... meta SΣ 1..1 Meta Metadatos: las etiquetas de seguridad de la ficha
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... versionId Σ 0..1 id Version specific identifier
.... lastUpdated Σ 0..1 instant When the resource version last changed
.... source Σ 0..1 uri Identifies where the resource comes from
.... profile Σ 0..* canonical(StructureDefinition) Profiles this resource claims to conform to
.... security SΣ 1..* Coding Las mismas etiquetas de seguridad del documento
Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
.... tag Σ 0..* Coding Tags applied to this resource
Vinculación: CommonTags (example): Codes that represent various types of tags, commonly workflow-related; e.g. "Needs review by Dr. Jones".
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Vinculación: AllLanguages (required): IETF language tag for a human language
Additional BindingsPurpose
CommonLanguages Starter
... text 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
... contained 0..* Resource Contained, inline Resources
... extension 0..* Extension Additional content defined by implementations
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... identifier SΣ 2..* Identifier El identificador único de esta versión (urn:uuid) y la identificación del documento
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... use ?!Σ 0..1 code usual | official | temp | secondary | old (If known)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
.... type Σ 0..1 CodeableConcept Description of identifier
Vinculación: IdentifierTypeCodes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
.... system SΣ 1..1 uri The namespace for the identifier value
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string The value that is unique
Example General: 123456
.... period Σ 0..1 Period Time period when id is/was valid for use
.... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... version SΣC 0..1 string Versión del documento: 1, 2, 3
Constraints: cr-documento-version-value
... basedOn 0..* Reference(Appointment | AppointmentResponse | CarePlan | Claim | CommunicationRequest | Contract | CoverageEligibilityRequest | DeviceRequest | EnrollmentRequest | ImmunizationRecommendation | MedicationRequest | NutritionOrder | RequestOrchestration | ServiceRequest | SupplyRequest | VisionPrescription) Procedure that caused this media to be created
... status ?!SΣ 1..1 code Estado de la ficha: current | superseded | entered-in-error
Vinculación: DocumentReferenceStatus (required): The status of the document reference.
... modality SΣ 0..* CodeableConcept Modalidades de imagen DICOM (solo en documentos de imágenes)
Vinculación: Modality . (extensible)
... type SΣ 1..1 CodeableConcept Tipo de documento (LOINC), el mismo de su Composition
Vinculación: Tipo de documento clínico (extensible)
... category SΣ 1..1 CodeableConcept Clase de documento (LOINC): informe, nota
Vinculación: Clase de documento (extensible)
... subject SΣ 1..1 Reference(Paciente) Paciente del documento (su registro en el MPI)
... context SC 0..1 Reference(Atención) Atención de la que resulta el documento
... event 0..* CodeableReference() Main clinical acts documented
Vinculación: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented.
... bodySite Σ 0..* CodeableReference(BodyStructure) Body part included
Vinculación: SNOMEDCTBodyStructures (example): SNOMED CT Body site concepts
... facilityType SC 0..1 CodeableConcept Tipo de establecimiento del custodio (solo si no hay atención)
Vinculación: Tipos de establecimiento de salud (extensible)
... practiceSetting SC 0..1 CodeableConcept Servicio que emite el documento (solo si no hay atención)
Vinculación: Tipos de servicio de salud (extensible)
... period SΣC 0..1 Period Periodo de la atención, con fecha y hora
Constraints: cr-atencion-fecha-hora
... date SΣ 1..1 instant Cuándo se creó la referencia (no es la fecha del documento)
... author SΣ 1..* Reference(Rol del profesional | Profesional de salud | Organización) Autores del documento
... attester S 0..* BackboneElement Quién valida el documento (al menos la validación legal, si la tiene)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... mode S 1..1 CodeableConcept personal | professional | legal | official
Vinculación: CompositionAttestationMode (required)
.... time SC 1..1 dateTime Fecha y hora de la validación
Constraints: cr-documento-fecha-hora
.... party S 1..1 Reference(Rol del profesional | Profesional de salud | Organización) Quién valida
... custodian S 1..1 Reference(Organización) Entidad que emite y custodia el documento
... relatesTo SΣ 0..* BackboneElement Referencia que esta reemplaza, amplía o transforma
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code SΣ 1..1 CodeableConcept replaces | appends | transforms
Vinculación: Relación entre referencias a documentos (required)
.... target SΣ 1..1 Reference(Referencia a documento) Referencia del documento relacionado
... description Σ 0..1 markdown Human-readable description
... Slices for securityLabel SΣ 1..* CodeableConcept Confidencialidad y sensibilidad del documento
Slice: Sin orden, Abierto by value:coding.system
Vinculación: SecurityLabelExamples (example): Example Security Labels from the Healthcare Privacy and Security Classification System.
.... securityLabel:confidencialidad SΣ 1..1 CodeableConcept N | R | V
Vinculación: Confidencialidad (required)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
.... securityLabel:sensibilidad SΣ 0..* CodeableConcept PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS
Vinculación: Sensibilidad de la información (required)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
... content SΣC 1..1 BackboneElement Dónde está el documento y en qué formato
Constraints: cr-referencia-sin-datos, cr-referencia-tipo-contenido, cr-referencia-formato
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Where to access the document
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... contentType SΣC 1..1 code application/fhir+json | application/pdf
Vinculación: MimeTypes (required): BCP 13 (RFCs 2045, 2046, 2047, 4288, 4289 and 2049)
Example General: text/plain; charset=UTF-8, image/png
..... language SΣ 1..1 code Idioma del documento (es)
Vinculación: AllLanguages (required): IETF language tag for a human language.
Additional BindingsPurpose
CommonLanguages Starter

Example General: en-AU
..... data C 0..1 base64Binary Data inline, base64ed
..... url SΣ 1..1 url URL del Bundle del documento o del Binary del PDF (o urn:uuid dentro del envío)
Example General: http://www.acme.com/logo-small.png
..... size SΣ 0..1 integer64 Tamaño en bytes (lo calcula el repositorio)
..... hash SΣ 0..1 base64Binary Huella SHA-1 en base64 (la calcula el repositorio)
..... title Σ 0..1 string Label to display in place of the data
Example General: Official Corporate Logo
..... creation SΣC 1..1 dateTime Fecha del documento (la de su Composition)
Constraints: cr-documento-fecha-hora
..... height 0..1 positiveInt Height of the image in pixels (photo/video)
..... width 0..1 positiveInt Width of the image in pixels (photo/video)
..... frames 0..1 positiveInt Number of frames if > 1 (photo)
..... duration 0..1 decimal Length in seconds (audio / video)
..... pages 0..1 positiveInt Number of printed pages
.... profile SΣ 1..1 BackboneElement Formato: el perfil del documento FHIR o, para un PDF, mimeTypeSufficient de IHE
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
..... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
..... value[x] SΣ 1..1 Code|uri|canonical
Vinculación: HL7 ValueSet of Format Codes for use with Document Sharing (preferred): Document Format Codes.
...... valueCoding Coding
...... valueCanonical canonical(Any)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
DocumentReference.meta.​security Base extensible All Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.meta.​tag Base example Common Tags 📍5.0.0 Estándar FHIR
DocumentReference.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
DocumentReference.identifier.​type Base extensible Identifier Type Codes 📍5.0.0 Estándar FHIR
DocumentReference.status Base required DocumentReferenceStatus 📍5.0.0 Estándar FHIR
DocumentReference.modality Base extensible Modality . ⏿2025.3.20250714 tx.fhir.org
DocumentReference.type Base extensible Tipo de documento clínico 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.category Base extensible Clase de documento 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.event Base example v3 Code System ActCode 📦3.0.0 THO v7.4
DocumentReference.bodySite Base example SNOMED CT Body Structures 📍5.0.0 Estándar FHIR
DocumentReference.facilityType Base extensible Tipos de establecimiento de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.practiceSetting Base extensible Tipos de servicio de salud 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.attester.​mode Base required Composition Attestation Mode 📦5.0.0 Estándar FHIR
DocumentReference.relatesTo.​code Base required Relación entre referencias a documentos 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel Base example Example set of Security Labels 📍5.0.0 Estándar FHIR
DocumentReference.securityLabel:confidencialidad Base required Confidencialidad 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.securityLabel:sensibilidad Base required Sensibilidad de la información 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
DocumentReference.content.​attachment.contentType Base required Mime Types 📍5.0.0 Estándar FHIR
DocumentReference.content.​attachment.language Base required All Languages 📍5.0.0 Estándar FHIR
DocumentReference.content.​profile.value[x] Base preferred HL7 ValueSet of Format Codes for use with Document Sharing 📦2.1.0 THO v7.4

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-atencion-fecha-hora error DocumentReference.period Los periodos de la atención llevan fecha y hora, no solo la fecha. (start.empty() or start.toString().contains('T')) and (end.empty() or end.toString().contains('T'))
cr-documento-fecha-hora error DocumentReference.attester.time, DocumentReference.content.attachment.creation La fecha lleva fecha y hora, no solo la fecha. toString().contains('T')
cr-documento-version-value error DocumentReference.version La versión es un número entero positivo: 1, 2, 3. matches('^[1-9][0-9]*$')
cr-referencia-establecimiento-servicio error DocumentReference Un documento sin atención indica el tipo de establecimiento y el servicio que lo emite; con atención, se deducen de ella y no se envían (docRef-1 y docRef-2 de R5, que aquí son error). iif(context.exists(), facilityType.empty() and practiceSetting.empty(), facilityType.exists() and practiceSetting.exists())
cr-referencia-etiquetas error DocumentReference La referencia lleva en meta.security las mismas etiquetas de seguridad del documento (securityLabel). securityLabel.coding.all((system & '|' & code) in %resource.meta.security.select(system & '|' & code))
cr-referencia-formato error DocumentReference.content Un documento FHIR indica el perfil del documento (valueCanonical); un PDF, el formato mimeTypeSufficient de IHE (valueCoding). (attachment.contentType = 'application/fhir+json' implies profile.value.ofType(canonical).exists()) and (attachment.contentType = 'application/pdf' implies profile.value.ofType(Coding).where(system = 'http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode' and code = 'urn:ihe:iti:xds:2017:mimeTypeSufficient').exists())
cr-referencia-identificador-documento error DocumentReference La referencia lleva la identificación del documento: system https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento. identifier.where(system.matches('^https://hl7\\.or\\.cr/fhir/sid/documento/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')).count() = 1
cr-referencia-identificador-unico error DocumentReference La referencia lleva un solo identificador único: system urn:ietf:rfc:3986 y un value urn:uuid:. identifier.where(system = 'urn:ietf:rfc:3986').count() = 1 and identifier.where(system = 'urn:ietf:rfc:3986').value.matches('^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$')
cr-referencia-sensibilidad error DocumentReference Un documento con una sensibilidad tiene confidencialidad R o V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
cr-referencia-sensibilidad-v error DocumentReference Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies securityLabel.coding.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
cr-referencia-sin-datos error DocumentReference.content El contenido no viaja dentro de la referencia: va por URL. attachment.data.empty()
cr-referencia-tipo-contenido error DocumentReference.content El contenido es un documento clínico FHIR (application/fhir+json) o un PDF (application/pdf). attachment.contentType = 'application/fhir+json' or attachment.contentType = 'application/pdf'
dom-2 error DocumentReference If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error DocumentReference 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 DocumentReference 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 DocumentReference If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice DocumentReference A resource should have narrative for robust management text.`div`.exists()
docRef-1 warning DocumentReference facilityType SHALL only be present if context is not an encounter facilityType.empty() or context.where(resolve() is Encounter).empty()
docRef-2 warning DocumentReference practiceSetting SHALL only be present if context is not present practiceSetting.empty() or context.where(resolve() is Encounter).empty()
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()

Esta estructura se deriva de DocumentReference .

 

Otras representaciones de perfil: CSV, Excel, Schematron

Notas:

Uso en el HIE

Repositorio de documentos. Referencias a los documentos: una por versión. La versión anterior pasa a superseded cuando llega la que la reemplaza.

Ver también Servicios del HIE.

Consultas

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 · Enviar documentos

Leer

Leer
Forma: GET [base]/DocumentReference/{id}

Lee una referencia a documento del repositorio de documentos por su id, la parte final de su URL. Se usa para resolver una referencia que otro recurso hace a una referencia a documento. En el ejemplo se lee «Referencia a un informe de imágenes»; la segunda respuesta es la de un id que no existe.

Solicitud

GET [base]/DocumentReference/ejemplo-referencia-informe-imagenes 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": "DocumentReference",
  "id": "ejemplo-referencia-informe-imagenes",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2026-10-01T10:00:00-06:00",
    "security": [
      {
        "code": "N",
        "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
        "display": "normal"
      }
    ],
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
    ]
  },
  "identifier": [
    {
      "system": "urn:ietf:rfc:3986",
      "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
    },
    {
      "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
      "value": "INF-IMG-2026-000871"
    }
  ],
  "type": {
    "coding": [
      {
        "code": "18748-4",
        "system": "http://loinc.org"
      }
    ],
    "text": "Informe de imágenes médicas"
  },
  "category": [
    {
      "coding": [
        {
          "code": "LP173421-1",
          "system": "http://loinc.org"
        }
      ],
      "text": "Informe"
    }
  ],
  "context": [
    {
      "reference": "Encounter/ejemplo-atencion-resonancia",
      "display": "Resonancia magnética"
    }
  ],
  "period": {
    "start": "2026-09-30T08:15:00-06:00",
    "end": "2026-09-30T08:55:00-06:00"
  },
  "author": [
    {
      "reference": "PractitionerRole/ejemplo-rol-radiologia",
      "display": "Carlos Jiménez Solano"
    }
  ],
  "attester": [
    {
      "mode": {
        "coding": [
          {
            "code": "legal",
            "system": "http://hl7.org/fhir/composition-attestation-mode",
            "display": "Legal"
          }
        ]
      },
      "time": "2026-09-30T10:25:00-06:00",
      "party": {
        "reference": "PractitionerRole/ejemplo-rol-radiologia",
        "display": "Carlos Jiménez Solano"
      }
    }
  ],
  "modality": [
    {
      "coding": [
        {
          "code": "MR",
          "system": "http://dicom.nema.org/resources/ontology/DCM",
          "display": "Magnetic Resonance"
        }
      ]
    }
  ],
  "securityLabel": [
    {
      "coding": [
        {
          "code": "N",
          "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
          "display": "normal"
        }
      ]
    }
  ],
  "content": [
    {
      "attachment": {
        "language": "es",
        "creation": "2026-09-30T10:20:00-06:00",
        "contentType": "application/fhir+json",
        "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
        "size": "18452",
        "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
      },
      "profile": [
        {
          "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
        }
      ]
    }
  ],
  "version": "1",
  "status": "current",
  "subject": {
    "reference": "Patient/ejemplo-paciente-dimex",
    "display": "José Mendoza"
  },
  "date": "2026-09-30T10:30:00-06:00",
  "custodian": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

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 DocumentReference/no-existe."
    }
  ]
}
Buscar

Buscar por paciente
Forma: GET [base]/DocumentReference?patient=Patient/{id}

Trae los documentos de un paciente. Es la búsqueda principal del repositorio (IHE MHD ITI-67); se combina con status=current para no traer versiones sustituidas. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: patient=Patient/ejemplo-paciente-dimex.

Solicitud

GET [base]/DocumentReference?patient=Patient/ejemplo-paciente-dimex HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?patient=Patient/ejemplo-paciente-dimex"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por estado
Forma: GET [base]/DocumentReference?status={código}

Trae solo las referencias vigentes (current) y deja fuera las sustituidas por una versión nueva. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: status=current.

Solicitud

GET [base]/DocumentReference?status=current&_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 Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 3,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?status=current&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/DocumentReference?status=current&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por identificador
Forma: GET [base]/DocumentReference?identifier={sistema}|{valor}

Encuentra la referencia de un documento por su identificador. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: identifier=urn:ietf:rfc:3986|urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90.

Solicitud

GET [base]/DocumentReference?identifier=urn:ietf:rfc:3986|urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Referencia a un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?identifier=urn:ietf:rfc:3986|urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por tipo
Forma: GET [base]/DocumentReference?type={sistema}|{código}

Busca documentos por tipo (LOINC); por ejemplo, los informes de imágenes médicas. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: type=http://loinc.org|18748-4.

Solicitud

GET [base]/DocumentReference?type=http://loinc.org|18748-4 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?type=http://loinc.org|18748-4"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por categoría
Forma: GET [base]/DocumentReference?category={sistema}|{código}

Busca documentos por categoría, para agruparlos en una vista. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: category=http://loinc.org|LP173421-1.

Solicitud

GET [base]/DocumentReference?category=http://loinc.org|LP173421-1&_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 Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 3,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?category=http://loinc.org|LP173421-1&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/DocumentReference?category=http://loinc.org|LP173421-1&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por fecha del documento
Forma: GET [base]/DocumentReference?date={fecha}

Busca por la fecha del documento. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: date=2026-09-30.

Solicitud

GET [base]/DocumentReference?date=2026-09-30 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?date=2026-09-30"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por periodo atendido
Forma: GET [base]/DocumentReference?period={fecha}

Busca por el periodo de la atención que el documento registra: los documentos de lo que pasó en una fecha. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: period=2026-09-30.

Solicitud

GET [base]/DocumentReference?period=2026-09-30 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?period=2026-09-30"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por tipo de establecimiento
Forma: GET [base]/DocumentReference?facility={sistema}|{código}

Busca por tipo de establecimiento. Solo lo tienen los documentos que no resultan de una atención registrada en el HIE. En el ejemplo se usa el dato de «Resultado de laboratorio en PDF, sin atención»: facility=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud|centro-diagnostico-tratamiento.

Solicitud

GET [base]/DocumentReference?facility=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud|centro-diagnostico-tratamiento HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Resultado de laboratorio en PDF, sin atención

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?facility=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud|centro-diagnostico-tratamiento"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-resultado-laboratorio",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-resultado-laboratorio",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:4d8f2a6c-1b3e-4c7d-9a5f-6e0b2c8d4a19"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101234567",
            "value": "LAB-2026-031552"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "11502-2",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de laboratorio"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-laboratorio",
            "display": "María Fernanda Vargas Quesada"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-10-02T11:35:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-laboratorio",
              "display": "María Fernanda Vargas Quesada"
            }
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "contentType": "application/pdf",
              "language": "es",
              "url": "https://hie.example.cr/fhir/Binary/4d8f2a6c-1b3e-4c7d-9a5f-6e0b2c8d4a19",
              "size": "48730",
              "hash": "qZk+NkcGgWq6PiVxeFDCbJzQ2J0=",
              "creation": "2026-10-02T11:30:00-06:00"
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-nacional",
          "display": "Laura Patricia Solís Araya"
        },
        "date": "2026-10-02T11:40:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-organizacion-laboratorio",
          "display": "Laboratorio Clínico de Ejemplo"
        },
        "facilityType": {
          "coding": [
            {
              "code": "centro-diagnostico-tratamiento",
              "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud",
              "display": "Centros de Diagnóstico y Tratamiento"
            }
          ]
        },
        "practiceSetting": {
          "coding": [
            {
              "code": "laboratorio-clinico",
              "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud",
              "display": "Laboratorio clínico"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por servicio que lo emite
Forma: GET [base]/DocumentReference?setting={sistema}|{código}

Busca por el servicio que emitió el documento. Igual que el tipo de establecimiento, solo lo tienen los documentos sin atención. En el ejemplo se usa el dato de «Resultado de laboratorio en PDF, sin atención»: setting=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud|laboratorio-clinico.

Solicitud

GET [base]/DocumentReference?setting=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud|laboratorio-clinico HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Resultado de laboratorio en PDF, sin atención

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?setting=https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud|laboratorio-clinico"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-resultado-laboratorio",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-resultado-laboratorio",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:4d8f2a6c-1b3e-4c7d-9a5f-6e0b2c8d4a19"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101234567",
            "value": "LAB-2026-031552"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "11502-2",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de laboratorio"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-laboratorio",
            "display": "María Fernanda Vargas Quesada"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-10-02T11:35:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-laboratorio",
              "display": "María Fernanda Vargas Quesada"
            }
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "contentType": "application/pdf",
              "language": "es",
              "url": "https://hie.example.cr/fhir/Binary/4d8f2a6c-1b3e-4c7d-9a5f-6e0b2c8d4a19",
              "size": "48730",
              "hash": "qZk+NkcGgWq6PiVxeFDCbJzQ2J0=",
              "creation": "2026-10-02T11:30:00-06:00"
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-nacional",
          "display": "Laura Patricia Solís Araya"
        },
        "date": "2026-10-02T11:40:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-organizacion-laboratorio",
          "display": "Laboratorio Clínico de Ejemplo"
        },
        "facilityType": {
          "coding": [
            {
              "code": "centro-diagnostico-tratamiento",
              "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud",
              "display": "Centros de Diagnóstico y Tratamiento"
            }
          ]
        },
        "practiceSetting": {
          "coding": [
            {
              "code": "laboratorio-clinico",
              "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud",
              "display": "Laboratorio clínico"
            }
          ]
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por modalidad
Forma: GET [base]/DocumentReference?modality={sistema}|{código}

Busca estudios de imágenes por modalidad DICOM; por ejemplo, las resonancias magnéticas (MR). En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: modality=http://dicom.nema.org/resources/ontology/DCM|MR.

Solicitud

GET [base]/DocumentReference?modality=http://dicom.nema.org/resources/ontology/DCM|MR HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?modality=http://dicom.nema.org/resources/ontology/DCM|MR"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por etiqueta de seguridad
Forma: GET [base]/DocumentReference?security-label={sistema}|{código}

Busca por etiqueta de seguridad: confidencialidad o sensibilidad del documento. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: security-label=http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N.

Solicitud

GET [base]/DocumentReference?security-label=http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N&_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 Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 3,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?security-label=http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/DocumentReference?security-label=http://terminology.hl7.org/CodeSystem/v3-Confidentiality|N&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por autor
Forma: GET [base]/DocumentReference?author=PractitionerRole/{id}

Trae los documentos que escribió un profesional. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: author=PractitionerRole/ejemplo-rol-radiologia.

Solicitud

GET [base]/DocumentReference?author=PractitionerRole/ejemplo-rol-radiologia HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?author=PractitionerRole/ejemplo-rol-radiologia"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por custodio
Forma: GET [base]/DocumentReference?custodian=Organization/{id}

Trae los documentos que custodia una organización. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: custodian=Organization/ejemplo-establecimiento.

Solicitud

GET [base]/DocumentReference?custodian=Organization/ejemplo-establecimiento HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?custodian=Organization/ejemplo-establecimiento"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por formato
Forma: GET [base]/DocumentReference?format-canonical={URL canónica}

Busca por formato: los documentos FHIR de un perfil. Un PDF no tiene perfil y no aparece en esta búsqueda. En el ejemplo se usa el dato de «Referencia a un informe de imágenes»: format-canonical=https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento.

Solicitud

GET [base]/DocumentReference?format-canonical=https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Referencia a un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?format-canonical=https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por documento relacionado
Forma: GET [base]/DocumentReference?relatesto=DocumentReference/{id}

Trae las referencias relacionadas con otra: su PDF, su corrección o su adenda. En el ejemplo se usa el dato de «PDF de un informe de imágenes»: relatesto=DocumentReference/ejemplo-referencia-informe-imagenes.

Solicitud

GET [base]/DocumentReference?relatesto=DocumentReference/ejemplo-referencia-informe-imagenes HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: PDF de un informe de imágenes

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?relatesto=DocumentReference/ejemplo-referencia-informe-imagenes"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por paciente, con POST
Forma: POST [base]/DocumentReference/_search
cuerpo: patient=Patient/{id}

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 paciente.

Solicitud

POST [base]/DocumentReference/_search HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/x-www-form-urlencoded

patient=Patient/ejemplo-paciente-dimex

Respuesta: 2 resultados: Referencia a un informe de imágenes; PDF de un informe de imágenes, igual que con GET

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/DocumentReference?patient=Patient/ejemplo-paciente-dimex"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
              "size": "18452",
              "hash": "2jmj7l5rSw0yVb/vlWAYkK/YBwk="
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/DocumentReference/ejemplo-referencia-informe-imagenes-pdf",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-referencia-informe-imagenes-pdf",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871-PDF"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/pdf",
              "url": "https://hie.example.cr/fhir/Binary/9c2e7d41-6a3b-4f8e-b1d5-07a4c3e2f610",
              "size": "96214",
              "hash": "Lve95gjOVATpfV8EL5X4nxwjKHE="
            },
            "profile": [
              {
                "valueCoding": {
                  "code": "urn:ihe:iti:xds:2017:mimeTypeSufficient",
                  "system": "http://ihe.net/fhir/ihe.formatcode.fhir/CodeSystem/formatcode"
                }
              }
            ]
          }
        ],
        "relatesTo": [
          {
            "code": {
              "coding": [
                {
                  "code": "transforms",
                  "system": "http://hl7.org/fhir/document-relationship-type",
                  "display": "Transforms"
                }
              ]
            },
            "target": {
              "reference": "DocumentReference/ejemplo-referencia-informe-imagenes",
              "display": "Referencia a un informe de imágenes"
            }
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}
Enviar documentos

Enviar documentos (IHE MHD ITI-65)
Forma: POST [base]
cuerpo: Bundle de tipo transaction

Envía al repositorio uno o varios documentos en una sola transacción: el lote de envío, la referencia de cada documento, el documento y sus firmas (IHE MHD ITI-65). El servidor guarda todo o nada: si una entrada no cumple su perfil, no se guarda ninguna. En el ejemplo se envía «Envío de un informe al HIE»: un informe de imágenes con su referencia, su lote, la firma del radiólogo y el sello del hospital; la segunda respuesta es el rechazo de toda la transacción porque una entrada no cumple su perfil.

Solicitud

POST [base] HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "id": "ejemplo-envio-informe-imagenes",
  "meta": {
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-envio-documentos"
    ]
  },
  "entry": [
    {
      "request": {
        "method": "POST",
        "url": "List"
      },
      "fullUrl": "urn:uuid:8a1d2c3b-4e5f-4a6b-9c7d-0e1f2a3b4c5d",
      "resource": {
        "resourceType": "List",
        "id": "ejemplo-envio-lote",
        "meta": {
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-list-lote-envio"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:8a1d2c3b-4e5f-4a6b-9c7d-0e1f2a3b4c5d"
          }
        ],
        "subject": [
          {
            "reference": "Patient/ejemplo-paciente-dimex",
            "display": "José Mendoza"
          }
        ],
        "entry": [
          {
            "item": {
              "reference": "urn:uuid:5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e"
            }
          }
        ],
        "status": "current",
        "mode": "working",
        "code": {
          "coding": [
            {
              "code": "submissionset",
              "system": "https://profiles.ihe.net/ITI/MHD/CodeSystem/MHDlistTypes"
            }
          ]
        },
        "date": "2026-09-30T10:31:00-06:00",
        "source": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "DocumentReference"
      },
      "fullUrl": "urn:uuid:5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
      "resource": {
        "resourceType": "DocumentReference",
        "id": "ejemplo-envio-referencia",
        "meta": {
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-documentreference"
          ]
        },
        "identifier": [
          {
            "system": "urn:ietf:rfc:3986",
            "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
          },
          {
            "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
            "value": "INF-IMG-2026-000871"
          }
        ],
        "type": {
          "coding": [
            {
              "code": "18748-4",
              "system": "http://loinc.org"
            }
          ],
          "text": "Informe de imágenes médicas"
        },
        "category": [
          {
            "coding": [
              {
                "code": "LP173421-1",
                "system": "http://loinc.org"
              }
            ],
            "text": "Informe"
          }
        ],
        "context": [
          {
            "reference": "Encounter/ejemplo-atencion-resonancia",
            "display": "Resonancia magnética"
          }
        ],
        "period": {
          "start": "2026-09-30T08:15:00-06:00",
          "end": "2026-09-30T08:55:00-06:00"
        },
        "author": [
          {
            "reference": "PractitionerRole/ejemplo-rol-radiologia",
            "display": "Carlos Jiménez Solano"
          }
        ],
        "attester": [
          {
            "mode": {
              "coding": [
                {
                  "code": "legal",
                  "system": "http://hl7.org/fhir/composition-attestation-mode",
                  "display": "Legal"
                }
              ]
            },
            "time": "2026-09-30T10:25:00-06:00",
            "party": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "modality": [
          {
            "coding": [
              {
                "code": "MR",
                "system": "http://dicom.nema.org/resources/ontology/DCM",
                "display": "Magnetic Resonance"
              }
            ]
          }
        ],
        "securityLabel": [
          {
            "coding": [
              {
                "code": "N",
                "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                "display": "normal"
              }
            ]
          }
        ],
        "content": [
          {
            "attachment": {
              "language": "es",
              "creation": "2026-09-30T10:20:00-06:00",
              "contentType": "application/fhir+json",
              "url": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes"
            },
            "profile": [
              {
                "valueCanonical": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
              }
            ]
          }
        ],
        "version": "1",
        "status": "current",
        "subject": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "date": "2026-09-30T10:30:00-06:00",
        "custodian": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      }
    },
    {
      "request": {
        "method": "PUT",
        "url": "Bundle/ejemplo-bundle-documento-imagenes"
      },
      "fullUrl": "https://hie.example.cr/fhir/Bundle/ejemplo-bundle-documento-imagenes",
      "resource": {
        "resourceType": "Bundle",
        "id": "ejemplo-bundle-documento-imagenes",
        "meta": {
          "security": [
            {
              "code": "N",
              "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
              "display": "normal"
            }
          ],
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-bundle-documento"
          ]
        },
        "identifier": {
          "system": "urn:ietf:rfc:3986",
          "value": "urn:uuid:3f6b1c2a-9d4e-4b7a-8c1f-2e5d6a7b8c90"
        },
        "entry": [
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/Composition/ejemplo-documento-imagenes",
            "resource": {
              "resourceType": "Composition",
              "id": "ejemplo-documento-imagenes",
              "meta": {
                "security": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
                    "code": "N",
                    "display": "normal"
                  }
                ],
                "profile": [
                  "https://hl7.or.cr/fhir/core/StructureDefinition/cr-composition"
                ]
              },
              "identifier": [
                {
                  "system": "https://hl7.or.cr/fhir/sid/documento/cj-3101123456",
                  "value": "INF-IMG-2026-000871"
                }
              ],
              "type": {
                "coding": [
                  {
                    "code": "18748-4",
                    "system": "http://loinc.org"
                  }
                ],
                "text": "Informe de imágenes médicas"
              },
              "subject": [
                {
                  "reference": "Patient/ejemplo-paciente-dimex",
                  "display": "José Mendoza"
                }
              ],
              "author": [
                {
                  "reference": "PractitionerRole/ejemplo-rol-radiologia",
                  "display": "Carlos Jiménez Solano"
                }
              ],
              "attester": [
                {
                  "mode": {
                    "coding": [
                      {
                        "code": "legal",
                        "system": "http://hl7.org/fhir/composition-attestation-mode",
                        "display": "Legal"
                      }
                    ]
                  },
                  "time": "2026-09-30T10:25:00-06:00",
                  "party": {
                    "reference": "PractitionerRole/ejemplo-rol-radiologia",
                    "display": "Carlos Jiménez Solano"
                  }
                }
              ],
              "section": [
                {
                  "text": {
                    "status": "generated",
                    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ruptura parcial del ligamento cruzado anterior. Menisco medial sin alteraciones.</div>"
                  },
                  "title": "Hallazgos",
                  "code": {
                    "coding": [
                      {
                        "code": "59776-5",
                        "system": "http://loinc.org"
                      }
                    ]
                  }
                },
                {
                  "text": {
                    "status": "generated",
                    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Ruptura parcial del ligamento cruzado anterior.</div>"
                  },
                  "title": "Conclusión",
                  "code": {
                    "coding": [
                      {
                        "code": "19005-8",
                        "system": "http://loinc.org"
                      }
                    ]
                  }
                }
              ],
              "encounter": {
                "reference": "Encounter/ejemplo-atencion-resonancia",
                "display": "Resonancia magnética"
              },
              "title": "Informe de resonancia magnética de rodilla derecha",
              "custodian": {
                "reference": "Organization/ejemplo-establecimiento",
                "display": "Hospital Privado de Ejemplo"
              },
              "version": "1",
              "status": "final",
              "date": "2026-09-30T10:20:00-06:00"
            }
          },
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/Patient/ejemplo-paciente-dimex",
            "resource": {
              "resourceType": "Patient",
              "id": "ejemplo-paciente-dimex",
              "meta": {
                "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"
            }
          },
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/Encounter/ejemplo-atencion-resonancia",
            "resource": {
              "resourceType": "Encounter",
              "id": "ejemplo-atencion-resonancia",
              "meta": {
                "profile": [
                  "https://hl7.or.cr/fhir/core/StructureDefinition/cr-encounter"
                ]
              },
              "identifier": [
                {
                  "system": "https://hl7.or.cr/fhir/sid/atencion/cj-3101123456",
                  "value": "IMG-2026-000871"
                }
              ],
              "class": [
                {
                  "coding": [
                    {
                      "code": "AMB",
                      "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
                      "display": "ambulatory"
                    }
                  ],
                  "text": "Ambulatoria"
                }
              ],
              "subject": {
                "identifier": {
                  "system": "https://hl7.or.cr/fhir/sid/dimex",
                  "value": "155812345678"
                },
                "display": "José Mendoza"
              },
              "serviceType": [
                {
                  "concept": {
                    "coding": [
                      {
                        "code": "imagenes-medicas",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-servicio-salud",
                        "display": "Imágenes médicas"
                      }
                    ]
                  },
                  "reference": {
                    "reference": "HealthcareService/ejemplo-servicio-resonancia",
                    "display": "Resonancia magnética"
                  }
                }
              ],
              "actualPeriod": {
                "start": "2026-09-30T08:15:00-06:00",
                "end": "2026-09-30T08:55:00-06:00"
              },
              "participant": [
                {
                  "type": [
                    {
                      "coding": [
                        {
                          "code": "ATND",
                          "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
                          "display": "attender"
                        }
                      ],
                      "text": "Responsable de la atención"
                    }
                  ],
                  "actor": {
                    "reference": "PractitionerRole/ejemplo-rol-radiologia",
                    "display": "Carlos Jiménez Solano"
                  }
                }
              ],
              "location": [
                {
                  "location": {
                    "reference": "Location/ejemplo-ubicacion-radiologia",
                    "display": "Servicio de Radiología"
                  }
                }
              ],
              "status": "completed",
              "serviceProvider": {
                "reference": "Organization/ejemplo-establecimiento",
                "display": "Hospital Privado de Ejemplo"
              }
            }
          },
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/PractitionerRole/ejemplo-rol-radiologia",
            "resource": {
              "resourceType": "PractitionerRole",
              "id": "ejemplo-rol-radiologia",
              "meta": {
                "profile": [
                  "https://hl7.or.cr/fhir/core/StructureDefinition/cr-practitioner-role"
                ]
              },
              "identifier": [
                {
                  "system": "https://hl7.or.cr/fhir/sid/rol/cj-3101123456",
                  "value": "MED-0345"
                }
              ],
              "period": {
                "start": "2024-02-01"
              },
              "location": [
                {
                  "reference": "Location/ejemplo-ubicacion-radiologia",
                  "display": "Servicio de Radiología"
                }
              ],
              "code": [
                {
                  "coding": [
                    {
                      "code": "medicina",
                      "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud",
                      "display": "Medicina"
                    }
                  ]
                }
              ],
              "specialty": [
                {
                  "coding": [
                    {
                      "code": "06.05.01",
                      "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-especialidad-salud",
                      "display": "Medicina con especialidad en Radiología e Imágenes Médicas"
                    }
                  ]
                }
              ],
              "contact": [
                {
                  "telecom": [
                    {
                      "system": "phone",
                      "value": "+50622220000;ext=2110"
                    },
                    {
                      "system": "email",
                      "value": "radiologia@hospital-ejemplo.cr"
                    }
                  ]
                }
              ],
              "active": true,
              "practitioner": {
                "reference": "Practitioner/ejemplo-profesional-radiologia",
                "display": "Carlos Jiménez Solano"
              },
              "organization": {
                "reference": "Organization/ejemplo-establecimiento",
                "display": "Hospital Privado de Ejemplo"
              }
            }
          },
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/Practitioner/ejemplo-profesional-radiologia",
            "resource": {
              "resourceType": "Practitioner",
              "id": "ejemplo-profesional-radiologia",
              "meta": {
                "profile": [
                  "https://hl7.or.cr/fhir/core/StructureDefinition/cr-practitioner"
                ]
              },
              "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": "204560789"
                },
                {
                  "type": {
                    "coding": [
                      {
                        "code": "codigo-colegiado",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion",
                        "display": "Código de colegiado"
                      },
                      {
                        "code": "LN",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                        "display": "License number"
                      }
                    ]
                  },
                  "use": "official",
                  "system": "https://hl7.or.cr/fhir/sid/colegiado/cmc",
                  "value": "23456"
                }
              ],
              "name": [
                {
                  "given": [
                    "Carlos"
                  ],
                  "use": "official",
                  "family": "Jiménez Solano",
                  "_family": {
                    "extension": [
                      {
                        "extension": [
                          {
                            "url": "valor",
                            "valueString": "Jiménez"
                          }
                        ],
                        "url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-primer-apellido"
                      },
                      {
                        "extension": [
                          {
                            "url": "valor",
                            "valueString": "Solano"
                          }
                        ],
                        "url": "https://hl7.or.cr/fhir/core/StructureDefinition/cr-segundo-apellido"
                      }
                    ]
                  }
                }
              ],
              "qualification": [
                {
                  "identifier": [
                    {
                      "system": "https://hl7.or.cr/fhir/sid/colegiado/cmc",
                      "value": "23456"
                    }
                  ],
                  "period": {
                    "start": "2008-02-20"
                  },
                  "code": {
                    "coding": [
                      {
                        "code": "medicina",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-profesion-salud",
                        "display": "Medicina"
                      }
                    ]
                  },
                  "issuer": {
                    "reference": "Organization/ejemplo-organizacion-cmc",
                    "display": "Colegio de Médicos y Cirujanos de Costa Rica"
                  }
                },
                {
                  "identifier": [
                    {
                      "system": "https://hl7.or.cr/fhir/sid/especialidad/cmc",
                      "value": "ESP-0345"
                    }
                  ],
                  "period": {
                    "start": "2014-07-01"
                  },
                  "code": {
                    "coding": [
                      {
                        "code": "06.05.01",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-especialidad-salud",
                        "display": "Medicina con especialidad en Radiología e Imágenes Médicas"
                      }
                    ]
                  },
                  "issuer": {
                    "reference": "Organization/ejemplo-organizacion-cmc",
                    "display": "Colegio de Médicos y Cirujanos de Costa Rica"
                  }
                }
              ],
              "communication": [
                {
                  "language": {
                    "coding": [
                      {
                        "code": "es",
                        "system": "urn:ietf:bcp:47",
                        "display": "español"
                      }
                    ]
                  },
                  "preferred": true
                },
                {
                  "language": {
                    "coding": [
                      {
                        "code": "en",
                        "system": "urn:ietf:bcp:47",
                        "display": "inglés"
                      }
                    ]
                  }
                }
              ],
              "active": true,
              "gender": "male"
            }
          },
          {
            "fullUrl": "https://hl7.or.cr/fhir/core/Organization/ejemplo-establecimiento",
            "resource": {
              "resourceType": "Organization",
              "id": "ejemplo-establecimiento",
              "meta": {
                "profile": [
                  "https://hl7.or.cr/fhir/core/StructureDefinition/cr-organization"
                ]
              },
              "identifier": [
                {
                  "type": {
                    "coding": [
                      {
                        "code": "cedula-juridica",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion-organizacion",
                        "display": "Cédula Jurídica"
                      },
                      {
                        "code": "XX",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                        "display": "Organization identifier"
                      }
                    ]
                  },
                  "use": "official",
                  "system": "https://hl7.or.cr/fhir/sid/cedula-juridica",
                  "value": "3101123456"
                },
                {
                  "type": {
                    "coding": [
                      {
                        "code": "codigo-establecimiento",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-identificacion-organizacion",
                        "display": "Código de establecimiento"
                      },
                      {
                        "code": "FI",
                        "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                        "display": "Facility ID"
                      }
                    ]
                  },
                  "use": "official",
                  "system": "https://hl7.or.cr/fhir/sid/establecimiento",
                  "value": "cj-3101123456"
                }
              ],
              "type": [
                {
                  "coding": [
                    {
                      "code": "prov",
                      "system": "http://terminology.hl7.org/CodeSystem/organization-type",
                      "display": "Healthcare Provider"
                    }
                  ],
                  "text": "Prestador de servicios de salud"
                },
                {
                  "coding": [
                    {
                      "code": "hospital-nacional-privado",
                      "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-establecimiento-salud"
                    }
                  ]
                },
                {
                  "coding": [
                    {
                      "code": "facility",
                      "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                      "display": "Facility"
                    }
                  ]
                }
              ],
              "alias": [
                "Hospital Privado de Ejemplo"
              ],
              "contact": [
                {
                  "telecom": [
                    {
                      "system": "phone",
                      "value": "+50622220000"
                    },
                    {
                      "system": "email",
                      "value": "info@hospital-ejemplo.cr"
                    },
                    {
                      "system": "url",
                      "value": "https://www.hospital-ejemplo.cr"
                    }
                  ],
                  "address": {
                    "line": [
                      "Avenida 2, entre calles 5 y 7"
                    ],
                    "country": "CRI",
                    "state": "1",
                    "city": "101",
                    "district": "10101",
                    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
                  }
                }
              ],
              "qualification": [
                {
                  "identifier": [
                    {
                      "value": "PF-2026-000123"
                    }
                  ],
                  "period": {
                    "start": "2026-01-15",
                    "end": "2031-01-14"
                  },
                  "code": {
                    "coding": [
                      {
                        "code": "permiso-funcionamiento-salud",
                        "system": "https://hl7.or.cr/fhir/terminology/CodeSystem/cr-tipo-autorizacion-salud",
                        "display": "Permiso de Funcionamiento de Salud"
                      }
                    ]
                  },
                  "issuer": {
                    "reference": "Organization/ejemplo-organizacion-ministerio-salud",
                    "display": "Ministerio de Salud"
                  }
                }
              ],
              "active": true,
              "name": "Hospital Privado de Ejemplo Sociedad Anónima"
            }
          }
        ],
        "type": "document",
        "timestamp": "2026-09-30T10:26:00-06:00"
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "Provenance"
      },
      "fullUrl": "urn:uuid:7c1e2d3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
      "resource": {
        "resourceType": "Provenance",
        "id": "ejemplo-firma-documento-imagenes",
        "meta": {
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-provenance-firma-documento"
          ]
        },
        "target": [
          {
            "reference": "Bundle/ejemplo-bundle-documento-imagenes/_history/1",
            "display": "Documento completo del informe de imágenes médicas (D1), versión 1"
          }
        ],
        "agent": [
          {
            "type": {
              "coding": [
                {
                  "code": "assembler",
                  "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                  "display": "Assembler"
                }
              ]
            },
            "who": {
              "reference": "Device/ejemplo-sistema-hce-hospital",
              "display": "Expediente electrónico del hospital"
            }
          },
          {
            "type": {
              "coding": [
                {
                  "code": "attester",
                  "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                  "display": "Attester"
                }
              ]
            },
            "who": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            }
          }
        ],
        "signature": [
          {
            "type": [
              {
                "code": "1.2.840.10065.1.12.1.1",
                "system": "urn:iso-astm:E1762-95:2013",
                "display": "Author's Signature"
              }
            ],
            "targetFormat": "application/fhir+json",
            "sigFormat": "application/jose+json",
            "when": "2026-09-30T10:26:30-06:00",
            "who": {
              "reference": "PractitionerRole/ejemplo-rol-radiologia",
              "display": "Carlos Jiménez Solano"
            },
            "data": "eyJzaWduYXR1cmVzIjpbeyJwcm90ZWN0ZWQiOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltTjBlU0k2SW1wemIyNGlMQ0owZVhBaU9pSnFiM05sSzJwemIyNGlmUSIsInNpZ25hdHVyZSI6IlpXcGxiWEJzYncifV19"
          }
        ],
        "activity": {
          "coding": [
            {
              "code": "attest",
              "system": "http://terminology.hl7.org/CodeSystem/iso-21089-lifecycle"
            }
          ]
        },
        "patient": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "recorded": "2026-09-30T10:27:05-06:00"
      }
    },
    {
      "request": {
        "method": "POST",
        "url": "Provenance"
      },
      "fullUrl": "urn:uuid:8d2f3e4a-5b6c-4d7e-9f8a-0b1c2d3e4f5a",
      "resource": {
        "resourceType": "Provenance",
        "id": "ejemplo-sello-documento-imagenes",
        "meta": {
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-provenance-firma-documento"
          ]
        },
        "target": [
          {
            "reference": "Bundle/ejemplo-bundle-documento-imagenes/_history/1",
            "display": "Documento completo del informe de imágenes médicas (D1), versión 1"
          }
        ],
        "agent": [
          {
            "type": {
              "coding": [
                {
                  "code": "assembler",
                  "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                  "display": "Assembler"
                }
              ]
            },
            "who": {
              "reference": "Device/ejemplo-sistema-hce-hospital",
              "display": "Expediente electrónico del hospital"
            }
          },
          {
            "type": {
              "coding": [
                {
                  "code": "attester",
                  "system": "http://terminology.hl7.org/CodeSystem/provenance-participant-type",
                  "display": "Attester"
                }
              ]
            },
            "who": {
              "reference": "Organization/ejemplo-establecimiento",
              "display": "Hospital Privado de Ejemplo"
            }
          }
        ],
        "signature": [
          {
            "type": [
              {
                "code": "1.2.840.10065.1.12.1.14",
                "system": "urn:iso-astm:E1762-95:2013",
                "display": "Source Signature"
              }
            ],
            "targetFormat": "application/fhir+json",
            "sigFormat": "application/jose+json",
            "when": "2026-09-30T10:27:00-06:00",
            "who": {
              "reference": "Organization/ejemplo-establecimiento",
              "display": "Hospital Privado de Ejemplo"
            },
            "data": "eyJzaWduYXR1cmVzIjpbeyJwcm90ZWN0ZWQiOiJleUpoYkdjaU9pSlNVekkxTmlJc0ltTjBlU0k2SW1wemIyNGlMQ0owZVhBaU9pSnFiM05sSzJwemIyNGlmUSIsInNpZ25hdHVyZSI6ImMyVnNiRzgifV19"
          }
        ],
        "activity": {
          "coding": [
            {
              "code": "attest",
              "system": "http://terminology.hl7.org/CodeSystem/iso-21089-lifecycle"
            }
          ]
        },
        "patient": {
          "reference": "Patient/ejemplo-paciente-dimex",
          "display": "José Mendoza"
        },
        "recorded": "2026-09-30T10:27:10-06:00"
      }
    }
  ],
  "type": "transaction"
}

Respuesta si se guarda todo

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "transaction-response",
  "entry": [
    {
      "response": {
        "status": "201 Created",
        "location": "List/ejemplo-envio-lote/_history/1",
        "etag": "W/\"1\"",
        "lastModified": "2026-10-01T10:00:00-06:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "DocumentReference/ejemplo-envio-referencia/_history/1",
        "etag": "W/\"1\"",
        "lastModified": "2026-10-01T10:00:00-06:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "Bundle/ejemplo-bundle-documento-imagenes/_history/1",
        "etag": "W/\"1\"",
        "lastModified": "2026-10-01T10:00:00-06:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "Provenance/ejemplo-firma-documento-imagenes/_history/1",
        "etag": "W/\"1\"",
        "lastModified": "2026-10-01T10:00:00-06:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "Provenance/ejemplo-sello-documento-imagenes/_history/1",
        "etag": "W/\"1\"",
        "lastModified": "2026-10-01T10:00:00-06:00"
      }
    }
  ]
}

Respuesta si una entrada no cumple su perfil: no se guarda nada

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/fhir+json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "invariant",
      "diagnostics": "La transacción se rechazó entera: ninguna entrada se guardó. Entrada 2 (DocumentReference): no cumple el perfil cr-documentreference.",
      "expression": [
        "Bundle.entry[1].resource"
      ]
    }
  ]
}