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

Guía de Implementación Core de Costa Rica - Versión en desarrollo (v0.1.0): borrador de trabajo de la Iniciativa HL7® Costa Rica, que puede cambiar sin aviso.

Perfil de los recursos: Ubicación

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

Lugar físico donde se prestan servicios de salud en Costa Rica: la sede de un establecimiento, un edificio, un piso, un servicio, una sala, una cama o una unidad móvil. Implementa el modelo lógico de la ubicación.

Usos:

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

Vistas formales del contenido del perfil

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

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
.... use ?!Σ 0..1 code official (valor fijo)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
Required Pattern: official
.... system SΣ 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Example General: 123456
Max Length:64
... status ?!SΣ 1..1 code Estado: active | suspended | inactive
Vinculación: LocationStatus (required): Indicates whether the location is still in use.
... name SΣ 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... alias S 0..* string Otro nombre con que se conoce (Rayos X)
... description SΣ 0..1 markdown Indicaciones para llegar dentro de la sede
... Slices for type SΣ 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:facility SΣ 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:servicio SΣ 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... telecom SΣC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... use ?!Σ 0..1 code work (valor fijo)
Vinculación: ContactPointUse (required): Use of contact point.
Required Pattern: work
... address S 0..1 CRAddress Dirección de la sede
.... Slices for extension Content/Rules for all slices
..... extension:barrioPoblado S 0..1 (Complex) Barrio (zona urbana) o poblado (zona rural)
URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct
...... extension 0..0 Extension
Slice: Sin orden, Abierto by value:url
...... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"
...... value[x] 1..1 string Nombre del barrio o del poblado
Max Length:100
.... use ?!Σ 0..1 code work (valor fijo)
Vinculación: AddressUse (required): The use of an address (home / work / etc.).
Required Pattern: work
.... type Σ 0..1 code physical (valor fijo)
Vinculación: AddressType (required): The type of an address (physical / postal).
Required Pattern: physical
.... text SΣ 0..1 string Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito
Example General: 137 Nowhere Street, Erewhon 9132
Max Length:250
.... line SΣ 0..* string Señas (Costa Rica) o calle y número (otro país)
This repeating element order: The order in which lines should appear in an address label
Example General: 137 Nowhere Street
Max Length:250
.... city SΣ 0..1 string Cantón (código de la DTA en Costa Rica) o ciudad
Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
Example General: Erewhon
.... district SΣ 0..1 string Distrito (código de la DTA en Costa Rica)
Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia).
Example General: Madison
.... state SΣ 0..1 string Provincia (código de la DTA en Costa Rica) o estado, región o departamento
Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
.... postalCode SΣ 0..1 string Código postal
Example General: 9132
.... country SΣ 1..1 string País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica)
Vinculación: Iso316613 (required)
... form SΣ 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
... managingOrganization SΣ 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
Location.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
Location.status Base required Location Status 📍5.0.0 Estándar FHIR
Location.type Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:facility Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.contact.telecom.​use Base required ContactPointUse 📍5.0.0 Estándar FHIR
Location.address.use Base required AddressUse 📍5.0.0 Estándar FHIR
Location.address.type Base required AddressType 📍5.0.0 Estándar FHIR
Location.address.city Base preferred Cantones de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.district Base preferred Distritos de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.state Base preferred Provincias de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.country Base required Iso 3166 Part 1: 3 Letter Codes 📦5.0.0 Estándar FHIR
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
dom-2 error Location If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Location 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 Location 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 Location If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Location 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 Location .

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... identifier SC 0..* Identifier Código interno de la ubicación en el establecimiento
Constraints: cr-ubicacion-system
.... use 0..1 code official (valor fijo)
Required Pattern: official
.... system S 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
.... value SC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Max Length:64
... status S 1..1 code Estado: active | suspended | inactive
... name S 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... description S 0..1 markdown Indicaciones para llegar dentro de la sede
... Slices for type S 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
.... type:facility S 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types
...... code 0..1 code facility (valor fijo)
Required Pattern: facility
.... type:servicio S 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-RoleCode
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... telecom SC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... use 0..1 code work (valor fijo)
Required Pattern: work
... address S 0..1 CRAddress Dirección de la sede
.... use 0..1 code work (valor fijo)
Required Pattern: work
.... type 0..1 code physical (valor fijo)
Required Pattern: physical
... form S 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
... managingOrganization S 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)

doco Documentación de este formato

Vinculaciones terminológicas (diferencial)

