Guía de Implementación Core de Costa Rica
0.1.0 - ci-build
Guía de Implementación Core de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.
| URL oficial: https://hl7.or.cr/fhir/core/StructureDefinition/cr-composition | Versión: 0.1.0 | ||||
| Standards status: Draft | Nombre computable: CRComposition | ||||
Encabezado de un documento clínico de Costa Rica: un conjunto de información clínica que un autor reúne, un profesional valida y una organización custodia, y que se intercambia como una unidad (informe de imágenes médicas o de laboratorio, epicrisis, referencia, resumen del paciente). Implementa el modelo lógico del documento clínico.
Usos:
También puede consultar los usos en las estadísticas de IG de FHIR
Descripción de perfiles, diferenciales, instantáneas y sus representaciones.
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v |
![]() ![]() |
SΣ | 1..1 | Meta | Metadatos: las etiquetas de seguridad |
![]() ![]() ![]() |
Σ | 1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. |
![]() ![]() ![]() ![]() |
SΣ | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) |
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality |
![]() ![]() ![]() ![]() |
SΣ | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) |
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Resource | Contained, inline Resources | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored |
![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system |
![]() ![]() ![]() |
?!Σ | 0..1 | code | official (valor fijo) Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known . Required Pattern: official |
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} Example General: http://www.acme.com/identifiers/patient |
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Example General: 123456 Max Length:64 |
![]() ![]() |
SΣC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value |
![]() ![]() |
?!SΣ | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) |
![]() ![]() |
SΣ | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) |
![]() ![]() |
SΣ | 1..1 | Reference(Paciente) | Paciente del documento |
![]() ![]() |
SΣ | 0..1 | Reference(Atención) | Atención de la que resulta el documento |
![]() ![]() |
SΣC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura |
![]() ![]() |
SΣ | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema |
![]() ![]() |
SΣ | 1..1 | string | Título del documento, en español Max Length:250 |
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) |
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora |
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización |
![]() ![]() |
SΣ | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia |
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía |
![]() ![]() ![]() |
SΣ | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) |
![]() ![]() ![]() |
SΣ | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL |
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento relacionado |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Versión del documento relacionado (versión 1) |
![]() ![]() |
SC | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) Constraints: cmp-1, cmp-2 |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) Vinculación: DocumentSectionCodes (example): Classification of a section of a composition/document. |
![]() ![]() ![]() |
SC | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida This profile does not constrain the narrative in regard to content, language, or traceability to data elements |
![]() ![]() ![]() |
SC | 0..* | Reference(Resource) | Recursos de la sección |
![]() ![]() ![]() |
SC | 0..1 | CodeableConcept | Motivo de una sección vacía Vinculación: ListEmptyReasons (preferred): If a section is empty, why it is empty. |
Documentación de este formato | ||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections |
text.exists() or entry.exists() or section.exists()
|
| cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty |
emptyReason.empty() or entry.empty()
|
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
| dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Composition | 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 | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Composition | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
Esta estructura se deriva de Composition .
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v |
![]() ![]() |
S | 1..1 | Meta | Metadatos: las etiquetas de seguridad |
![]() ![]() ![]() |
1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system | |
![]() ![]() ![]() ![]() |
S | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality | |
![]() ![]() ![]() ![]() |
S | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
![]() ![]() |
SC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system |
![]() ![]() ![]() |
0..1 | code | official (valor fijo) Required Pattern: official | |
![]() ![]() ![]() |
S | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} |
![]() ![]() ![]() |
SC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Max Length:64 |
![]() ![]() |
SC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value |
![]() ![]() |
S | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) |
![]() ![]() |
S | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) |
![]() ![]() |
S | 1..1 | Reference(Paciente) | Paciente del documento |
![]() ![]() |
S | 0..1 | Reference(Atención) | Atención de la que resulta el documento |
![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura |
![]() ![]() |
S | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema |
![]() ![]() |
S | 1..1 | string | Título del documento, en español Max Length:250 |
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) |
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) |
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora |
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización |
![]() ![]() |
S | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia |
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía |
![]() ![]() ![]() |
S | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) |
![]() ![]() ![]() |
S | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador |
![]() ![]() ![]() ![]() |
S | 1..1 | Identifier | Identificador del documento relacionado |
![]() ![]() ![]() ![]() |
0..1 | string | Versión del documento relacionado (versión 1) | |
![]() ![]() |
S | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) |
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) |
![]() ![]() ![]() |
S | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida |
![]() ![]() ![]() |
S | 0..* | Reference(Resource) | Recursos de la sección |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Motivo de una sección vacía |
Documentación de este formato | ||||
| Ruta | Estado | Uso | ValueSet | Versión | Fuente |
| Composition.meta.security:confidencialidad | Base | required | Confidencialidad | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.meta.security:sensibilidad | Base | required | Sensibilidad de la información | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.status | Base | required | Estado del documento | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.type | Base | extensible | Tipo de documento clínico | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.attester.mode | Base | required | Composition Attestation Mode | 📦5.0.0 | Estándar FHIR |
| Composition.relatesTo.type | Base | required | Relación entre documentos | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
SΣ | 1..1 | Meta | Metadatos: las etiquetas de seguridad | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
Σ | 0..1 | id | Version specific identifier | ||||
![]() ![]() ![]() |
Σ | 0..1 | instant | When the resource version last changed | ||||
![]() ![]() ![]() |
Σ | 0..1 | uri | Identifies where the resource comes from | ||||
![]() ![]() ![]() |
Σ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to | ||||
![]() ![]() ![]() |
Σ | 1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
![]() ![]() ![]() ![]() |
SΣ | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | string | Version of the system - if relevant | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | code | Symbol in syntax defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Representation defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | string | Version of the system - if relevant | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | code | Symbol in syntax defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Representation defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
![]() ![]() ![]() |
Σ | 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". | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
Σ | 0..1 | uri | Canonical identifier for this Composition, represented as a URI (globally unique) | ||||
![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
?!Σ | 0..1 | code | official (valor fijo) Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known . Required Pattern: official | ||||
![]() ![]() ![]() |
Σ | 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. | ||||
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} Example General: http://www.acme.com/identifiers/patient | ||||
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Example General: 123456 Max Length:64 | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
![]() ![]() ![]() |
Σ | 0..1 | Reference(Organization) | Organization that issued id (may be just text) | ||||
![]() ![]() |
SΣC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value | ||||
![]() ![]() |
?!SΣ | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) | ||||
![]() ![]() |
SΣ | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Categorization of Composition Vinculación: ReferencedItemCategoryValueSet (example): High-level kind of a clinical document at a macro level. | ||||
![]() ![]() |
SΣ | 1..1 | Reference(Paciente) | Paciente del documento | ||||
![]() ![]() |
SΣ | 0..1 | Reference(Atención) | Atención de la que resulta el documento | ||||
![]() ![]() |
SΣC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura | ||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
SΣ | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this Composition (computer friendly) | ||||
![]() ![]() |
SΣ | 1..1 | string | Título del documento, en español Max Length:250 | ||||
![]() ![]() |
0..* | Annotation | For any additional notes | |||||
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) | ||||
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora | ||||
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización | ||||
![]() ![]() |
SΣ | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia | ||||
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
SΣ | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) | ||||
![]() ![]() ![]() |
Σ | 0..* | CodeableConcept | Additional classifiers Vinculación: CitationArtifactClassifier (example): Additional classifiers for the related artifact. | ||||
![]() ![]() ![]() |
Σ | 0..1 | string | Short label | ||||
![]() ![]() ![]() |
Σ | 0..1 | string | Brief description of the related artifact | ||||
![]() ![]() ![]() |
Σ | 0..1 | markdown | Bibliographic citation for the artifact | ||||
![]() ![]() ![]() |
Σ | 0..1 | Attachment | What document is being referenced | ||||
![]() ![]() ![]() |
Σ | 0..1 | canonical(Resource) | What artifact is being referenced | ||||
![]() ![]() ![]() |
SΣ | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Vinculación: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento relacionado | ||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Versión del documento relacionado (versión 1) | ||||
![]() ![]() ![]() |
Σ | 0..1 | code | draft | active | retired | unknown Vinculación: PublicationStatus (required): Publication status of an artifact being referred to. | ||||
![]() ![]() ![]() |
Σ | 0..1 | date | Date of publication of the artifact being referred to | ||||
![]() ![]() |
Σ | 0..* | BackboneElement | The clinical service(s) being documented | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | The period covered by the documentation | ||||
![]() ![]() ![]() |
Σ | 0..* | CodeableReference(Resource) | The event(s) being documented, as code(s), reference(s), or both Vinculación: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented. | ||||
![]() ![]() |
SC | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) Constraints: cmp-1, cmp-2 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 | ||||
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) Vinculación: DocumentSectionCodes (example): Classification of a section of a composition/document. | ||||
![]() ![]() ![]() |
0..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the section | |||||
![]() ![]() ![]() |
0..1 | Reference(Resource) | Who/what the section is about, when it is not about the subject of composition | |||||
![]() ![]() ![]() |
SC | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida This profile does not constrain the narrative in regard to content, language, or traceability to data elements | ||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Order of section entries Vinculación: ListOrderCodes (preferred): What order applies to the items in the entry. | |||||
![]() ![]() ![]() |
SC | 0..* | Reference(Resource) | Recursos de la sección | ||||
![]() ![]() ![]() |
SC | 0..1 | CodeableConcept | Motivo de una sección vacía Vinculación: ListEmptyReasons (preferred): If a section is empty, why it is empty. | ||||
![]() ![]() ![]() |
0..* | Vea section (Composition) | Nested Section | |||||
Documentación de este formato | ||||||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections |
text.exists() or entry.exists() or section.exists()
|
| cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty |
emptyReason.empty() or entry.empty()
|
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
| dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Composition | 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 | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Composition | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
Esta estructura se deriva de Composition .
Resumen
Obligatorios: 9 elementos(7 nested mandatory elementos)
Must-Support: 29 elementos
Estructuras
Esta estructura hace referencia a estas otras estructuras:
Slices
This structure defines the following Slices:
Vista de elementos clave
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v |
![]() ![]() |
SΣ | 1..1 | Meta | Metadatos: las etiquetas de seguridad |
![]() ![]() ![]() |
Σ | 1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. |
![]() ![]() ![]() ![]() |
SΣ | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) |
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality |
![]() ![]() ![]() ![]() |
SΣ | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) |
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode |
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created |
![]() ![]() |
0..* | Resource | Contained, inline Resources | |
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored |
![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system |
![]() ![]() ![]() |
?!Σ | 0..1 | code | official (valor fijo) Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known . Required Pattern: official |
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} Example General: http://www.acme.com/identifiers/patient |
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Example General: 123456 Max Length:64 |
![]() ![]() |
SΣC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value |
![]() ![]() |
?!SΣ | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) |
![]() ![]() |
SΣ | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) |
![]() ![]() |
SΣ | 1..1 | Reference(Paciente) | Paciente del documento |
![]() ![]() |
SΣ | 0..1 | Reference(Atención) | Atención de la que resulta el documento |
![]() ![]() |
SΣC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura |
![]() ![]() |
SΣ | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema |
![]() ![]() |
SΣ | 1..1 | string | Título del documento, en español Max Length:250 |
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) |
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora |
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización |
![]() ![]() |
SΣ | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia |
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía |
![]() ![]() ![]() |
SΣ | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) |
![]() ![]() ![]() |
SΣ | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL |
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento relacionado |
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Versión del documento relacionado (versión 1) |
![]() ![]() |
SC | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) Constraints: cmp-1, cmp-2 |
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized |
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) Vinculación: DocumentSectionCodes (example): Classification of a section of a composition/document. |
![]() ![]() ![]() |
SC | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida This profile does not constrain the narrative in regard to content, language, or traceability to data elements |
![]() ![]() ![]() |
SC | 0..* | Reference(Resource) | Recursos de la sección |
![]() ![]() ![]() |
SC | 0..1 | CodeableConcept | Motivo de una sección vacía Vinculación: ListEmptyReasons (preferred): If a section is empty, why it is empty. |
Documentación de este formato | ||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections |
text.exists() or entry.exists() or section.exists()
|
| cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty |
emptyReason.empty() or entry.empty()
|
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
| dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Composition | 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 | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Composition | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
Vista diferencial
Esta estructura se deriva de Composition .
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v |
![]() ![]() |
S | 1..1 | Meta | Metadatos: las etiquetas de seguridad |
![]() ![]() ![]() |
1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system | |
![]() ![]() ![]() ![]() |
S | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality | |
![]() ![]() ![]() ![]() |
S | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode | |
![]() ![]() |
SC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system |
![]() ![]() ![]() |
0..1 | code | official (valor fijo) Required Pattern: official | |
![]() ![]() ![]() |
S | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} |
![]() ![]() ![]() |
SC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Max Length:64 |
![]() ![]() |
SC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value |
![]() ![]() |
S | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) |
![]() ![]() |
S | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) |
![]() ![]() |
S | 1..1 | Reference(Paciente) | Paciente del documento |
![]() ![]() |
S | 0..1 | Reference(Atención) | Atención de la que resulta el documento |
![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura |
![]() ![]() |
S | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema |
![]() ![]() |
S | 1..1 | string | Título del documento, en español Max Length:250 |
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) |
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) |
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora |
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización |
![]() ![]() |
S | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia |
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía |
![]() ![]() ![]() |
S | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) |
![]() ![]() ![]() |
S | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador |
![]() ![]() ![]() ![]() |
S | 1..1 | Identifier | Identificador del documento relacionado |
![]() ![]() ![]() ![]() |
0..1 | string | Versión del documento relacionado (versión 1) | |
![]() ![]() |
S | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) |
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) |
![]() ![]() ![]() |
S | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida |
![]() ![]() ![]() |
S | 0..* | Reference(Resource) | Recursos de la sección |
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Motivo de una sección vacía |
Documentación de este formato | ||||
| Ruta | Estado | Uso | ValueSet | Versión | Fuente |
| Composition.meta.security:confidencialidad | Base | required | Confidencialidad | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.meta.security:sensibilidad | Base | required | Sensibilidad de la información | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.status | Base | required | Estado del documento | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.type | Base | extensible | Tipo de documento clínico | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Composition.attester.mode | Base | required | Composition Attestation Mode | 📦5.0.0 | Estándar FHIR |
| Composition.relatesTo.type | Base | required | Relación entre documentos | 📦0.1.0 | Guía de Implementación de Terminología de Costa Rica vnull |
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
Vista instantáneaView
| Nombre | Marcas | Card. | Tipo | Descripción y restricciones Filter: ![]() ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | Composition | Documento clínico: encabezado común Constraints: cr-documento-version, cr-documento-validacion-legal, cr-documento-validacion-fecha, cr-documento-relacion, cr-documento-fecha-atencion, cr-documento-sensibilidad, cr-documento-sensibilidad-v | ||||
![]() ![]() |
Σ | 0..1 | id | Logical id of this artifact | ||||
![]() ![]() |
SΣ | 1..1 | Meta | Metadatos: las etiquetas de seguridad | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
Σ | 0..1 | id | Version specific identifier | ||||
![]() ![]() ![]() |
Σ | 0..1 | instant | When the resource version last changed | ||||
![]() ![]() ![]() |
Σ | 0..1 | uri | Identifies where the resource comes from | ||||
![]() ![]() ![]() |
Σ | 0..* | canonical(StructureDefinition) | Profiles this resource claims to conform to | ||||
![]() ![]() ![]() |
Σ | 1..* | Coding | Confidencialidad y sensibilidad del documento Slice: Sin orden, Abierto by value:system Vinculación: AllSecurityLabels (extensible): Security Labels from the Healthcare Privacy and Security Classification System. | ||||
![]() ![]() ![]() ![]() |
SΣ | 1..1 | Coding | N | R | V Vinculación: Confidencialidad (required) | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-Confidentiality | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | string | Version of the system - if relevant | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | code | Symbol in syntax defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Representation defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
![]() ![]() ![]() ![]() |
SΣ | 0..* | Coding | PSY | PSYTHPN | HIV | STD | SDV | SEX | SUD | GDIS Vinculación: Sensibilidad de la información (required) | ||||
![]() ![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() ![]() |
Σ | 1..1 | uri | Sistema de códigos del slice (valor fijo) Required Pattern: http://terminology.hl7.org/CodeSystem/v3-ActCode | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | string | Version of the system - if relevant | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | code | Symbol in syntax defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Representation defined by the system | ||||
![]() ![]() ![]() ![]() ![]() |
Σ | 0..1 | boolean | If this coding was chosen directly by the user | ||||
![]() ![]() ![]() |
Σ | 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". | ||||
![]() ![]() |
?!Σ | 0..1 | uri | A set of rules under which this content was created | ||||
![]() ![]() |
0..1 | code | Language of the resource content Vinculación: AllLanguages (required): IETF language tag for a human language
| |||||
![]() ![]() |
0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored | ||||
![]() ![]() |
Σ | 0..1 | uri | Canonical identifier for this Composition, represented as a URI (globally unique) | ||||
![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento, el mismo en todas sus versiones Constraints: cr-documento-system | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
?!Σ | 0..1 | code | official (valor fijo) Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known . Required Pattern: official | ||||
![]() ![]() ![]() |
Σ | 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. | ||||
![]() ![]() ![]() |
SΣ | 1..1 | uri | https://hl7.or.cr/fhir/sid/documento/{código del establecimiento} Example General: http://www.acme.com/identifiers/patient | ||||
![]() ![]() ![]() |
SΣC | 1..1 | string | Número del documento Constraints: cr-codigo-interno-value Example General: 123456 Max Length:64 | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | Time period when id is/was valid for use | ||||
![]() ![]() ![]() |
Σ | 0..1 | Reference(Organization) | Organization that issued id (may be just text) | ||||
![]() ![]() |
SΣC | 0..1 | string | 1 para la primera emisión, 2 para la primera corrección o adenda, y así sucesivamente Constraints: cr-documento-version-value | ||||
![]() ![]() |
?!SΣ | 1..1 | code | Estado: preliminary | final | corrected | appended | entered-in-error Vinculación: Estado del documento (required) | ||||
![]() ![]() |
SΣ | 1..1 | CodeableConcept | Tipo de documento (LOINC) Vinculación: Tipo de documento clínico (extensible) | ||||
![]() ![]() |
Σ | 0..* | CodeableConcept | Categorization of Composition Vinculación: ReferencedItemCategoryValueSet (example): High-level kind of a clinical document at a macro level. | ||||
![]() ![]() |
SΣ | 1..1 | Reference(Paciente) | Paciente del documento | ||||
![]() ![]() |
SΣ | 0..1 | Reference(Atención) | Atención de la que resulta el documento | ||||
![]() ![]() |
SΣC | 1..1 | dateTime | Fecha y hora en que se redactó (no futura) Constraints: cr-documento-fecha-hora, cr-documento-fecha-no-futura | ||||
![]() ![]() |
Σ | 0..* | UsageContext | The context that the content is intended to support | ||||
![]() ![]() |
SΣ | 1..* | Reference(Rol del profesional | Profesional de salud | Organización) | Autor: el profesional en su rol, o la organización si lo genera un sistema | ||||
![]() ![]() |
Σ | 0..1 | string | Name for this Composition (computer friendly) | ||||
![]() ![]() |
SΣ | 1..1 | string | Título del documento, en español Max Length:250 | ||||
![]() ![]() |
0..* | Annotation | For any additional notes | |||||
![]() ![]() |
S | 0..* | BackboneElement | Quién valida el documento (validación legal del profesional) | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..1 | CodeableConcept | legal | professional | official | personal Vinculación: CompositionAttestationMode (required) | ||||
![]() ![]() ![]() |
SC | 1..1 | dateTime | Fecha y hora de la validación Constraints: cr-documento-fecha-hora | ||||
![]() ![]() ![]() |
S | 1..1 | Reference(Rol del profesional | Profesional de salud | Organización) | Quién valida: el profesional en su rol, o la organización | ||||
![]() ![]() |
SΣ | 1..1 | Reference(Organización) | Entidad que emite el documento y lo custodia | ||||
![]() ![]() |
S | 0..* | RelatedArtifact | Versión anterior que esta reemplaza o amplía | ||||
![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() |
SΣ | 1..1 | code | replaces | appends | transforms Vinculación: Relación entre documentos (required) | ||||
![]() ![]() ![]() |
Σ | 0..* | CodeableConcept | Additional classifiers Vinculación: CitationArtifactClassifier (example): Additional classifiers for the related artifact. | ||||
![]() ![]() ![]() |
Σ | 0..1 | string | Short label | ||||
![]() ![]() ![]() |
Σ | 0..1 | string | Brief description of the related artifact | ||||
![]() ![]() ![]() |
Σ | 0..1 | markdown | Bibliographic citation for the artifact | ||||
![]() ![]() ![]() |
Σ | 0..1 | Attachment | What document is being referenced | ||||
![]() ![]() ![]() |
Σ | 0..1 | canonical(Resource) | What artifact is being referenced | ||||
![]() ![]() ![]() |
SΣ | 1..1 | Reference(Documento clínico) | Documento relacionado, por su identificador | ||||
![]() ![]() ![]() ![]() |
0..1 | id | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Sin orden, Abierto by value:url | |||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
Σ | 0..1 | uri | Type the reference refers to (e.g. "Patient") - must be a resource in resources Vinculación: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model). | ||||
![]() ![]() ![]() ![]() |
SΣC | 1..1 | Identifier | Identificador del documento relacionado | ||||
![]() ![]() ![]() ![]() |
ΣC | 0..1 | string | Versión del documento relacionado (versión 1) | ||||
![]() ![]() ![]() |
Σ | 0..1 | code | draft | active | retired | unknown Vinculación: PublicationStatus (required): Publication status of an artifact being referred to. | ||||
![]() ![]() ![]() |
Σ | 0..1 | date | Date of publication of the artifact being referred to | ||||
![]() ![]() |
Σ | 0..* | BackboneElement | The clinical service(s) being documented | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
Σ | 0..1 | Period | The period covered by the documentation | ||||
![]() ![]() ![]() |
Σ | 0..* | CodeableReference(Resource) | The event(s) being documented, as code(s), reference(s), or both Vinculación: v3 Code System ActCode (example): This list of codes represents the main clinical acts being documented. | ||||
![]() ![]() |
SC | 0..* | BackboneElement | Secciones del documento (las define cada guía de dominio) Constraints: cmp-1, cmp-2 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
?!Σ | 0..* | Extension | Extensions that cannot be ignored even if unrecognized | ||||
![]() ![]() ![]() |
S | 1..1 | string | Título de la sección Max Length:250 | ||||
![]() ![]() ![]() |
S | 0..1 | CodeableConcept | Código de la sección (LOINC) Vinculación: DocumentSectionCodes (example): Classification of a section of a composition/document. | ||||
![]() ![]() ![]() |
0..* | Reference(Practitioner | PractitionerRole | Device | Patient | RelatedPerson | Organization) | Who and/or what authored the section | |||||
![]() ![]() ![]() |
0..1 | Reference(Resource) | Who/what the section is about, when it is not about the subject of composition | |||||
![]() ![]() ![]() |
SC | 1..1 | Narrative | Texto narrativo de la sección, que es lo que se lee y se valida This profile does not constrain the narrative in regard to content, language, or traceability to data elements | ||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Order of section entries Vinculación: ListOrderCodes (preferred): What order applies to the items in the entry. | |||||
![]() ![]() ![]() |
SC | 0..* | Reference(Resource) | Recursos de la sección | ||||
![]() ![]() ![]() |
SC | 0..1 | CodeableConcept | Motivo de una sección vacía Vinculación: ListEmptyReasons (preferred): If a section is empty, why it is empty. | ||||
![]() ![]() ![]() |
0..* | Vea section (Composition) | Nested Section | |||||
Documentación de este formato | ||||||||
| Id | Nivel | Ruta(s) | Descripción | Expression |
| cmp-1 | error | Composition.section | A section must contain at least one of text, entries, or sub-sections |
text.exists() or entry.exists() or section.exists()
|
| cmp-2 | error | Composition.section | A section can only have an emptyReason if it is empty |
emptyReason.empty() or entry.empty()
|
| cr-codigo-interno-value | error | Composition.identifier.value | Un código interno tiene de 1 a 64 caracteres, sin espacios. |
matches('^\\S{1,64}$')
|
| cr-documento-fecha-atencion | error | Composition | La fecha del documento no es anterior al inicio de su atención. |
encounter.exists() implies (encounter.resolve().actualPeriod.start.empty() or date >= encounter.resolve().actualPeriod.start)
|
| cr-documento-fecha-hora | error | Composition.date, Composition.attester.time | La fecha lleva fecha y hora, no solo la fecha. |
toString().contains('T')
|
| cr-documento-fecha-no-futura | error | Composition.date | La fecha del documento no es futura. |
$this <= now()
|
| cr-documento-relacion | error | Composition | Una versión corregida, con adenda o registrada por error referencia la versión anterior (relatesTo replaces o appends). |
status in ('corrected' | 'appended' | 'entered-in-error') implies relatesTo.where(type in ('replaces' | 'appends')).exists()
|
| cr-documento-sensibilidad | error | Composition | Un documento con una sensibilidad tiene confidencialidad R o V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode').exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code in ('R' | 'V')).exists()
|
| cr-documento-sensibilidad-v | error | Composition | Un documento con notas de psicoterapia (PSYTHPN) o sobre violencia sexual o doméstica (SDV) tiene confidencialidad V. |
meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-ActCode' and code in ('PSYTHPN' | 'SDV')).exists() implies meta.security.where(system = 'http://terminology.hl7.org/CodeSystem/v3-Confidentiality' and code = 'V').exists()
|
| cr-documento-system | error | Composition.identifier | El system del identificador es https://hl7.or.cr/fhir/sid/documento/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). |
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})$')
|
| cr-documento-validacion-fecha | error | Composition | La validación no es anterior a la fecha del documento. |
attester.all(time.empty() or time >= %resource.date)
|
| cr-documento-validacion-legal | error | Composition | Un documento final, corregido o con adenda redactado por un profesional lleva la validación legal (attester.mode legal). |
status in ('final' | 'corrected' | 'appended') and author.all(resolve() is PractitionerRole or resolve() is Practitioner) implies attester.where(mode.coding.where(system = 'http://hl7.org/fhir/composition-attestation-mode' and code = 'legal').exists()).exists()
|
| cr-documento-version | error | Composition | Una versión que reemplaza o amplía otra indica su número de versión. |
relatesTo.where(type in ('replaces' | 'appends')).exists() implies version.exists()
|
| cr-documento-version-value | error | Composition.version | La versión es un número entero positivo: 1, 2, 3. |
matches('^[1-9][0-9]*$')
|
| dom-2 | error | Composition | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | Composition | 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 | Composition | 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 | Composition | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | Composition | A resource should have narrative for robust management |
text.`div`.exists()
|
| ele-1 | error | **TODOS** los elementos | All FHIR elements must have a @value or children |
hasValue() or (children().count() > id.count())
|
| ext-1 | error | **TODAS** las extensiones | Must have either extensions or value[x], not both |
extension.exists() != value.exists()
|
Esta estructura se deriva de Composition .
Resumen
Obligatorios: 9 elementos(7 nested mandatory elementos)
Must-Support: 29 elementos
Estructuras
Esta estructura hace referencia a estas otras estructuras:
Slices
This structure defines the following Slices:
Otras representaciones de perfil: CSV, Excel, Schematron
No se intercambia sola: es la primera entrada del documento clínico completo, que se envía y se obtiene en el repositorio de documentos.
Ver también Servicios del HIE.