Skip to content

LOCATION_HISTORY

Robert Miller edited this page Mar 26, 2019 · 1 revision

The LOCATION HISTORY table stores relationships between Persons or Care Sites and geographic locations over time.

Field Required Type Description
location_id Yes integer A foreign key to the location table.
relationship_type No varchar(50) The type of relationship between location and entity.
domain_id Yes varchar(50) The domain of the entity that is related to the location. Either PERSON or CARE_SITE.
entity_id Yes integer The unique identifier for the entity. References either person_id or care_site_id, depending on domain_id.
start_date Yes date The date the relationship started.
end_date No date The date the relationship ended.

Conventions

  • The entities (and permissible domains) with related locations are: Persons (PERSON) and Care Sites (CARE_SITE)
  • domain_id specifies which table the entity_id refers to
  • Locations and entities are static. Relationships between locations and entities are dynamic.
  • When the domain is PERSON, the permissible values of relationship_type are: ‘residence’, ’work site’, ’school’
  • When the domain is CARE_SITE, the value of relationship_type is NULL
Clone this wiki locally