Ruta Estado Uso ValueSet Versión Fuente
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... 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
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... identifier SΣC 0..* Identifier Código interno de la ubicación en el establecimiento
Constraints: cr-ubicacion-system
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... use ?!Σ 0..1 code official (valor fijo)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
Required Pattern: official
.... type Σ 0..1 CodeableConcept Description of identifier
Vinculación: IdentifierTypeCodes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
.... system SΣ 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Example General: 123456
Max Length:64
.... period Σ 0..1 Period Time period when id is/was valid for use
.... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... status ?!SΣ 1..1 code Estado: active | suspended | inactive
Vinculación: LocationStatus (required): Indicates whether the location is still in use.
... operationalStatus Σ 0..1 Coding The operational status of the location (typically only for a bed/room)
Vinculación: hl7VS-bedStatus (preferred): The operational status if the location (where typically a bed/room).
... name SΣ 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... alias S 0..* string Otro nombre con que se conoce (Rayos X)
... description SΣ 0..1 markdown Indicaciones para llegar dentro de la sede
... mode Σ 0..1 code instance | kind
Vinculación: LocationMode (required): Indicates whether a resource instance represents a specific location or a class of locations.
... Slices for type SΣ 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:facility SΣ 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code facility (valor fijo)
Required Pattern: facility
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
.... type:servicio SΣ 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-RoleCode
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... purpose Σ 0..1 CodeableConcept The type of contact
Vinculación: Contact entity type (preferred): The purpose for which an extended contact detail should be used.
.... name Σ 0..* HumanName Name of an individual to contact
.... telecom SΣC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... system ΣC 0..1 code phone | fax | email | pager | url | sms | other
Vinculación: ContactPointSystem (required): Telecommunications form for contact point.
..... value ΣC 0..1 string The actual contact point details
..... use ?!Σ 0..1 code work (valor fijo)
Vinculación: ContactPointUse (required): Use of contact point.
Required Pattern: work
..... rank Σ 0..1 positiveInt Specify preferred order of use (1 = highest)
..... period Σ 0..1 Period Time period when the contact point was/is in use
.... address Σ 0..1 Address Address for the contact
.... organization Σ 0..1 Reference(Organization) This contact detail is handled/monitored by a specific organization
.... period Σ 0..1 Period Period that this contact was valid for usage
... address S 0..1 CRAddress Dirección de la sede
.... id 0..1 id Unique id for inter-element referencing
.... Slices for extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... extension:barrioPoblado S 0..1 (Complex) Barrio (zona urbana) o poblado (zona rural)
URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..0 Extension
Slice: Sin orden, Abierto by value:url
...... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"
...... value[x] 1..1 string Nombre del barrio o del poblado
Max Length:100
.... use ?!Σ 0..1 code work (valor fijo)
Vinculación: AddressUse (required): The use of an address (home / work / etc.).
Required Pattern: work
.... type Σ 0..1 code physical (valor fijo)
Vinculación: AddressType (required): The type of an address (physical / postal).
Required Pattern: physical
.... text SΣ 0..1 string Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito
Example General: 137 Nowhere Street, Erewhon 9132
Max Length:250
.... line SΣ 0..* string Señas (Costa Rica) o calle y número (otro país)
This repeating element order: The order in which lines should appear in an address label
Example General: 137 Nowhere Street
Max Length:250
.... city SΣ 0..1 string Cantón (código de la DTA en Costa Rica) o ciudad
Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
Example General: Erewhon
.... district SΣ 0..1 string Distrito (código de la DTA en Costa Rica)
Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia).
Example General: Madison
.... state SΣ 0..1 string Provincia (código de la DTA en Costa Rica) o estado, región o departamento
Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
.... postalCode SΣ 0..1 string Código postal
Example General: 9132
.... country SΣ 1..1 string País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica)
Vinculación: Iso316613 (required)
.... period Σ 0..1 Period Time period when address was/is in use
Example General: {"start":"2010-03-23","end":"2010-07-01"}
... form SΣ 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... 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
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
.... altitude 0..1 decimal Altitude with WGS84 datum
... managingOrganization SΣ 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)
... characteristic 0..* CodeableConcept Collection of characteristics (attributes)
Vinculación: LocationCharacteristic (example): A custom attribute that could be provided at a service (e.g. Wheelchair accessibiliy).
... hoursOfOperation 0..* Availability What days/times during a week is this location usually open (including exceptions)
... virtualService 0..* VirtualServiceDetail Connection details of a virtual service (e.g. conference call)
... endpoint 0..* Reference(Endpoint) Technical endpoints providing access to services operated for the location

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
Location.language Base required All Languages 📍5.0.0 Estándar FHIR
Location.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
Location.identifier.​type Base extensible Identifier Type Codes 📍5.0.0 Estándar FHIR
Location.status Base required Location Status 📍5.0.0 Estándar FHIR
Location.operationalStatus Base preferred hl7VS-bedStatus 📦3.0.0 THO v7.4
Location.mode Base required Location Mode 📍5.0.0 Estándar FHIR
Location.type Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:facility Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.contact.purpose Base preferred Contact entity type 📦2.0.0 THO v7.4
Location.contact.telecom.​system Base required ContactPointSystem 📍5.0.0 Estándar FHIR
Location.contact.telecom.​use Base required ContactPointUse 📍5.0.0 Estándar FHIR
Location.address.use Base required AddressUse 📍5.0.0 Estándar FHIR
Location.address.type Base required AddressType 📍5.0.0 Estándar FHIR
Location.address.city Base preferred Cantones de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.district Base preferred Distritos de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.state Base preferred Provincias de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.country Base required Iso 3166 Part 1: 3 Letter Codes 📦5.0.0 Estándar FHIR
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.characteristic Base example Location Characteristic 📍5.0.0 Estándar FHIR

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
dom-2 error Location If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Location 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 Location 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 Location If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Location 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 Location .

Resumen

Obligatorios: 5 elementos(4 nested mandatory elementos)
Must-Support: 19 elementos

Estructuras

Esta estructura hace referencia a estas otras estructuras:

Slices

This structure defines the following Slices:

  • The element 1 is sliced based on the value of Location.type

Vista de elementos clave

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... contained 0..* Resource Contained, inline Resources
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
.... use ?!Σ 0..1 code official (valor fijo)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
Required Pattern: official
.... system SΣ 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Example General: 123456
Max Length:64
... status ?!SΣ 1..1 code Estado: active | suspended | inactive
Vinculación: LocationStatus (required): Indicates whether the location is still in use.
... name SΣ 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... alias S 0..* string Otro nombre con que se conoce (Rayos X)
... description SΣ 0..1 markdown Indicaciones para llegar dentro de la sede
... Slices for type SΣ 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:facility SΣ 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:servicio SΣ 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... telecom SΣC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... use ?!Σ 0..1 code work (valor fijo)
Vinculación: ContactPointUse (required): Use of contact point.
Required Pattern: work
... address S 0..1 CRAddress Dirección de la sede
.... Slices for extension Content/Rules for all slices
..... extension:barrioPoblado S 0..1 (Complex) Barrio (zona urbana) o poblado (zona rural)
URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct
...... extension 0..0 Extension
Slice: Sin orden, Abierto by value:url
...... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"
...... value[x] 1..1 string Nombre del barrio o del poblado
Max Length:100
.... use ?!Σ 0..1 code work (valor fijo)
Vinculación: AddressUse (required): The use of an address (home / work / etc.).
Required Pattern: work
.... type Σ 0..1 code physical (valor fijo)
Vinculación: AddressType (required): The type of an address (physical / postal).
Required Pattern: physical
.... text SΣ 0..1 string Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito
Example General: 137 Nowhere Street, Erewhon 9132
Max Length:250
.... line SΣ 0..* string Señas (Costa Rica) o calle y número (otro país)
This repeating element order: The order in which lines should appear in an address label
Example General: 137 Nowhere Street
Max Length:250
.... city SΣ 0..1 string Cantón (código de la DTA en Costa Rica) o ciudad
Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
Example General: Erewhon
.... district SΣ 0..1 string Distrito (código de la DTA en Costa Rica)
Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia).
Example General: Madison
.... state SΣ 0..1 string Provincia (código de la DTA en Costa Rica) o estado, región o departamento
Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
.... postalCode SΣ 0..1 string Código postal
Example General: 9132
.... country SΣ 1..1 string País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica)
Vinculación: Iso316613 (required)
... form SΣ 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored even if unrecognized
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
... managingOrganization SΣ 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
Location.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
Location.status Base required Location Status 📍5.0.0 Estándar FHIR
Location.type Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:facility Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.contact.telecom.​use Base required ContactPointUse 📍5.0.0 Estándar FHIR
Location.address.use Base required AddressUse 📍5.0.0 Estándar FHIR
Location.address.type Base required AddressType 📍5.0.0 Estándar FHIR
Location.address.city Base preferred Cantones de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.district Base preferred Distritos de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.state Base preferred Provincias de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.country Base required Iso 3166 Part 1: 3 Letter Codes 📦5.0.0 Estándar FHIR
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
dom-2 error Location If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Location 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 Location 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 Location If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Location 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 Location .

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... identifier SC 0..* Identifier Código interno de la ubicación en el establecimiento
Constraints: cr-ubicacion-system
.... use 0..1 code official (valor fijo)
Required Pattern: official
.... system S 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
.... value SC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Max Length:64
... status S 1..1 code Estado: active | suspended | inactive
... name S 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... description S 0..1 markdown Indicaciones para llegar dentro de la sede
... Slices for type S 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
.... type:facility S 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types
...... code 0..1 code facility (valor fijo)
Required Pattern: facility
.... type:servicio S 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
..... coding
...... system 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-RoleCode
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... telecom SC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... use 0..1 code work (valor fijo)
Required Pattern: work
... address S 0..1 CRAddress Dirección de la sede
.... use 0..1 code work (valor fijo)
Required Pattern: work
.... type 0..1 code physical (valor fijo)
Required Pattern: physical
... form S 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
... managingOrganization S 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)

