location
The US Core Location Profile inherits from the FHIR [Location](https://hl7.org/fhir/R4/location.html) resource; refer to it for scope and usage definitions.
The US Core Location Profile inherits from the FHIR Location resource; refer to it for scope and usage definitions. This profile sets minimum expectations for the Location resource for recording, searching, and fetching a "physical place of available services or resources." It specifies which core elements, extensions, vocabularies, and value sets SHALL be present and constrains how the elements are used. Providing the floor for standards development for specific use cases promotes interoperability and adoption.
Source
| Model | Leg | Role |
|---|---|---|
us-core-location | FHIR | defines this table |
openEHR-EHR-CLUSTER.address.v1 | openEHR | merged in — Address |
openEHR-EHR-CLUSTER.electronic_communication.v1 | openEHR | merged in — Electronic communication |
This table is the union of 3 source models. Columns carrying a From value came from a model that merged into it, so the same row satisfies both specifications.
Columns
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Location.id | — | — |
created_at | timestamptz | no | Row creation timestamp. | — | — |
updated_at | timestamptz | no | Row update timestamp; maintained by the application. | — | — |
created_by | text | no | Actor who created the row. | — | — |
updated_by | text | no | Actor who last updated the row. | — | — |
identifier_valueidentifier_system | text, texttext, text | yes | Unique business identifier for facility or location. | — | Location.identifier |
status | text | yes | active | suspended | inactive | — | Location.status |
name | text | yes | Name by which a facility or location is known. | — | Location.name |
phone_numberphone_use_codeemailemail_use_code | text, text, text, texttext, text, text, text | yes | Contact details of the location | — | Location.telecom |
address_lineaddress_cityaddress_districtaddress_stateaddress_postal_codeaddress_countryaddress_use_codeaddress_type_code | text, text, text, text, text, text, text, texttext, text, text, text, text, text, text, text | yes | Physical location | — | Location.address |
managing_organization_id | uuid | yes | Organization responsible for provisioning and upkeep | — | Location.managingOrganization |
address_latitude_magnitudeaddress_latitude_units | quantitynumeric, text | yes | Latitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0007] |
address_longitude_magnitudeaddress_longitude_units | quantitynumeric, text | yes | Longitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0008] |
address_altitude_magnitudeaddress_altitude_units | quantitynumeric, text | yes | Altitude | openEHR-EHR-CLUSTER.address.v1 | /items[at0009] |
address_comment | text | yes | Comment | openEHR-EHR-CLUSTER.address.v1 | /items[at0018] |
address_map_url | text | yes | Map URL | openEHR-EHR-CLUSTER.address.v1 | /items[at0019] |
address_geolocation_code | text | yes | Geolocation code | openEHR-EHR-CLUSTER.address.v1 | /items[at0021] |
phone_commentemail_comment | text, texttext, text | yes | Comment | openEHR-EHR-CLUSTER.electronic_communication.v1 | /items[at0004] |
Constraints
check (identifier_system is null or identifier_value is not null)
check ((address_latitude_magnitude is null and address_latitude_units is null) or (address_latitude_magnitude is not null and address_latitude_units is not null))
check (address_latitude_magnitude is null or (address_latitude_units = 'deg' and address_latitude_magnitude between -90 and 90))
check ((address_longitude_magnitude is null and address_longitude_units is null) or (address_longitude_magnitude is not null and address_longitude_units is not null))
check (address_longitude_magnitude is null or (address_longitude_units = 'deg' and address_longitude_magnitude between -180 and 180))
check ((address_altitude_magnitude is null and address_altitude_units is null) or (address_altitude_magnitude is not null and address_altitude_units is not null))References
| Columns | Target | On delete |
|---|---|---|
managing_organization_id | organization | no action |
Referenced by
encounter_locationvialocation_idlocation_other_identifiervialocation_idlocation_typevialocation_idlocation_other_telecomvialocation_idpractitioner_role_locationvialocation_id
Indexes
location_managing_organization_id_idxonmanaging_organization_id
Child tables
3 tables hang off location, one row per repetition.
location_other_identifier
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
location_id | uuid → location | no | — | — | — |
identifier_value | text | no | — | — | — |
identifier_system | text | yes | — | — | — |
identifier_use | text | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
Unique
location_id, identifier_system, identifier_value
References
| Columns | Target | On delete |
|---|---|---|
location_id | location | cascade |
location_type
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
location_id | uuid → location | no | — | — | — |
typetype_codetype_system | text, text, texttext, text, text | yes | Category of service or resource available in a location. | — | Location.type |
Constraints
check ((type_code is null and type_system is null) or (type_code is not null and type_system is not null))References
| Columns | Target | On delete |
|---|---|---|
location_id | location | cascade |
Indexes
location_type_location_id_idxonlocation_id
location_other_telecom
Child table — one row per repetition, deleted with its parent.
| Column | Type | Null | Description | From | Source |
|---|---|---|---|---|---|
id | uuid primary key | no | Primary key. | — | — |
location_id | uuid → location | no | — | — | — |
system | text | no | — | — | — |
value | text | no | — | — | — |
use_code | text | yes | — | — | — |
rank | integer | yes | — | — | — |
valid_from | timestamptz | yes | — | — | — |
valid_until | timestamptz | yes | — | — | — |
comment | text | yes | Comment | openEHR-EHR-CLUSTER.electronic_communication.v1 | /items[at0004] |
References
| Columns | Target | On delete |
|---|---|---|
location_id | location | cascade |
Indexes
location_other_telecom_location_id_idxonlocation_id