Guía MHD para HSI, Provincia de Buenos Aires.
0.3.0 - ci-build Argentina flag

Guía MHD para HSI, Provincia de Buenos Aires. - Local Development build (v0.3.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: ReferenciaDocumental

Official URL: http://mhd.ri.hsisalud.org/StructureDefinition/ReferenciaDocumental Version: 0.3.0
Draft as of 2026-09-03 Computable Name: ReferenciaDocumental

Perfil asociado al la refetrencia documental para HSI en un modelo MHD, consderado para transacciones asociadas a una ITI-65 e ITI-67. Se considera en el perfil la asociación de documentos de tipo IPS, referenciados a la Guía Core Argentna AR.FHIR.CORE

Propósito

El perfil ReferenciaDocumental se utiliza para registrar los metadatos de un documento clínico y señalar dónde puede recuperarse su contenido. Está derivado de MinimalDocumentReference de IHE MHD y está pensado para escenarios de publicación, búsqueda y recuperación documental relacionados con las transacciones ITI-65, ITI-67 e ITI-68.

El recurso DocumentReference no es necesariamente el documento clínico. Es principalmente un índice o registro de metadatos que permite:

  • identificar de manera única el documento;
  • conocer el paciente, autor, fecha, tipo y categoría;
  • conocer el formato técnico del contenido;
  • localizar el documento mediante content.attachment.url;
  • verificar opcionalmente la integridad del contenido mediante content.attachment.hash.

En este perfil, el contenido se maneja por referencia: el documento no se incorpora codificado dentro del DocumentReference, sino que se obtiene desde la ubicación indicada en attachment.url.

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* MinimalDocumentReference A reference to a document
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... Slices for identifier SΣ 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
Slice: Unordered, Open by value:use
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... type SΣ 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
... category SΣ 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... text Σ 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject SΣ 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date SΣ 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author SΣ 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... relatesTo SΣ 0..* BackboneElement Relationships to other documents
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code Σ 1..1 code replaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... securityLabel SΣ 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... content SΣ 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Definición del archivo adjunto que contiene el documento referenciado
..... contentType SΣ 1..1 code Mime type of the content, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.
Required Pattern: application/fhir+json
..... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
..... url SΣ 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example General: http://www.acme.com/logo-small.png
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... hash SΣ 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title SΣ 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example General: Official Corporate Logo
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
..... creation SΣ 0..1 dateTime Date attachment was first created
.... format SΣ 0..1 Coding Format/content rules for the document
Binding: IHE ValueSet of Format Codes for use with Document Sharing (preferred)
... context SΣ 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... period SΣ 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado
.... facilityType S 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
.... practiceSetting S 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
.... sourcePatientInfo S 0..1 Reference(Patient) Patient demographics from source

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.status Base required MHD DocumentReference status codes 📦4.2.2 Mobile access to Health Documents v4.2
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.relatesTo.​code Base required DocumentRelationshipType 📍4.0.1 FHIR Std.
DocumentReference.securityLabel Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.content.​attachment.contentType Base required MimeType 📍4.0.1 FHIR Std.
DocumentReference.content.​attachment.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.content.​format Base preferred IHE ValueSet of Format Codes for use with Document Sharing 📦1.2.0 IHE FormatCode Vocabulary v1.2
DocumentReference.context.​facilityType Base example Facility Type Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​practiceSetting Base example Practice Setting Code Value Set 📦4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(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()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()

This structure is derived from MinimalDocumentReference

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference MinimalDocumentReference
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... identifier 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
... Slices for identifier Content/Rules for all slices
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... type 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
.... coding
..... system 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... code 0..1 code Symbol in syntax defined by the system
Example Código Loinc para IPS: 34133-9
..... display 0..1 string Representation defined by the system
Example El display asociado: Summary of episode note
... category 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... coding
..... system 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... code 0..1 code Symbol in syntax defined by the system
Example Loinc Asociado: 60591-5
..... display 0..1 string Representation defined by the system
Example Display asociado al código Loinc: Patient summary Document
.... text 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... securityLabel 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
... content S 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... attachment S 1..1 Attachment Definición del archivo adjunto que contiene el documento referenciado
..... contentType S 1..1 code Mime type of the content, with charset etc.
Required Pattern: application/fhir+json
..... url S 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... hash S 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title S 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
... context S 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... period 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* MinimalDocumentReference A reference to a document
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open 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 Σ 0..* Coding Security Labels applied to this resource
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
.... tag Σ 0..* Coding Tags applied to this resource
Binding: 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
... 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
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... Slices for identifier SΣ 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
Slice: Unordered, Open by value:use
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... status ?!SΣ 1..1 code Estado de la referencia al documento IPS: current|superseded|entered-in-error
Binding: MHD DocumentReference status codes (required)
... type SΣ 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding Σ 0..* Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system Σ 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... version Σ 0..1 string Version of the system - if relevant
..... code Σ 0..1 code Symbol in syntax defined by the system
Example Código Loinc para IPS: 34133-9
..... display Σ 0..1 string Representation defined by the system
Example El display asociado: Summary of episode note
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... category SΣ 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding Σ 0..* Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system Σ 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... version Σ 0..1 string Version of the system - if relevant
..... code Σ 0..1 code Symbol in syntax defined by the system
Example Loinc Asociado: 60591-5
..... display Σ 0..1 string Representation defined by the system
Example Display asociado al código Loinc: Patient summary Document
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject SΣ 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date SΣ 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author SΣ 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... authenticator 0..1 Reference(Practitioner | PractitionerRole | Organization) Who/what authenticated the document
... custodian 0..1 Reference(Organization) Organization which maintains the document
... relatesTo SΣ 0..* BackboneElement Relationships to other documents
.... 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 Σ 1..1 code replaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... description Σ 0..1 string Human-readable description
... securityLabel SΣ 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... content SΣ 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... 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 Definición del archivo adjunto que contiene el documento referenciado
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... contentType SΣ 1..1 code Mime type of the content, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.
Required Pattern: application/fhir+json
..... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
..... url SΣ 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example General: http://www.acme.com/logo-small.png
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... size Σ 0..1 unsignedInt Number of bytes of content (if url provided)
..... hash SΣ 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title SΣ 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example General: Official Corporate Logo
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
..... creation SΣ 0..1 dateTime Date attachment was first created
.... format SΣ 0..1 Coding Format/content rules for the document
Binding: IHE ValueSet of Format Codes for use with Document Sharing (preferred)
... context SΣ 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... 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
.... encounter 0..* Reference(Encounter | EpisodeOfCare) Context of the document content
.... event 0..* CodeableConcept Main clinical acts documented
Binding: ActCode (3.0.0) (example): This list of codes represents the main clinical acts being documented.
.... period SΣ 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... start ΣC 0..1 dateTime Starting time with inclusive boundary
..... end ΣC 0..1 dateTime End time with inclusive boundary, if not ongoing
.... facilityType S 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
.... practiceSetting S 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
.... sourcePatientInfo S 0..1 Reference(Patient) Patient demographics from source
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
..... type Σ 0..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
..... identifier Σ 0..1 Identifier Logical reference, when literal reference is not known
..... display Σ 0..1 string Text alternative for the resource
.... related 0..* Reference(Resource) Related identifiers or resources

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.meta.​security Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.meta.​tag Base example Common Tags 📦4.0.1 FHIR Std.
DocumentReference.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.status Base required MHD DocumentReference status codes 📦4.2.2 Mobile access to Health Documents v4.2
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.relatesTo.​code Base required DocumentRelationshipType 📍4.0.1 FHIR Std.
DocumentReference.securityLabel Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.content.​attachment.contentType Base required MimeType 📍4.0.1 FHIR Std.
DocumentReference.content.​attachment.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.content.​format Base preferred IHE ValueSet of Format Codes for use with Document Sharing 📦1.2.0 IHE FormatCode Vocabulary v1.2
DocumentReference.context.​event Base example v3 Code System ActCode 📍3.0.0 THO v7.3
DocumentReference.context.​facilityType Base example Facility Type Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​practiceSetting Base example Practice Setting Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​sourcePatientInfo.type Base extensible ResourceType 📦4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(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()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()

This structure is derived from MinimalDocumentReference

Summary

Mandatory: 6 elements
Must-Support: 10 elements

Structures

This structure refers to these other structures:

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* MinimalDocumentReference A reference to a document
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... Slices for identifier SΣ 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
Slice: Unordered, Open by value:use
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... type SΣ 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
... category SΣ 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... text Σ 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject SΣ 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date SΣ 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author SΣ 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... relatesTo SΣ 0..* BackboneElement Relationships to other documents
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... code Σ 1..1 code replaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... securityLabel SΣ 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... content SΣ 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... attachment SΣ 1..1 Attachment Definición del archivo adjunto que contiene el documento referenciado
..... contentType SΣ 1..1 code Mime type of the content, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.
Required Pattern: application/fhir+json
..... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
..... url SΣ 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example General: http://www.acme.com/logo-small.png
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... hash SΣ 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title SΣ 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example General: Official Corporate Logo
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
..... creation SΣ 0..1 dateTime Date attachment was first created
.... format SΣ 0..1 Coding Format/content rules for the document
Binding: IHE ValueSet of Format Codes for use with Document Sharing (preferred)
... context SΣ 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... period SΣ 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado
.... facilityType S 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
.... practiceSetting S 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
.... sourcePatientInfo S 0..1 Reference(Patient) Patient demographics from source

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.status Base required MHD DocumentReference status codes 📦4.2.2 Mobile access to Health Documents v4.2
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.relatesTo.​code Base required DocumentRelationshipType 📍4.0.1 FHIR Std.
DocumentReference.securityLabel Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.content.​attachment.contentType Base required MimeType 📍4.0.1 FHIR Std.
DocumentReference.content.​attachment.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.content.​format Base preferred IHE ValueSet of Format Codes for use with Document Sharing 📦1.2.0 IHE FormatCode Vocabulary v1.2
DocumentReference.context.​facilityType Base example Facility Type Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​practiceSetting Base example Practice Setting Code Value Set 📦4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(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()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()

Differential View

This structure is derived from MinimalDocumentReference

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference MinimalDocumentReference
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... identifier 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
... Slices for identifier Content/Rules for all slices
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... type 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
.... coding
..... system 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... code 0..1 code Symbol in syntax defined by the system
Example Código Loinc para IPS: 34133-9
..... display 0..1 string Representation defined by the system
Example El display asociado: Summary of episode note
... category 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... coding
..... system 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... code 0..1 code Symbol in syntax defined by the system
Example Loinc Asociado: 60591-5
..... display 0..1 string Representation defined by the system
Example Display asociado al código Loinc: Patient summary Document
.... text 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... securityLabel 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
... content S 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... attachment S 1..1 Attachment Definición del archivo adjunto que contiene el documento referenciado
..... contentType S 1..1 code Mime type of the content, with charset etc.
Required Pattern: application/fhir+json
..... url S 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... hash S 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title S 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
... context S 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... period 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. DocumentReference 0..* MinimalDocumentReference A reference to a document
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open 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 Σ 0..* Coding Security Labels applied to this resource
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
.... tag Σ 0..* Coding Tags applied to this resource
Binding: 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
... 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
... masterIdentifier S 1..1 UniqueIdIdentifier Identificador único para el documento IPS nacional referenciado. Es el identificador principal del IPS
Example Ejemplo de identificador maestro: {"system":"https://repositorio.cl/documentos/ips","value":"IPS-2026-00001"}
... Slices for identifier SΣ 0..* Identifier Identificador alternativo para el documento IPS nacional referenciado. Es un identificador secundario del IPS
Slice: Unordered, Open by value:use
.... identifier:entryUUID S 0..* EntryUUIDIdentifier An identifier intended for computation
... status ?!SΣ 1..1 code Estado de la referencia al documento IPS: current|superseded|entered-in-error
Binding: MHD DocumentReference status codes (required)
... type SΣ 1..1 CodeableConcept Tipo de documento referenciado
Binding: Tipos de Documento Clínico para DocumentReference (extensible)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding Σ 0..* Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system Σ 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... version Σ 0..1 string Version of the system - if relevant
..... code Σ 0..1 code Symbol in syntax defined by the system
Example Código Loinc para IPS: 34133-9
..... display Σ 0..1 string Representation defined by the system
Example El display asociado: Summary of episode note
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... category SΣ 1..1 CodeableConcept Categoría del documento referenciado
Binding: Categorías de Documento Clínico para DocumentReference (extensible)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding Σ 0..* Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system Σ 0..1 uri Identity of the terminology system
Example Para IPS: http://loinc.org
..... version Σ 0..1 string Version of the system - if relevant
..... code Σ 0..1 code Symbol in syntax defined by the system
Example Loinc Asociado: 60591-5
..... display Σ 0..1 string Representation defined by the system
Example Display asociado al código Loinc: Patient summary Document
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
Required Pattern: Resumen clínico de paciente
... subject SΣ 1..1 Reference(Paciente Argentino) Paciente al que se refiere el documento IPS nacional referenciado
... date SΣ 1..1 instant Fecha de creación del documento IPS nacional referenciado
... author SΣ 1..* Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson) Autor del documento o IPS nacional referenciado
... authenticator 0..1 Reference(Practitioner | PractitionerRole | Organization) Who/what authenticated the document
... custodian 0..1 Reference(Organization) Organization which maintains the document
... relatesTo SΣ 0..* BackboneElement Relationships to other documents
.... 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 Σ 1..1 code replaces | transforms | signs | appends
Binding: DocumentRelationshipType (required): The type of relationship between documents.
.... target Σ 1..1 Reference(DocumentReference) Target of the relationship
... description Σ 0..1 string Human-readable description
... securityLabel SΣ 0..* CodeableConcept Etiqueta de seguridad del documento IPS nacional referenciado
Binding: All Security Labels (extensible): Security Labels from the Healthcare Privacy and Security Classification System.
... content SΣ 1..1 BackboneElement Contenido del documento (IPS u otro) nacional referenciado con url reltiva en caso de ser X-Road, o url absoluta en caso de ser un repositorio FHIR. Se define como un campo obligatorio, y se recomienda usar el valor 'Attachment' para indicar que el contenido del documento referenciado es un archivo adjunto que contiene el documento clínico en formato digital.
.... 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 Definición del archivo adjunto que contiene el documento referenciado
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... contentType SΣ 1..1 code Mime type of the content, with charset etc.
Binding: Mime Types (required): The mime type of an attachment. Any valid mime type is allowed.
Required Pattern: application/fhir+json
..... language SΣ 0..1 code Human language of the content (BCP-47)
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding

Example General: en-AU
..... url SΣ 1..1 url URL del archivo adjunto que contiene el documento referenciado, en formato FHIR IPS, Binary IPS u otro documnento en esos formatos.
Example General: http://www.acme.com/logo-small.png
Example Ejemplo de IPS referenciado en X-Road: /pba/tndXroad/santamarina/docs/ips-xxx
..... size Σ 0..1 unsignedInt Number of bytes of content (if url provided)
..... hash SΣ 0..1 base64Binary Hash del archivo adjunto que contiene el documento IPS nacional referenciado
..... title SΣ 0..1 string Título del archivo adjunto que contiene el documento referenciado
Example General: Official Corporate Logo
Example Ejemplo de Título del documento contenido referenciado via X-Road: IPS-001
..... creation SΣ 0..1 dateTime Date attachment was first created
.... format SΣ 0..1 Coding Format/content rules for the document
Binding: IHE ValueSet of Format Codes for use with Document Sharing (preferred)
... context SΣ 1..1 BackboneElement Contexto del documento IPS nacional u otro referenciado
.... 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
.... encounter 0..* Reference(Encounter | EpisodeOfCare) Context of the document content
.... event 0..* CodeableConcept Main clinical acts documented
Binding: ActCode (3.0.0) (example): This list of codes represents the main clinical acts being documented.
.... period SΣ 0..1 Period Periodo de tiempo al que se refiere el documento IPS nacional u otro referenciado
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... start ΣC 0..1 dateTime Starting time with inclusive boundary
..... end ΣC 0..1 dateTime End time with inclusive boundary, if not ongoing
.... facilityType S 0..1 CodeableConcept Kind of facility where patient was seen
Binding: FacilityTypeCodeValueSet (example): XDS Facility Type.
.... practiceSetting S 0..1 CodeableConcept Additional details about where the content was created (e.g. clinical specialty)
Binding: PracticeSettingCodeValueSet (example): Additional details about where the content was created (e.g. clinical specialty).
.... sourcePatientInfo S 0..1 Reference(Patient) Patient demographics from source
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... reference ΣC 0..1 string Literal reference, Relative, internal or absolute URL
..... type Σ 0..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
..... identifier Σ 0..1 Identifier Logical reference, when literal reference is not known
..... display Σ 0..1 string Text alternative for the resource
.... related 0..* Reference(Resource) Related identifiers or resources

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
DocumentReference.meta.​security Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.meta.​tag Base example Common Tags 📦4.0.1 FHIR Std.
DocumentReference.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.status Base required MHD DocumentReference status codes 📦4.2.2 Mobile access to Health Documents v4.2
DocumentReference.type Base extensible Tipos de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.category Base extensible Categorías de Documento Clínico para DocumentReference 📦0.3.0 This IG
DocumentReference.relatesTo.​code Base required DocumentRelationshipType 📍4.0.1 FHIR Std.
DocumentReference.securityLabel Base extensible SecurityLabels 📦4.0.1 FHIR Std.
DocumentReference.content.​attachment.contentType Base required MimeType 📍4.0.1 FHIR Std.
DocumentReference.content.​attachment.language Base preferred Common Languages 📦4.0.1 FHIR Std.
DocumentReference.content.​format Base preferred IHE ValueSet of Format Codes for use with Document Sharing 📦1.2.0 IHE FormatCode Vocabulary v1.2
DocumentReference.context.​event Base example v3 Code System ActCode 📍3.0.0 THO v7.3
DocumentReference.context.​facilityType Base example Facility Type Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​practiceSetting Base example Practice Setting Code Value Set 📦4.0.1 FHIR Std.
DocumentReference.context.​sourcePatientInfo.type Base extensible ResourceType 📦4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
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().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(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()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()

This structure is derived from MinimalDocumentReference

Summary

Mandatory: 6 elements
Must-Support: 10 elements

Structures

This structure refers to these other structures:

 

Other representations of profile: CSV, Excel, Schematron

Notes:

Uso de content

DocumentReference.content describe la representación del documento y la forma de acceder a ella. En JSON siempre se representa como un arreglo, aunque este perfil limite su cardinalidad a exactamente una repetición (1..1):

"content": [
  {
    "attachment": {
      "contentType": "application/fhir+json",
      "url": "https://documentos.ejemplo.org/Bundle/ips-2026-00001",
      "title": "Resumen clínico IPS"
    }
  }
]

La cardinalidad 1..1 implica que:

  • debe existir un elemento content;
  • no se pueden declarar dos representaciones, por ejemplo una en JSON y otra en PDF;
  • debe existir exactamente un attachment dentro de content;
  • la ubicación del documento debe estar en attachment.url.

El elemento opcional content.format, heredado de FHIR/MHD, puede utilizarse para declarar una estructura, plantilla o formato documental más específico que el MIME type. No debe utilizarse para describir el mecanismo de transporte X-Road ni reemplaza a attachment.contentType.

Uso de attachment

content.attachment es un dato complejo de tipo Attachment. En este perfil actúa como descriptor técnico del documento recuperable.

Reglas efectivas

Sub-elemento Cardinalidad efectiva Regla de uso
contentType 1..1 MS Fijo en application/fhir+json.
data 0..0 heredado de MHD Minimal No se permite contenido Base64 incorporado en el DocumentReference.
url 1..1 MS Ubicación desde la cual se recupera el documento.
size 0..1 heredado Tamaño del contenido en bytes, cuando resulte aplicable.
hash 0..1 MS Hash SHA-1 del contenido, codificado en Base64, según FHIR R4.
title 0..1 MS Nombre legible para presentar al usuario.
creation 0..1 heredado Fecha original de creación del contenido, si se dispone de ella.

La prohibición de data y la obligación de url provienen del perfil padre MHD Minimal. Por lo tanto, una instancia como la siguiente no es válida para este perfil:

"attachment": {
  "contentType": "application/fhir+json",
  "data": "eyJyZXNvdXJjZVR5cGUiOiJCdW5kbGUifQ=="
}

attachment.contentType

El valor application/fhir+json está fijado en el perfil. Esto indica que el contenido obtenido mediante la URL debe poder entregarse como JSON FHIR.

No se debe confundir:

  • type: tipo clínico del documento, por ejemplo un resumen clínico;
  • content.format: estructura o plantilla específica del documento;
  • attachment.contentType: formato MIME de los bytes recuperados;
  • Content-Type HTTP: formato que efectivamente declara la respuesta HTTP.

Si la URL devuelve directamente un PDF con Content-Type: application/pdf, la instancia no representa correctamente el contenido bajo la restricción actual. Para soportar PDF sería necesario modificar el perfil o definir otro perfil que permita ese MIME type.

Si el destino es un recurso FHIR, la ruta debe coincidir con el tipo real:

  • un Bundle de tipo document: Bundle/{id};
  • un recurso Binary: Binary/{id}.

No debe utilizarse una ruta Binary/{id} para identificar un recurso que en realidad es un Bundle.

attachment.url

La URL debe identificar una ubicación desde la cual se obtenga el contenido real del documento. Además, debe ser estable para esa versión: no debe reutilizarse más adelante para devolver bytes correspondientes a otro documento o a otra versión.

FHIR R4 permite URL absolutas y relativas en Attachment.url. Si se usa una referencia relativa, FHIR indica que debe resolverse respecto de la URL base del servicio, de forma equivalente a una referencia a recurso.

Ejemplos:

Valor en attachment.url Interpretación
https://repo.ejemplo.org/fhir/Bundle/ips-001 URL absoluta; no requiere una base para resolverse.
Bundle/ips-001 Relativa a la base del servicio FHIR.
/pba/tndXroad/santamarina/docs/ips-xxx Ruta relativa al origen o root-relative; requiere que ese origen publique o enrute esa ruta.
/r1/INSTANCE/CLASS/MEMBER/SUBSYSTEM/SERVICE/docs/ips-001 Forma de ruta compatible con una invocación REST directa a un Security Server X-Road, si se conoce su origen y se agregan los encabezados requeridos.

Una URL relativa no debe interpretarse respecto de la ubicación del archivo JSON ni de la página HTML de la guía.

attachment.hash

En FHIR R4, Attachment.hash corresponde al SHA-1 de los bytes originales y se expresa en Base64. Es útil para detectar cambios accidentales o verificar que se obtuvo la representación esperada.

Ejemplo de cálculo:

openssl dgst -sha1 -binary documento.json | openssl base64 -A

El hash se calcula sobre los bytes recuperados para el MIME type declarado, no sobre una representación Base64 de esos bytes. Este hash no constituye una firma digital y no reemplaza controles de autenticidad, autorización o no repudio.

En documentos generados bajo demanda, o cuando el contenido es un Bundle FHIR publicado mediante las reglas específicas de MHD, hash y size pueden requerir tratamiento especial o estar ausentes.

Uso de una referencia relativa con X-Road

Qué aporta X-Road

X-Road actúa como una capa segura de intercambio entre el sistema consumidor y el sistema proveedor. En una llamada REST, el servicio se codifica en la ruta de la solicitud y el consumidor se identifica mediante el encabezado obligatorio X-Road-Client.

La forma general de una llamada REST X-Road es:

GET https://{security-server}/r1/{instance}/{member-class}/{member-code}/{subsystem}/{service-code}/{path}
X-Road-Client: {instance}/{member-class}/{consumer-member-code}/{consumer-subsystem}
Accept: application/fhir+json

Por ejemplo:

GET /r1/AR/GOV/99999999/REPO-DOC/obtener-documento/docs/IPS-2026-00001 HTTP/1.1
Host: security-server.ejemplo.org
X-Road-Client: AR/GOV/88888888/SISTEMA-CONSUMIDOR
Accept: application/fhir+json

X-Road-Client no se almacena en DocumentReference. Se determina en tiempo de ejecución a partir de la identidad del sistema que recupera el documento.

La ruta del perfil

El perfil incluye el siguiente ejemplo:

/pba/tndXroad/santamarina/docs/ips-xxx

Esta ruta puede utilizarse si la arquitectura define un gateway o proxy capaz de interpretarla. Sin embargo, esa sintaxis no es por sí misma la forma estándar de la URL REST de X-Road. Debe documentarse, como mínimo:

  • la URL base contra la cual se resuelve;
  • el Security Server o gateway que recibe la solicitud;
  • la correspondencia entre la ruta y el serviceId X-Road;
  • el método HTTP permitido, normalmente GET;
  • quién agrega X-Road-Client y los demás encabezados de seguridad;
  • el MIME type que debe devolver el servicio;
  • la política de autorización y los códigos de error esperados.

Diferencia entre validez FHIR y conformidad MHD

Este punto es fundamental:

  • una URL relativa puede ser válida según el tipo Attachment de FHIR R4;
  • el validador estructural puede aceptarla en una instancia del perfil;
  • pero la transacción MHD ITI-67 exige que el Document Responder entregue en DocumentReference.content.attachment.url una URL completa que el consumidor pueda utilizar para ejecutar ITI-68.

Por lo tanto, una ruta relativa usada como convención interna puede no cumplir estrictamente la regla transaccional de ITI-67, aunque el recurso sea estructuralmente válido.

Alternativa recomendada

Para conservar la interoperabilidad MHD y utilizar X-Road, se recomienda que el DocumentReference entregado al consumidor contenga una URL absoluta de un endpoint recuperable:

"url": "https://gateway-documental.ejemplo.org/pba/tndXroad/santamarina/docs/ips-xxx"

El gateway puede traducir internamente esa solicitud a X-Road, construir la ruta /r1/{serviceId}/{path} y agregar los encabezados que correspondan.

También puede publicarse una URL absoluta directa al Security Server:

"url": "https://security-server.ejemplo.org/r1/AR/GOV/99999999/REPO-DOC/obtener-documento/docs/IPS-2026-00001"

En este segundo caso, el cliente debe poder comunicarse con ese Security Server y enviar X-Road-Client.

Si por una decisión de arquitectura se mantiene una referencia relativa, la guía debe declarar expresamente una regla de resolución, por ejemplo:

baseXRoad = https://security-server.ejemplo.org
attachment.url = /r1/AR/GOV/99999999/REPO-DOC/obtener-documento/docs/IPS-2026-00001
URL efectiva = baseXRoad + attachment.url

Esta regla debe considerarse una convención de la guía o del ecosistema, porque la base X-Road no puede deducirse únicamente desde el DocumentReference.

7. Flujo de recuperación del documento

  1. El consumidor obtiene el DocumentReference, por ejemplo mediante ITI-67.
  2. Verifica que el recurso declara el perfil ReferenciaDocumental.
  3. Lee content[0].attachment.contentType y content[0].attachment.url.
  4. Si la URL es absoluta, la utiliza directamente.
  5. Si es relativa, aplica la regla de resolución publicada por la guía o por el despliegue.
  6. Si el destino usa X-Road, agrega X-Road-Client y los controles de autenticación requeridos.
  7. Ejecuta un GET con Accept: application/fhir+json.
  8. Verifica el código HTTP y el Content-Type de la respuesta.
  9. Si existen hash y size, verifica que correspondan al contenido recuperado.
  10. Procesa y valida el recurso FHIR retornado, por ejemplo un Bundle de tipo document que cumpla el perfil IPS esperado.

Conforme a ITI-68, una recuperación exitosa devuelve HTTP 200. Entre las respuestas posibles se encuentran 404 para una ubicación desconocida, 410 para un documento ya no disponible, 406 si no se puede entregar el formato solicitado y 403 cuando la solicitud no está permitida.

8. Ejemplo completo en JSON

El siguiente ejemplo usa una URL absoluta de gateway, que es la alternativa recomendada para mantener una ubicación directamente resoluble:

{
  "resourceType": "DocumentReference",
  "id": "referencia-ips-2026-00001",
  "meta": {
    "profile": [
      "/StructureDefinition/ReferenciaDocumental"
    ]
  },
  "masterIdentifier": {
    "system": "https://repositorio.salud.gob.ar/documentos/ips",
    "value": "IPS-2026-00001"
  },
  "status": "current",
  "type": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "34133-9",
        "display": "Summary of episode note"
      }
    ]
  },
  "category": [
    {
      "coding": [
        {
          "system": "http://loinc.org",
          "code": "60591-5",
          "display": "Patient summary Document"
        }
      ],
      "text": "Resumen clínico de paciente"
    }
  ],
  "subject": {
    "reference": "Patient/paciente-123"
  },
  "date": "2026-08-24T10:00:00-03:00",
  "author": [
    {
      "reference": "Practitioner/profesional-123"
    }
  ],
  "content": [
    {
      "attachment": {
        "contentType": "application/fhir+json",
        "url": "https://gateway-documental.ejemplo.org/pba/tndXroad/santamarina/docs/ips-2026-00001",
        "title": "IPS-2026-00001"
      }
    }
  ],
  "context": {
    "period": {
      "start": "2026-08-20T08:00:00-03:00",
      "end": "2026-08-20T18:00:00-03:00"
    }
  }
}

Ejemplo de instancia FSH con ruta relativa

Este ejemplo representa la convención de proxy incluida en el perfil. Solo debe utilizarse si la guía define formalmente su base y mecanismo de resolución:

Instance: ReferenciaDocumentalXRoadEjemplo
InstanceOf: ReferenciaDocumental
Usage: #example
Title: "Referencia documental recuperable mediante X-Road"

* id = "referencia-documental-xroad-ejemplo"
* meta.profile = Canonical(ReferenciaDocumental)
* status = #current

* masterIdentifier.system = "https://repositorio.salud.gob.ar/documentos/ips"
* masterIdentifier.value = "IPS-2026-00001"

* type.coding.system = "http://loinc.org"
* type.coding.code = #34133-9
* type.coding.display = "Summary of episode note"

* category.coding.system = "http://loinc.org"
* category.coding.code = #60591-5
* category.coding.display = "Patient summary Document"
* category.text = "Resumen clínico de paciente"

* subject = Reference(Patient/paciente-123)
* date = "2026-08-24T10:00:00-03:00"
* author = Reference(Practitioner/profesional-123)

* content.attachment.contentType = #application/fhir+json
* content.attachment.url = "/pba/tndXroad/santamarina/docs/ips-xxx"
* content.attachment.title = "IPS-2026-00001"

* context.period.start = "2026-08-20T08:00:00-03:00"
* context.period.end = "2026-08-20T18:00:00-03:00"

Recomendaciones de seguridad

  • No incorporar tokens, contraseñas ni credenciales en attachment.url.
  • Evitar URL firmadas de corta duración como identificador documental permanente.
  • No incluir datos clínicos o identificadores personales innecesarios en la ruta.
  • Aplicar listas de destinos y esquemas permitidos antes de resolver una URL para reducir riesgos SSRF.
  • Autorizar la recuperación en el momento del GET; poder descubrir un DocumentReference no implica estar autorizado para obtener su contenido.
  • Mantener la URL asociada a una versión inmutable del documento.
  • Utilizar HTTPS y los controles de identidad, firma y auditoría definidos para X-Road.
  • Usar securityLabel cuando el dominio de intercambio requiera comunicar sensibilidad o restricciones de manejo.
  • Utilizar mecanismos de firma, por ejemplo Provenance.signature, cuando se necesite autenticidad o no repudio; attachment.hash solo comprueba integridad técnica.

Lista de verificación

  • La instancia declara el canonical correcto de ReferenciaDocumental en meta.profile.
  • masterIdentifier es único, estable y específico de la versión documental.
  • status, type, category, subject, date y al menos un author están presentes.
  • El paciente cumple el perfil PacienteArg.
  • Existe exactamente un content y un attachment.
  • No se utiliza attachment.data.
  • attachment.contentType es application/fhir+json.
  • attachment.url permite recuperar el contenido real mediante GET.
  • La URL no se reutiliza para entregar otra versión del documento.
  • Si se usa una URL relativa, la guía define explícitamente su base de resolución.
  • Si el recurso se entrega mediante ITI-67, se evalúa la exigencia MHD de utilizar una URL completa.
  • Si se usa X-Road, están definidos el Security Server, serviceId, ruta, X-Road-Client, autorización y MIME type de respuesta.
  • Si se informa hash, se calculó como SHA-1 sobre los bytes correctos y se codificó en Base64.
  • El contenido recuperado se valida contra el perfil FHIR que corresponda, por ejemplo un perfil IPS de Bundle tipo document.