doco Documentación de este formato

Vinculaciones terminológicas (diferencial)

Ruta Estado Uso ValueSet Versión Fuente
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')

Vista instantáneaView

NombreMarcasCard.TipoDescripción y restricciones    Filter: Filtersdoco
.. Location C 0..* Location Ubicación: sede, edificio, servicio, sala, cama o unidad móvil
Constraints: cr-ubicacion-facility, cr-ubicacion-superior, cr-ubicacion-sede-direccion, cr-identificador-unico
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... 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
... modifierExtension ?!Σ 0..* Extension Extensions that cannot be ignored
... identifier SΣC 0..* Identifier Código interno de la ubicación en el establecimiento
Constraints: cr-ubicacion-system
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... use ?!Σ 0..1 code official (valor fijo)
Vinculación: IdentifierUse (required): Identifies the purpose for this identifier, if known .
Required Pattern: official
.... type Σ 0..1 CodeableConcept Description of identifier
Vinculación: IdentifierTypeCodes (extensible): A coded type for an identifier that can be used to determine which identifier to use for a specific purpose.
.... system SΣ 1..1 uri https://hl7.or.cr/fhir/sid/ubicacion/{código del establecimiento}
Example General: http://www.acme.com/identifiers/patient
.... value SΣC 1..1 string Código interno de la ubicación en el sistema del establecimiento
Constraints: cr-codigo-interno-value
Example General: 123456
Max Length:64
.... period Σ 0..1 Period Time period when id is/was valid for use
.... assigner Σ 0..1 Reference(Organization) Organization that issued id (may be just text)
... status ?!SΣ 1..1 code Estado: active | suspended | inactive
Vinculación: LocationStatus (required): Indicates whether the location is still in use.
... operationalStatus Σ 0..1 Coding The operational status of the location (typically only for a bed/room)
Vinculación: hl7VS-bedStatus (preferred): The operational status if the location (where typically a bed/room).
... name SΣ 1..1 string Nombre de la ubicación (Servicio de Radiología)
Max Length:250
... alias S 0..* string Otro nombre con que se conoce (Rayos X)
... description SΣ 0..1 markdown Indicaciones para llegar dentro de la sede
... mode Σ 0..1 code instance | kind
Vinculación: LocationMode (required): Indicates whether a resource instance represents a specific location or a class of locations.
... Slices for type SΣ 1..* CodeableConcept Marca de sede (IHE mCSD) y tipo de servicio
Slice: Sin orden, Abierto by value:coding.system
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
.... type:facility SΣ 0..1 CodeableConcept Marca de sede de IHE mCSD (facility), solo en las sedes
Vinculación: ServiceDeliveryLocationRoleType (extensible): Indicates the type of function performed at the location.
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code facility (valor fijo)
Required Pattern: facility
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
.... type:servicio SΣ 0..* CodeableConcept Función clínica de la ubicación: emergencias, radiología, laboratorio, farmacia
Vinculación: ServiceDeliveryLocationRoleType (extensible)
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... coding Σ 0..* Coding Code defined by a terminology system
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
...... system Σ 1..1 uri Sistema de códigos del slice (valor fijo)
Required Pattern: http://terminology.hl7.org/CodeSystem/v3-RoleCode
...... version Σ 0..1 string Version of the system - if relevant
...... code ΣC 0..1 code Symbol in syntax defined by the system
...... display ΣC 0..1 string Representation defined by the system
...... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
..... text Σ 0..1 string Plain text representation of the concept
... contact S 0..* ExtendedContactDetail Contacto de trabajo de la ubicación o del servicio
.... id 0..1 id Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
.... purpose Σ 0..1 CodeableConcept The type of contact
Vinculación: Contact entity type (preferred): The purpose for which an extended contact detail should be used.
.... name Σ 0..* HumanName Name of an individual to contact
.... telecom SΣC 0..* ContactPoint Teléfono (+506 y 8 dígitos; extensión interna con ;ext=) o correo electrónico
Constraints: cr-telefono
..... id 0..1 id Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... system ΣC 0..1 code phone | fax | email | pager | url | sms | other
Vinculación: ContactPointSystem (required): Telecommunications form for contact point.
..... value ΣC 0..1 string The actual contact point details
..... use ?!Σ 0..1 code work (valor fijo)
Vinculación: ContactPointUse (required): Use of contact point.
Required Pattern: work
..... rank Σ 0..1 positiveInt Specify preferred order of use (1 = highest)
..... period Σ 0..1 Period Time period when the contact point was/is in use
.... address Σ 0..1 Address Address for the contact
.... organization Σ 0..1 Reference(Organization) This contact detail is handled/monitored by a specific organization
.... period Σ 0..1 Period Period that this contact was valid for usage
... address S 0..1 CRAddress Dirección de la sede
.... id 0..1 id Unique id for inter-element referencing
.... Slices for extension 0..* Extension Additional content defined by implementations
Slice: Sin orden, Abierto by value:url
..... extension:barrioPoblado S 0..1 (Complex) Barrio (zona urbana) o poblado (zona rural)
URL: http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct
...... id 0..1 id Unique id for inter-element referencing
...... extension 0..0 Extension
Slice: Sin orden, Abierto by value:url
...... url 1..1 uri "http://hl7.org/fhir/StructureDefinition/iso21090-ADXP-precinct"
...... value[x] 1..1 string Nombre del barrio o del poblado
Max Length:100
.... use ?!Σ 0..1 code work (valor fijo)
Vinculación: AddressUse (required): The use of an address (home / work / etc.).
Required Pattern: work
.... type Σ 0..1 code physical (valor fijo)
Vinculación: AddressType (required): The type of an address (physical / postal).
Required Pattern: physical
.... text SΣ 0..1 string Dirección completa, con los nombres (no los códigos) de provincia, cantón y distrito
Example General: 137 Nowhere Street, Erewhon 9132
Max Length:250
.... line SΣ 0..* string Señas (Costa Rica) o calle y número (otro país)
This repeating element order: The order in which lines should appear in an address label
Example General: 137 Nowhere Street
Max Length:250
.... city SΣ 0..1 string Cantón (código de la DTA en Costa Rica) o ciudad
Vinculación: Cantones de Costa Rica (preferred): En Costa Rica (CRI), el código de cantón de la DTA es obligatorio y pertenece a la provincia (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
Example General: Erewhon
.... district SΣ 0..1 string Distrito (código de la DTA en Costa Rica)
Vinculación: Distritos de Costa Rica (preferred): En Costa Rica (CRI), el código de distrito de la DTA es obligatorio y pertenece al cantón (invariantes cr-direccion-dta y cr-direccion-concordancia).
Example General: Madison
.... state SΣ 0..1 string Provincia (código de la DTA en Costa Rica) o estado, región o departamento
Vinculación: Provincias de Costa Rica (preferred): En Costa Rica (CRI), el código de provincia de la DTA es obligatorio (invariantes cr-direccion-dta y cr-direccion-concordancia). En otro país, texto libre.
.... postalCode SΣ 0..1 string Código postal
Example General: 9132
.... country SΣ 1..1 string País, con código ISO 3166-1 alfa-3 (CRI para Costa Rica)
Vinculación: Iso316613 (required)
.... period Σ 0..1 Period Time period when address was/is in use
Example General: {"start":"2010-03-23","end":"2010-07-01"}
... form SΣ 1..1 CodeableConcept Forma física: sede, edificio, piso, sala, área, cama o vehículo
Vinculación: Forma física de la ubicación (required)
... position S 0..1 BackboneElement Posición geográfica (WGS84)
.... 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
.... longitude S 1..1 decimal Longitud, en grados decimales
.... latitude S 1..1 decimal Latitud, en grados decimales
.... altitude 0..1 decimal Altitude with WGS84 datum
... managingOrganization SΣ 1..1 Reference(Organización) Organización que opera la ubicación
... partOf S 0..1 Reference(Ubicación) Ubicación superior (la sede de un servicio, el salón de una cama)
... characteristic 0..* CodeableConcept Collection of characteristics (attributes)
Vinculación: LocationCharacteristic (example): A custom attribute that could be provided at a service (e.g. Wheelchair accessibiliy).
... hoursOfOperation 0..* Availability What days/times during a week is this location usually open (including exceptions)
... virtualService 0..* VirtualServiceDetail Connection details of a virtual service (e.g. conference call)
... endpoint 0..* Reference(Endpoint) Technical endpoints providing access to services operated for the location

doco Documentación de este formato

Vinculaciones terminológicas

Ruta Estado Uso ValueSet Versión Fuente
Location.language Base required All Languages 📍5.0.0 Estándar FHIR
Location.identifier.​use Base required IdentifierUse 📍5.0.0 Estándar FHIR
Location.identifier.​type Base extensible Identifier Type Codes 📍5.0.0 Estándar FHIR
Location.status Base required Location Status 📍5.0.0 Estándar FHIR
Location.operationalStatus Base preferred hl7VS-bedStatus 📦3.0.0 THO v7.4
Location.mode Base required Location Mode 📍5.0.0 Estándar FHIR
Location.type Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:facility Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.type:servicio Base extensible ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
Location.contact.purpose Base preferred Contact entity type 📦2.0.0 THO v7.4
Location.contact.telecom.​system Base required ContactPointSystem 📍5.0.0 Estándar FHIR
Location.contact.telecom.​use Base required ContactPointUse 📍5.0.0 Estándar FHIR
Location.address.use Base required AddressUse 📍5.0.0 Estándar FHIR
Location.address.type Base required AddressType 📍5.0.0 Estándar FHIR
Location.address.city Base preferred Cantones de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.district Base preferred Distritos de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.state Base preferred Provincias de Costa Rica 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.address.country Base required Iso 3166 Part 1: 3 Letter Codes 📦5.0.0 Estándar FHIR
Location.form Base required Forma física de la ubicación 📦0.1.0 Guía de Implementación de Terminología de Costa Rica vnull
Location.characteristic Base example Location Characteristic 📍5.0.0 Estándar FHIR

Restricciones

Id Nivel Ruta(s) Descripción Expression
cr-codigo-interno-value error Location.identifier.value Un código interno tiene de 1 a 64 caracteres, sin espacios. matches('^\\S{1,64}$')
cr-identificador-unico error Location No hay dos identificadores con el mismo system y el mismo valor. identifier.select(system & '|' & value).isDistinct()
cr-telefono error Location.contact.telecom Un teléfono está en formato E.164 (+ y de 8 a 15 dígitos, sin espacios ni guiones), con una extensión interna opcional después de ;ext=. En Costa Rica (+506) tiene 8 dígitos que empiezan de 2 a 8, o es un número 800 o 900 de 10 dígitos. (system = 'phone' or system = 'fax' or system = 'sms') implies (value.matches('^\\+[1-9][0-9]{7,14}(;ext=[0-9]{1,6})?$') and (value.startsWith('+506') implies value.matches('^\\+506([2-8][0-9]{7}|[89]00[0-9]{7})(;ext=[0-9]{1,6})?$')))
cr-ubicacion-facility error Location Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() = type.coding.where(system = 'https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types' and code = 'facility').exists()
cr-ubicacion-sede-direccion error Location Una sede tiene dirección. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code = 'si').exists() implies address.exists()
cr-ubicacion-superior error Location Toda ubicación que no sea una sede ni una unidad móvil indica su ubicación superior. form.coding.where(system = 'http://terminology.hl7.org/CodeSystem/location-physical-type' and code in ('si' | 've')).empty() implies partOf.exists()
cr-ubicacion-system error Location.identifier El system del identificador es https://hl7.or.cr/fhir/sid/ubicacion/ seguido del código del establecimiento (cj-, cn- o dimex- y el identificador del titular). system.matches('^https://hl7\\.or\\.cr/fhir/sid/ubicacion/(cj-[1-9][0-9]{9}|cn-[1-9][0-9]{8}|dimex-[1-9][0-9]{10,11})$')
dom-2 error Location If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error Location 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 Location 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 Location If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice Location 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 Location .

