Skip to content
Partner Developer Portal

Schema

The core schema represents the Sharing Agreement schema derived from the EMIS source system.

Column NameData TypeDescriptionExample
is_deletedbooleanIndicates if this record should be considered soft deleted.FALSE
agreement_guidvarcharThe GUID for the sharing agreementD0AD76B9-200B-4D52-8199-8D8F485EB1D7
requester_organisation_guidvarcharThe GUID for the requester organisationA1B2C3D4-1234-5678-9ABC-DEF012345678
sharer_organisation_guidvarcharThe GUID for the sharer organisationE5F60718-9012-3456-7890-ABCDEF123456
emis_index_schema_idintegerThe unique internal identifier for the EMIS Index schema.1
user_idbigintThe unique internal identifier for the user assigned to the agreement.12345
can_processbooleanIndicates whether data can currently be processed under this agreement (NULL if deleted).TRUE
requester_statusvarcharThe status of the requester organisation in the agreement (NULL if deleted).Activated
requester_is_activatedbooleanIndicates whether the requester organisation is currently activated.TRUE
requester_was_activatedbooleanIndicates whether the requester organisation was previously activated.FALSE
requester_cdbbigintThe requester organisation CDB number (NULL if deleted).50001
requester_namevarcharThe requester organisation name (NULL if deleted).Requester Health Trust
agreement_statusvarcharThe enabled or disabled status of the agreement (NULL if deleted).Enabled
agreement_type_idbigintThe unique internal identifier for the agreement type (NULL if deleted).5
agreement_type_descriptionvarcharThe description of the agreement type (NULL if deleted).Standard Data Sharing
agreement_idbigintThe unique internal identifier for the agreement (NULL if deleted).1001
agreement_namevarcharThe agreement name (NULL if deleted).Regional Care Agreement
agreement_purposevarcharThe agreement purpose description (NULL if deleted).To facilitate integrated care
sharer_statusvarcharThe status of the sharer organisation in the agreement (NULL if deleted).02. Activated
sharer_is_activatedbooleanIndicates whether the sharer organisation is currently activated (NULL if deleted).TRUE
sharer_was_activatedbooleanIndicates whether the sharer organisation was previously activated (NULL if deleted).FALSE
org_typevarcharThe organisation type classification for the sharer (NULL if deleted).GP Practice
sharer_ods_codevarcharThe sharer organisation ODS code (NULL if deleted).Y12345
sharer_cdbbigintThe sharer organisation CDB number (NULL if deleted).50002
sharer_namevarcharThe sharer organisation name (NULL if deleted).Example GP Surgery
sharer_close_datetimetimestamp(6) with time zoneThe date and time when the sharer organisation closed (NULL if deleted or not closed).‘2023-09-01 09:00:00.000000 UTC’
patient_countbigintThe total patient count for the sharer organisation (NULL if deleted).8500
active_patient_countbigintThe active patient count for the sharer organisation (NULL if deleted).7800
active_user_countbigintThe active user count for the sharer organisation (NULL if deleted).25
sharer_environment_idbigintThe unique internal identifier for the sharer environment.235
sharer_environmentvarcharThe environment description for the sharer organisation (NULL if deleted).AWS_ENG_GP12
last_modified_datetimetimestamp(6) with time zoneThe date and time when the agreement was last modified (NULL if deleted).‘2023-09-01 09:00:00.000000 UTC’
last_modified_datedateThe date when the agreement was last modified (NULL if deleted).2024-09-17
extract_datedateThe data extract date (NULL if deleted).2024-09-17
organisationvarcharThe organisation value for the record: EMIS for deleted records, otherwise the sharer’s customer database number.CDB-50002
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.20240917084800

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
emis_index_schema_idinteger✗✓
user_idbigint✗✓
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

The table below presents the flavour specific schema.

Column NameData TypeCore MappingComments
is_deletedboolean
pseudo_agreement_guidvarcharagreement_guidHashed
pseudo_requester_organisation_guidvarcharrequester_organisation_guidHashed
pseudo_sharer_organisation_guidvarcharsharer_organisation_guidHashed
emis_index_schema_idinteger
user_idbigint
agreement_namevarchar
agreement_purposevarchar
agreement_type_idbigint
agreement_type_descriptionvarchar
agreement_statusvarchar
can_processboolean
org_typevarchar
requester_statusvarchar
requester_is_activatedboolean
requester_was_activatedboolean
requester_cdbbigint
sharer_statusvarchar
sharer_is_activatedboolean
sharer_was_activatedboolean
sharer_ods_codevarchar
sharer_cdbbigint
sharer_close_datetimetimestamp(6) with time zone
patient_countbigint
active_patient_countbigint
active_user_countbigint
sharer_environmentvarchar
last_modified_datetimetimestamp(6) with time zone
last_modified_datedate
extract_datedate
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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2

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
is_deletedboolean✓✓Renamed from deleted in v1
agreement_guidvarchar✓✓
requester_organisation_guidvarchar✗✓
sharer_organisation_guidvarchar✓✓Renamed from emis_organisation_guid in v1
can_processboolean✗✓
requester_statusvarchar✗✓
requester_is_activatedboolean✗✓
requester_was_activatedboolean✗✓
requester_cdbbigint✗✓
requester_namevarchar✗✓
agreement_statusvarchar✗✓
agreement_idbigint✗✓
agreement_namevarchar✗✓
agreement_purposevarchar✗✓
agreement_type_idbigint✗✓
agreement_type_descriptionvarchar✗✓
sharer_statusvarchar✗✓
sharer_is_activatedboolean✓✓Renamed from is_activated_flag in v1
sharer_was_activatedboolean✗✓
org_typevarchar✗✓
sharer_ods_codevarchar✓✓Renamed from ods_code in v1
sharer_cdbbigint✓✓Renamed from organisation_cdb in v1
sharer_namevarchar✓✓Renamed from name in v1
sharer_close_datetimetimestamp(6) with time zone✗✓
active_patient_countbigint✗✓
active_user_countbigint✗✓
sharer_environment_idbigint✗✓
sharer_environmentvarchar✗✓
last_modified_datetimetimestamp(6) with time zone✓✓Replaced last_modified_date column in v1 to include the timestamp
extract_datedate✗✓
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
_ingest_timevarchar✓✗Removed in v2
disabledboolean✓✗Removed in v2