Skip to content
Partner Developer Portal

Schema

The core schema represents the Appointment Session schema derived from EMIS source system.

Column NameData TypeDescriptionExample
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-05-12 14:30:15.000000 UTC’
_ingest_timevarcharThe load_datetime formatted as yyyyMMddHHmmss. This column is provided only for backward compatibility.‘20230512143015’
is_deletedbooleanIndicates whether the appointment session record has been soft deleted.FALSE
organisation_idbigintThe unique internal identifier for the organisation where the session is recorded.12345
organisation_guidvarcharThe GUID for the organisation where the session is recorded.‘550e8400-e29b-41d4-a716-446655440000’
organisation_uuidvarcharThe UUID derived from organisation_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
session_idbigintThe unique internal identifier for the appointment session within an organisation.67890
session_guidvarcharThe GUID for the appointment session within an organisation.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
session_uuidvarcharThe UUID derived from session_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
session_descriptionvarcharThe display description used to summarise the purpose of the session.‘Home Visits’
session_start_datedateThe date on which the appointment session starts.‘2023-05-15’
session_start_timevarcharThe time at which the appointment session starts.‘09:00:00’
session_end_datedateThe date on which the appointment session ends.‘2023-05-15’
session_end_timevarcharThe time at which the appointment session ends.‘12:30:00’
session_last_updated_datetimetimestamp(6) with time zoneThe datetime when the session was last updated in the source system.‘2023-05-10 14:25:36.000000 UTC’
is_privatebooleanIndicates whether the session is marked as private.FALSE
session_type_idbigintThe internal identifier for the session type.1
session_type_descriptionvarcharThe description of the session type which sets a high level default type for the slots it contains like 1 - Timed Appointments, 2 - Untimed Appointments and 3 - Non-Clinical Session.‘Timed Appointments’
session_category_idbigintThe internal identifier for the session category.4
session_category_display_namevarcharThe display name for the session category.‘Default Non-List Category’
location_idbigintThe internal identifier for the location where the session takes place.12345
location_guidvarcharThe GUID for the location where the session takes place.‘33eea400-f12c-41d4-b146-446255223344’
location_uuidvarcharThe UUID derived from location_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
total_slotsbigintThe total number of slots configured for the session.20
bookable_slotsbigintThe number of slots in the session that are available for booking.18
booked_slotsbigintThe number of slots in the session that have been booked.15
unfilled_slotsbigintThe number of bookable slots in the session that remain unfilled.3
deleted_slotsbigintThe number of slots in the session that have been marked as deleted.1
embargoed_slotsbigintThe number of slots in the session that are embargoed and not yet available for booking.2
dna_appointmentsbigintThe number of appointments in the session recorded as not attended.1
cancelled_and_rebooked_appointmentsbigintThe number of appointments in the session that were cancelled and later rebooked.2
cancelled_and_not_rebooked_appointmentsbigintThe number of appointments in the session that were cancelled and not rebooked.1
same_day_appointmentsbigintThe number of appointments in the session booked on the same day they were due to occur.4
in_person_appointmentsbigintThe number of appointments in the session delivered in person.12
virtual_appointmentsbigintThe number of appointments in the session delivered virtually.3
patient_age_at_appointmentintegerThe patient age recorded for the appointment activity.45
registered_patient_countbigintThe number of session appointments linked to patients registered at the organisation.14
unregistered_patient_countbigintThe number of session appointments linked to patients not registered at the organisation.1
organisationvarcharAn identifier for the source organisation (GP practice) associated with the session record.‘CDB-12345’
transform_datetimetimestamp(6) with time zoneThe datetime when the record was last processed and updated in the data model.‘2023-05-12 14:30:15.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✓✓
is_deletedboolean✓✓Renamed from session_deleted_flag in V1
load_datetimetimestamp(6) with time zone✗✓
emis_session_idbigint✓✓session_id
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
session_emis_organisation_idbigint✓✓organisation_id
session_emis_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
session_descriptionvarchar✓✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
last_updatedtimestamp(6) with time zone✓✓session_last_updated_datetime
private_flagboolean✓✓is_private
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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✗✓
load_datetimetimestamp(6) with time zone✗✓
session_idbigint✗✓
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
session_descriptionvarchar✓✓
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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 session_deleted_flag in V1
load_datetimetimestamp(6) with time zone✗✓
emis_session_idbigint✓✓session_id
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
session_emis_organisation_idbigint✓✓organisation_id
session_emis_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
session_descriptionvarchar✓✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
last_updatedtimestamp(6) with time zone✓✓session_last_updated_datetime
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
private_flagboolean✓✓is_private
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