Resumen

Obligatorios: 5 elementos(4 nested mandatory elementos)
Must-Support: 19 elementos

Estructuras

Esta estructura hace referencia a estas otras estructuras:

Slices

This structure defines the following Slices:

  • The element 1 is sliced based on the value of Location.type

 

Otras representaciones de perfil: CSV, Excel, Schematron

Notas:

Uso en el HIE

Registro de establecimientos. Ubicaciones: sedes, edificios, servicios, salas, camas y unidades móviles.

Ver también Servicios del HIE.

Consultas

Lo que el servidor debe responder para este perfil. En la forma, [base] es la URL base del servidor del servicio y lo que va entre llaves se reemplaza por un valor. Cada solicitud usa valores reales de los ejemplos de esta guía, y la respuesta trae los que coinciden; los cuerpos JSON se expanden al hacer clic. Todas las solicitudes llevan el token de acceso al HIE (Authorization: Bearer [token]). Las búsquedas de texto encuentran los valores que empiezan con el texto, sin distinguir mayúsculas ni tildes; las de fecha admiten los prefijos ge, gt, le y lt. En la URL los valores van codificados (| como %7C, + como %2B, un espacio como %20); aquí se muestran sin codificar para que se lean mejor.

Ir a: Leer · Buscar · Crear · Actualizar · Historial

