Skip to content
Partner Developer Portal

Schema

The core schema represents the Location schema derived from the EMIS source system.

Column NameData TypeDescriptionExample
location_idbigintThe unique internal identifier for the location record within an organisation.123456
organisationvarcharAn identifier for the source of data (an organisation) relating to a given GP practice‘CDB-12345’
load_datetimetimestamp(6) with time zoneThe datetime that the record was last upserted into the EXA data lake from EMIS source system with a relevant change from source system.‘2023-09-01 09:00:00.000000 UTC’
_ingest_timevarcharThe load_datetime formatted as yyyyMMddHHmmss. This column is provided only for backward compatibility.‘20230512143015’
is_deletedbooleanIndicates if this record should be considered soft deleted.TRUE
location_guidvarcharThe GUID for the location record within an organisation.‘12a3b456-7c89-0d1e-234f-5gh6i789jk01’
location_uuidvarcharThe UUID derived from location_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
location_namevarcharThe name of the location.‘Main Surgery’
parent_location_idbigintThe unique internal identifier for the parent location.123455
email_addressvarcharThe email address of the location.‘info@surgeryname.nhs.uk’
phone_numbervarcharThe phone number of the location.‘01234 567890’
fax_numbervarcharThe fax number of the location.‘01234 567891’
main_contact_namevarcharThe name of the main contact associated with the location.‘Dr. Jane Smith’
open_datedateThe date the location was opened.‘2010-03-15’
close_datedateThe date the location was closed.‘2022-12-31’
location_type_idbigintThe unique internal identifier for the location type.12
location_type_descriptionvarcharThe EMIS description of the location type.‘GP Practice’
code_idbigintThe EMIS code identifier for the location type associated with the location1572871000006117
address_idbigintThe unique internal identifier for the address.12345
address_uuidvarcharThe UUID derived from address_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
house_name_flat_numbervarcharThe house name or flat number from the address.‘House’
number_and_streetvarcharThe number and street from the address.‘45 Example Street’
villagevarcharThe village or borough from the address.‘Exampleford’
townvarcharThe town or city from the address.‘Exampleford’
countyvarcharThe county from the address.‘West Exampleshire’
postcodevarcharThe postcode for the location.‘AB11 1CD’
transform_datetimetimestamp(6) with time zoneThe timestamp indicating when the record was last processed and updated in the data model.‘2023-09-01 09:00:00.000000 UTC’
_execution_datevarcharThe transform_datetime formatted as yyyyMMddHHmmss. This column is provided only for backward compatibility.‘20230512143015’

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓Renamed from _base_ingest_time in V1
is_deletedboolean✗✓
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
location_namevarchar✓✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
code_idbigint✗✓
open_datedate✓✓
close_datedate✓✓
main_contact_namevarchar✓✓
email_addressvarchar✓✓
phone_numbervarchar✓✓
fax_numbervarchar✓✓
address_idbigint✗✓
address_uuidvarchar✗✓
house_name_flat_numbervarchar✓✓
number_and_streetvarchar✓✓
villagevarchar✓✓
townvarchar✓✓
countyvarchar✓✓
postcodevarchar✓✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

Not used in this schema

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓Renamed from _base_ingest_time in V1
is_deletedboolean✗✓
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
location_namevarchar✓✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
email_addressvarchar✓✓
phone_numbervarchar✓✓
fax_numbervarchar✓✓
main_contact_namevarchar✓✓
open_datedate✓✓
close_datedate✓✓
address_idbigint✗✓
address_uuidvarchar✗✓
house_name_flat_numbervarchar✓✓
number_and_streetvarchar✓✓
villagevarchar✓✓
townvarchar✓✓
countyvarchar✓✓
postcodevarchar✓✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

The table below presents the flavour specific schema.

Column NameData TypeCore MappingComments
is_deletedboolean
pseudo_location_uuidvarcharlocation_uuidHashed
location_type_idbigint
location_type_descriptionvarchar
code_idbigint
open_datedate
close_datedate
postcodevarchar
organisationvarchar
transform_datetimetimestamp(6) with time zone

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓
is_deletedboolean✗✓
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
location_namevarchar✓✓
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
email_addressvarchar✓✓
phone_numbervarchar✓✓
fax_numbervarchar✓✓
main_contact_namevarchar✓✓
open_datedate✓✓
close_datedate✓✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
address_idbigint✗✓
address_uuidvarchar✗✓
house_name_flat_numbervarchar✓✓
number_and_streetvarchar✓✓
villagevarchar✓✓
townvarchar✓✓
countyvarchar✓✓
postcodevarchar✓✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓
is_deletedboolean✓✓Renamed from deleted in V1
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
open_datedate✓✓
close_datedate✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓
is_deletedboolean✓✓Renamed from deleted in V1
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
open_datedate✓✓
close_datedate✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓Renamed from execution_date in V1

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓
is_deletedboolean✓✓Renamed from deleted in V1
load_datetimetimestamp(6) with time zone✗✓
location_idbigint✓✓
location_guidvarchar✓✓
location_uuidvarchar✗✓
parent_location_idbigint✗✓
parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
open_datedate✓✓
close_datedate✓✓
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓Renamed from execution_date in V1

The table below presents the flavour specific schema and maps columns between core, V1, and V2. Refer to Changes in iPCV V2 for more information.

Column NameData TypeData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✓Renamed from _base_ingest_time in V1
is_deletedboolean✗✓
load_datetimetimestamp(6) with time zone✗✓
emis_location_idbigint✓✓location_id
location_uuidvarchar✗✓
emis_location_guidvarchar✓✓location_guid
parent_location_idbigint✗✓
emis_parent_location_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
location_type_idbigint✗✓
location_type_descriptionvarchar✓✓
code_idbigint✗✓location_id
location_namevarchar✓✓
main_contact_namevarchar✓✓
open_datedate✓✓
close_datedate✓✓
email_addressvarchar✓✓
phone_numbervarchar✓✓
fax_numbervarchar✓✓
address_idbigint✗✓
address_uuidvarchar✗✓
house_name_flat_numbervarchar✓✓
number_and_streetvarchar✓✓
villagevarchar✓✓
townvarchar✓✓
countyvarchar✓✓
postcodevarchar✓✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

Not used in this schema