The table below presents the flavour specific schema and maps columns between core and the flavour.

Column NameData TypeCore MappingComments
is_deletedboolean
pseudo_session_uuidvarcharsession_uuidhashed
pseudo_organisation_uuidvarcharorganisation_uuidhashed
session_descriptionvarchar
session_start_datedate
session_start_timevarchar
session_end_datedate
session_end_timevarchar
session_last_updated_datetimetimestamp(6) with time zone
session_type_idbigint
session_type_descriptionvarchar
session_category_idbigint
session_category_display_namevarchar
pseudo_location_uuidvarcharlocation_uuidhashed
is_privateboolean
total_slotsbigint
bookable_slotsbigint
booked_slotsbigint
unfilled_slotsbigint
deleted_slotsbigint
embargoed_slotsbigint
dna_appointmentsbigint
cancelled_and_rebooked_appointmentsbigint
cancelled_and_not_rebooked_appointmentsbigint
same_day_appointmentsbigint
in_person_appointmentsbigint
virtual_appointmentsbigint
patient_age_at_appointmentinteger
registered_patient_countbigint
unregistered_patient_countbigint
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✓✓Renamed from session_deleted_flag in V1
load_datetimetimestamp(6) with time zone✗✓
emis_session_idbigint✓✓session_id
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
session_emis_organisation_idbigint✓✓organisation_id
session_emis_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
session_descriptionvarchar✓✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
last_updatedtimestamp(6) with time zone✓✓session_last_updated_datetime
private_flagboolean✓✓is_private
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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✗✓
session_idbigint✓✓
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
organisation_idbigint✗✓
emis_session_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
private_flagboolean✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in V2 for more details.
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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✗✓
session_idbigint✓✓
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
organisation_idbigint✗✓
emis_session_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
private_flagboolean✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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✗✓
session_idbigint✓✓
appointment_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
organisation_idbigint✗✓
organisation_guidvarchar✓✓
organisation_uuidvarchar✗✓
location_idbigint✗✓
location_guidvarchar✓✓
location_uuidvarchar✗✓
start_datedate✓✓session_start_date
start_timevarchar✓✓session_start_time
end_datedate✓✓session_end_date
end_timevarchar✓✓session_end_time
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
privateboolean✓✓is_private
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in V2 for more details.
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
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 session_deleted_flag in V1
load_datetimetimestamp(6) with time zone✗✓
emis_session_idbigint✓✓session_id
emis_session_guidvarchar✓✓session_guid
session_uuidvarchar✗✓
session_emis_organisation_idbigint✓✓organisation_id
session_emis_organisation_guidvarchar✓✓organisation_guid
organisation_uuidvarchar✗✓
location_idbigint✗✓
emis_location_guidvarchar✓✓location_guid
location_uuidvarchar✗✓
session_descriptionvarchar✓✓
session_start_datedate✓✓
session_start_timevarchar✓✓
session_end_datedate✓✓
session_end_timevarchar✓✓
last_updatedtimestamp(6) with time zone✓✓session_last_updated_datetime
session_type_idbigint✗✓
session_type_descriptionvarchar✓✓
session_category_idbigint✗✓
session_category_display_namevarchar✓✓
private_flagboolean✓✓is_private
total_slotsbigint✗✓New in v2
bookable_slotsbigint✗✓New in v2
booked_slotsbigint✗✓New in v2
unfilled_slotsbigint✗✓New in v2
deleted_slotsbigint✗✓New in v2
embargoed_slotsbigint✗✓New in v2
dna_appointmentsbigint✗✓New in v2
cancelled_and_rebooked_appointmentsbigint✗✓New in v2
cancelled_and_not_rebooked_appointmentsbigint✗✓New in v2
same_day_appointmentsbigint✗✓New in v2
in_person_appointmentsbigint✗✓New in v2
virtual_appointmentsbigint✗✓New in v2
patient_age_at_appointmentinteger✗✓New in v2
registered_patient_countbigint✗✓New in v2
unregistered_patient_countbigint✗✓New in v2
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

Not used in this schema