Leer

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

Lee una ubicación del registro de establecimientos por su id, la parte final de su URL. Se usa para resolver una referencia que otro recurso hace a una ubicación. En el ejemplo se lee «Sede de un hospital privado»; la segunda respuesta es la de un id que no existe.

Solicitud

GET [base]/Location/ejemplo-ubicacion-sede HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta si el recurso existe

HTTP/1.1 200 OK
ETag: W/"1"
Last-Modified: 2026-10-01T10:00:00-06:00
Content-Type: application/fhir+json
{
  "resourceType": "Location",
  "id": "ejemplo-ubicacion-sede",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2026-10-01T10:00:00-06:00",
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
    ]
  },
  "identifier": [
    {
      "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
      "value": "SEDE-01"
    }
  ],
  "form": {
    "coding": [
      {
        "code": "si",
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "display": "Site"
      }
    ],
    "text": "Sede"
  },
  "type": [
    {
      "coding": [
        {
          "code": "facility",
          "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
          "display": "Facility"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "HOSP",
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "display": "Hospital"
        }
      ],
      "text": "Hospital"
    }
  ],
  "contact": [
    {
      "telecom": [
        {
          "system": "phone",
          "value": "+50622220000"
        }
      ]
    }
  ],
  "address": {
    "line": [
      "Avenida 2, entre calles 5 y 7"
    ],
    "country": "CRI",
    "state": "1",
    "city": "101",
    "district": "10101",
    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
  },
  "position": {
    "latitude": 9.9325,
    "longitude": -84.0795
  },
  "status": "active",
  "name": "Hospital Privado de Ejemplo, sede central",
  "managingOrganization": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

Respuesta si no existe

HTTP/1.1 404 Not Found
Content-Type: application/fhir+json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "not-found",
      "diagnostics": "No existe el recurso Location/no-existe."
    }
  ]
}
Buscar

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

Encuentra una ubicación por su código interno en la organización. En el ejemplo se usa el dato de «Sede de un hospital privado»: identifier=https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456|SEDE-01.

Solicitud

GET [base]/Location?identifier=https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456|SEDE-01 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Sede de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?identifier=https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456|SEDE-01"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por nombre
Forma: GET [base]/Location?name={texto}

Busca ubicaciones por su nombre, por ejemplo para elegir una sede o un salón. En el ejemplo se usa el dato de «Sede de un hospital privado»: name=Hospital Privado de Ejemplo, sede central.

Solicitud

GET [base]/Location?name=Hospital Privado de Ejemplo, sede central HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Sede de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?name=Hospital Privado de Ejemplo, sede central"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Busca ubicaciones por tipo. La marca facility de IHE mCSD distingue las sedes de los establecimientos de las ubicaciones internas, como un servicio o un salón. En el ejemplo se usa el dato de «Sede de un hospital privado»: type=https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types|facility.

Solicitud

GET [base]/Location?type=https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types|facility&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 6 resultados, de 2 en 2 con _count; la primera página trae Sede de un hospital privado; Sede de un área de salud de la CCSS

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 6,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?type=https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types|facility&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/Location?type=https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types|facility&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-area-salud",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-area-salud",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Frente a la plaza de deportes"
          ],
          "country": "CRI",
          "state": "4",
          "city": "402",
          "district": "40201",
          "text": "Frente a la plaza de deportes, Barva, Barva, Heredia"
        },
        "status": "active",
        "name": "Sede del Área de Salud de Ejemplo",
        "managingOrganization": {
          "reference": "Organization/ejemplo-organizacion-area-salud",
          "display": "Área de Salud de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por organización que la administra
Forma: GET [base]/Location?organization=Organization/{id}

Trae las ubicaciones que administra una organización: sus sedes, servicios y salones. En el ejemplo se usa el dato de «Sede de un hospital privado»: organization=Organization/ejemplo-establecimiento.

Solicitud

GET [base]/Location?organization=Organization/ejemplo-establecimiento&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 4 resultados, de 2 en 2 con _count; la primera página trae Sede de un hospital privado; Servicio de radiología de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 4,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?organization=Organization/ejemplo-establecimiento&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/Location?organization=Organization/ejemplo-establecimiento&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-radiologia",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-radiologia",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "RAD-01"
          }
        ],
        "alias": [
          "Rayos X"
        ],
        "form": {
          "coding": [
            {
              "code": "area",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Area"
            }
          ],
          "text": "Área"
        },
        "type": [
          {
            "coding": [
              {
                "code": "RADDX",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Radiology diagnostics or therapeutics unit"
              }
            ],
            "text": "Radiología"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000;ext=2105"
              }
            ]
          }
        ],
        "status": "active",
        "name": "Servicio de Radiología",
        "description": "Segundo piso, al fondo del pasillo de consulta externa.",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        },
        "partOf": {
          "reference": "Location/ejemplo-ubicacion-sede",
          "display": "Hospital Privado de Ejemplo, sede central"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por ubicación superior
Forma: GET [base]/Location?partof=Location/{id}

Trae las ubicaciones que están dentro de otra; por ejemplo, los servicios y salones de una sede. En el ejemplo se usa el dato de «Servicio de radiología de un hospital privado»: partof=Location/ejemplo-ubicacion-sede.

Solicitud

GET [base]/Location?partof=Location/ejemplo-ubicacion-sede&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 3 resultados, de 2 en 2 con _count; la primera página trae Servicio de radiología de un hospital privado; Salón de cuidados intensivos de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 3,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?partof=Location/ejemplo-ubicacion-sede&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/Location?partof=Location/ejemplo-ubicacion-sede&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-radiologia",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-radiologia",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "RAD-01"
          }
        ],
        "alias": [
          "Rayos X"
        ],
        "form": {
          "coding": [
            {
              "code": "area",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Area"
            }
          ],
          "text": "Área"
        },
        "type": [
          {
            "coding": [
              {
                "code": "RADDX",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Radiology diagnostics or therapeutics unit"
              }
            ],
            "text": "Radiología"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000;ext=2105"
              }
            ]
          }
        ],
        "status": "active",
        "name": "Servicio de Radiología",
        "description": "Segundo piso, al fondo del pasillo de consulta externa.",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        },
        "partOf": {
          "reference": "Location/ejemplo-ubicacion-sede",
          "display": "Hospital Privado de Ejemplo, sede central"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-salon-cuidados-intensivos",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-salon-cuidados-intensivos",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "wa",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Ward"
            }
          ],
          "text": "Salón"
        },
        "type": [
          {
            "coding": [
              {
                "code": "ICU",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Intensive care unit"
              }
            ],
            "text": "Cuidados intensivos"
          }
        ],
        "status": "active",
        "name": "Unidad de Cuidados Intensivos",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        },
        "partOf": {
          "reference": "Location/ejemplo-ubicacion-sede",
          "display": "Hospital Privado de Ejemplo, sede central"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

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

Filtra por estado: una ubicación cerrada temporalmente o inactiva no se ofrece para atender. En el ejemplo se usa el dato de «Sede de un hospital privado»: status=active.

Solicitud

GET [base]/Location?status=active&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 10 resultados, de 2 en 2 con _count; la primera página trae Sede de un hospital privado; Sede de un área de salud de la CCSS

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 10,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?status=active&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/Location?status=active&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-area-salud",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-area-salud",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Frente a la plaza de deportes"
          ],
          "country": "CRI",
          "state": "4",
          "city": "402",
          "district": "40201",
          "text": "Frente a la plaza de deportes, Barva, Barva, Heredia"
        },
        "status": "active",
        "name": "Sede del Área de Salud de Ejemplo",
        "managingOrganization": {
          "reference": "Organization/ejemplo-organizacion-area-salud",
          "display": "Área de Salud de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por cercanía a un punto
Forma: GET [base]/Location?near={latitud}|{longitud}|{distancia}|km

Busca las ubicaciones cercanas a un punto, dentro de una distancia. Sirve para encontrar el establecimiento más cercano a un paciente (IHE mCSD). En el ejemplo se usa el dato de «Sede de un hospital privado»: near=9.9325|-84.0795|5|km.

Solicitud

GET [base]/Location?near=9.9325|-84.0795|5|km HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Sede de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?near=9.9325|-84.0795|5|km"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por provincia
Forma: GET [base]/Location?address-state={texto}

Trae las ubicaciones de una provincia, por su código de la División Territorial Administrativa (DTA). Sirve para reportes y para acotar una búsqueda. En el ejemplo se usa el dato de «Sede de un hospital privado»: address-state=1.

Solicitud

GET [base]/Location?address-state=1 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 2 resultados: Sede de un hospital privado; Sede de un laboratorio clínico

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 2,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?address-state=1"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-laboratorio",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-laboratorio",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "OUTLAB",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "outpatient laboratory"
              }
            ],
            "text": "Laboratorio clínico"
          }
        ],
        "address": {
          "line": [
            "Calle 3, 50 metros al norte de la rotonda"
          ],
          "country": "CRI",
          "state": "1",
          "city": "115",
          "district": "11501",
          "text": "Calle 3, 50 metros al norte de la rotonda, San Pedro, Montes de Oca, San José"
        },
        "status": "active",
        "name": "Laboratorio Clínico de Ejemplo, San Pedro",
        "managingOrganization": {
          "reference": "Organization/ejemplo-organizacion-laboratorio",
          "display": "Laboratorio Clínico de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por cantón
Forma: GET [base]/Location?address-city={texto}

Trae las ubicaciones de un cantón, por su código de la DTA. En el ejemplo se usa el dato de «Sede de un hospital privado»: address-city=101.

Solicitud

GET [base]/Location?address-city=101 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Sede de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?address-city=101"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por distrito
Forma: GET [base]/Location?address-district={texto}

Trae las ubicaciones de un distrito, por su código de la DTA. R5 no trae este parámetro: lo define esta guía. En el ejemplo se usa el dato de «Sede de un hospital privado»: address-district=10101.

Solicitud

GET [base]/Location?address-district=10101 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 1 resultado: Sede de un hospital privado

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?address-district=10101"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por fecha de actualización
Forma: GET [base]/Location?_lastUpdated={prefijo}{fecha}

Trae las ubicaciones que cambiaron desde una fecha. La usa un sistema que guarda una copia del registro para traer solo lo nuevo, en lugar de descargarlo todo. En el ejemplo se piden los cambios desde el 2026-10-01 (prefijo ge: en esa fecha o después).

Solicitud

GET [base]/Location?_lastUpdated=ge2026-10-01&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 10 resultados, de 2 en 2 con _count; la primera página trae Sede de un hospital privado; Sede de un área de salud de la CCSS

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 10,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?_lastUpdated=ge2026-10-01&_count=2"
    },
    {
      "relation": "next",
      "url": "[base]/Location?_lastUpdated=ge2026-10-01&_count=2&_offset=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-area-salud",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-area-salud",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Frente a la plaza de deportes"
          ],
          "country": "CRI",
          "state": "4",
          "city": "402",
          "district": "40201",
          "text": "Frente a la plaza de deportes, Barva, Barva, Heredia"
        },
        "status": "active",
        "name": "Sede del Área de Salud de Ejemplo",
        "managingOrganization": {
          "reference": "Organization/ejemplo-organizacion-area-salud",
          "display": "Área de Salud de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}

Buscar por identificador, con POST
Forma: POST [base]/Location/_search
cuerpo: identifier={sistema}|{valor}

Hace cualquier búsqueda con POST: los parámetros van en el cuerpo, como un formulario, en lugar de la URL. Se usa cuando los valores son datos personales, como una cédula, para que no queden en los registros de los servidores ni en el historial; la respuesta es la misma que con GET. En el ejemplo se repite la búsqueda por identificador.

Solicitud

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

identifier=https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456|SEDE-01

Respuesta: 1 resultado: Sede de un hospital privado, igual que con GET

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "searchset",
  "total": 1,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location?identifier=https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456|SEDE-01"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "search": {
        "mode": "match"
      }
    }
  ]
}
Crear

Crear
Forma: POST [base]/Location

Registra una ubicación en el registro de establecimientos. El servidor valida el recurso contra el perfil, le asigna su id y devuelve su dirección. Es la alimentación del registro de establecimientos (IHE mCSD ITI-130). En el ejemplo se registra «Sede de un hospital privado»; la segunda respuesta es el rechazo de un recurso que no cumple la invariante cr-ubicacion-facility (Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas).

Solicitud

POST [base]/Location HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
Content-Type: application/fhir+json
{
  "resourceType": "Location",
  "meta": {
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
    ]
  },
  "identifier": [
    {
      "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
      "value": "SEDE-01"
    }
  ],
  "form": {
    "coding": [
      {
        "code": "si",
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "display": "Site"
      }
    ],
    "text": "Sede"
  },
  "type": [
    {
      "coding": [
        {
          "code": "facility",
          "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
          "display": "Facility"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "HOSP",
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "display": "Hospital"
        }
      ],
      "text": "Hospital"
    }
  ],
  "contact": [
    {
      "telecom": [
        {
          "system": "phone",
          "value": "+50622220000"
        }
      ]
    }
  ],
  "address": {
    "line": [
      "Avenida 2, entre calles 5 y 7"
    ],
    "country": "CRI",
    "state": "1",
    "city": "101",
    "district": "10101",
    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
  },
  "position": {
    "latitude": 9.9325,
    "longitude": -84.0795
  },
  "status": "active",
  "name": "Hospital Privado de Ejemplo, sede central",
  "managingOrganization": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

Respuesta si se crea

HTTP/1.1 201 Created
Location: [base]/Location/ejemplo-ubicacion-sede/_history/1
ETag: W/"1"
Last-Modified: 2026-10-01T10:00:00-06:00
Content-Type: application/fhir+json
{
  "resourceType": "Location",
  "id": "ejemplo-ubicacion-sede",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2026-10-01T10:00:00-06:00",
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
    ]
  },
  "identifier": [
    {
      "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
      "value": "SEDE-01"
    }
  ],
  "form": {
    "coding": [
      {
        "code": "si",
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "display": "Site"
      }
    ],
    "text": "Sede"
  },
  "type": [
    {
      "coding": [
        {
          "code": "facility",
          "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
          "display": "Facility"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "HOSP",
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "display": "Hospital"
        }
      ],
      "text": "Hospital"
    }
  ],
  "contact": [
    {
      "telecom": [
        {
          "system": "phone",
          "value": "+50622220000"
        }
      ]
    }
  ],
  "address": {
    "line": [
      "Avenida 2, entre calles 5 y 7"
    ],
    "country": "CRI",
    "state": "1",
    "city": "101",
    "district": "10101",
    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
  },
  "position": {
    "latitude": 9.9325,
    "longitude": -84.0795
  },
  "status": "active",
  "name": "Hospital Privado de Ejemplo, sede central",
  "managingOrganization": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

Respuesta si no cumple el perfil (invariante cr-ubicacion-facility)

HTTP/1.1 422 Unprocessable Entity
Content-Type: application/fhir+json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "invariant",
      "diagnostics": "cr-ubicacion-facility: Lleva la marca de establecimiento de IHE mCSD (facility) toda sede (forma física si), y solo ellas.",
      "expression": [
        "Location"
      ]
    }
  ]
}
Actualizar

Actualizar
Forma: PUT [base]/Location/{id}
If-Match: W/"{versión}"

Reemplaza una ubicación con una versión nueva completa, por ejemplo para corregir un dato. If-Match lleva la versión que se leyó: si otro sistema hizo un cambio mientras tanto, el servidor rechaza este, y así nadie pisa el trabajo de otro sin darse cuenta. En el ejemplo se actualiza «Sede de un hospital privado» sobre su versión 1; la segunda respuesta es el rechazo cuando otra persona ya la había cambiado.

Solicitud

PUT [base]/Location/ejemplo-ubicacion-sede HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]
If-Match: W/"1"
Content-Type: application/fhir+json
{
  "resourceType": "Location",
  "id": "ejemplo-ubicacion-sede",
  "meta": {
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
    ]
  },
  "identifier": [
    {
      "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
      "value": "SEDE-01"
    }
  ],
  "form": {
    "coding": [
      {
        "code": "si",
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "display": "Site"
      }
    ],
    "text": "Sede"
  },
  "type": [
    {
      "coding": [
        {
          "code": "facility",
          "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
          "display": "Facility"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "HOSP",
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "display": "Hospital"
        }
      ],
      "text": "Hospital"
    }
  ],
  "contact": [
    {
      "telecom": [
        {
          "system": "phone",
          "value": "+50622220000"
        }
      ]
    }
  ],
  "address": {
    "line": [
      "Avenida 2, entre calles 5 y 7"
    ],
    "country": "CRI",
    "state": "1",
    "city": "101",
    "district": "10101",
    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
  },
  "position": {
    "latitude": 9.9325,
    "longitude": -84.0795
  },
  "status": "active",
  "name": "Hospital Privado de Ejemplo, sede central",
  "managingOrganization": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

Respuesta si se actualiza

HTTP/1.1 200 OK
ETag: W/"2"
Last-Modified: 2026-10-02T08:15:00-06:00
Content-Type: application/fhir+json
{
  "resourceType": "Location",
  "id": "ejemplo-ubicacion-sede",
  "meta": {
    "versionId": "2",
    "lastUpdated": "2026-10-02T08:15:00-06:00",
    "profile": [
      "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
    ]
  },
  "identifier": [
    {
      "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
      "value": "SEDE-01"
    }
  ],
  "form": {
    "coding": [
      {
        "code": "si",
        "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
        "display": "Site"
      }
    ],
    "text": "Sede"
  },
  "type": [
    {
      "coding": [
        {
          "code": "facility",
          "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
          "display": "Facility"
        }
      ]
    },
    {
      "coding": [
        {
          "code": "HOSP",
          "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
          "display": "Hospital"
        }
      ],
      "text": "Hospital"
    }
  ],
  "contact": [
    {
      "telecom": [
        {
          "system": "phone",
          "value": "+50622220000"
        }
      ]
    }
  ],
  "address": {
    "line": [
      "Avenida 2, entre calles 5 y 7"
    ],
    "country": "CRI",
    "state": "1",
    "city": "101",
    "district": "10101",
    "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
  },
  "position": {
    "latitude": 9.9325,
    "longitude": -84.0795
  },
  "status": "active",
  "name": "Hospital Privado de Ejemplo, sede central",
  "managingOrganization": {
    "reference": "Organization/ejemplo-establecimiento",
    "display": "Hospital Privado de Ejemplo"
  }
}

Respuesta si otra persona lo modificó antes (la versión ya no es la 1)

HTTP/1.1 412 Precondition Failed
Content-Type: application/fhir+json
{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "conflict",
      "diagnostics": "La versión actual de Location/ejemplo-ubicacion-sede no es la 1: léalo de nuevo y repita el cambio."
    }
  ]
}
Historial

Cambios desde una fecha (IHE mCSD ITI-91)
Forma: GET [base]/Location/_history?_since={fecha y hora}

Trae las ubicaciones que se crearon o cambiaron en el registro de establecimientos desde una fecha y hora. La usa un sistema que guarda una copia del registro para mantenerla al día (IHE mCSD ITI-91). En el ejemplo se piden los cambios desde el 2026-10-01, de 2 en 2.

Solicitud

GET [base]/Location/_history?_since=2026-10-01T00:00:00-06:00&_count=2 HTTP/1.1
Accept: application/fhir+json
Authorization: Bearer [token]

Respuesta: 10 cambios, de 2 en 2 con _count

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Bundle",
  "type": "history",
  "total": 10,
  "link": [
    {
      "relation": "self",
      "url": "[base]/Location/_history?_since=2026-10-01T00:00:00-06:00&_count=2"
    }
  ],
  "entry": [
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-sede",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-sede",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "identifier": [
          {
            "system": "https://hl7.or.cr/fhir/sid/ubicacion/cj-3101123456",
            "value": "SEDE-01"
          }
        ],
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          },
          {
            "coding": [
              {
                "code": "HOSP",
                "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode",
                "display": "Hospital"
              }
            ],
            "text": "Hospital"
          }
        ],
        "contact": [
          {
            "telecom": [
              {
                "system": "phone",
                "value": "+50622220000"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Avenida 2, entre calles 5 y 7"
          ],
          "country": "CRI",
          "state": "1",
          "city": "101",
          "district": "10101",
          "text": "Avenida 2, entre calles 5 y 7, Carmen, San José, San José"
        },
        "position": {
          "latitude": 9.9325,
          "longitude": -84.0795
        },
        "status": "active",
        "name": "Hospital Privado de Ejemplo, sede central",
        "managingOrganization": {
          "reference": "Organization/ejemplo-establecimiento",
          "display": "Hospital Privado de Ejemplo"
        }
      },
      "request": {
        "method": "POST",
        "url": "Location"
      },
      "response": {
        "status": "201 Created",
        "etag": "W/\"1\""
      }
    },
    {
      "fullUrl": "[base]/Location/ejemplo-ubicacion-area-salud",
      "resource": {
        "resourceType": "Location",
        "id": "ejemplo-ubicacion-area-salud",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2026-10-01T10:00:00-06:00",
          "profile": [
            "https://hl7.or.cr/fhir/core/StructureDefinition/cr-location"
          ]
        },
        "form": {
          "coding": [
            {
              "code": "si",
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "display": "Site"
            }
          ],
          "text": "Sede"
        },
        "type": [
          {
            "coding": [
              {
                "code": "facility",
                "system": "https://profiles.ihe.net/ITI/mCSD/CodeSystem/IHE.mCSD.Organization.Location.Types",
                "display": "Facility"
              }
            ]
          }
        ],
        "address": {
          "line": [
            "Frente a la plaza de deportes"
          ],
          "country": "CRI",
          "state": "4",
          "city": "402",
          "district": "40201",
          "text": "Frente a la plaza de deportes, Barva, Barva, Heredia"
        },
        "status": "active",
        "name": "Sede del Área de Salud de Ejemplo",
        "managingOrganization": {
          "reference": "Organization/ejemplo-organizacion-area-salud",
          "display": "Área de Salud de Ejemplo"
        }
      },
      "request": {
        "method": "POST",
        "url": "Location"
      },
      "response": {
        "status": "201 Created",
        "etag": "W/\"1\""
      }
    }
  ]
}