Skip to content
Partner Developer Portal

Schema

The core schema represents the Drug Code schema derived from EMIS source systems.

Column NameData TypeDescriptionExample
is_deletedbooleanIndicates if this record should be considered soft deletedFALSE
code_idbigintThe unique EMIS code identifier for the clinical code11678741000033113
old_codevarcharThe legacy code that provide a standard vocabulary for clinicians to record patient findings and procedures, in health and social care IT systems across primary and secondary care.‘META1807’
termvarcharThe description of the EMIS clinical code‘Electrode Gel’
dmd_product_code_idbigintNHS Dictionary of Medicines and Devices (dm+d) product code identifier; includes both actual and virtual medicinal products. In practice, these ids are directly mapped to SNOMED CT concepts.12354611500001104
is_sensitivebooleanIndicates whether the clinical code is flagged as sensitive. The sensitive reference set codes are 999004351000000109( gender related issues), 999004371000000100(assisted fertilisation), 999004361000000107(termination of pregnancy) and 999004381000000103 (sexually transmitted disease)TRUE
organisationvarcharSet to ‘EMIS’‘EMIS’
transform_datetimetimestamp(6) with time zoneThe timestamp indicating 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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_record_versionvarchar✓✗
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
dmd_productcode_idbigint✓✓dmd_product_code_id
emis_old_codevarchar✓✓old_code
emis_termvarchar✓✓term
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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_record_versionvarchar✓✗
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
dmd_productcode_idbigint✓✓dmd_product_code_id
emis_old_codevarchar✓✓old_code
emis_termvarchar✓✓term
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓

The table below presents the flavour specific schema.

Column NameData Type
is_deletedboolean
code_idbigint
old_codevarchar
termvarchar
dmd_product_code_idbigint
organisationvarchar
transform_datetimetimestamp(6) with time zone

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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
emis_termvarchar✓✓term
dmd_product_code_idbigint✓✓
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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
emis_termvarchar✓✓term
dmd_product_code_idbigint✓✓
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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_ingest_timevarchar✓✗
is_deletedboolean✗✓
code_idbigint✓✓
termvarchar✓✓
dmd_product_code_idbigint✓✓
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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_record_versionvarchar✓✗
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
dmd_productcode_idbigint✓✓dmd_product_code_id
emis_old_codevarchar✓✓old_code
emis_termvarchar✓✓term
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.

Columns NameData TypesData in V1Data in V2Core MappingComments
_record_versionvarchar✓✗
_ingest_timevarchar✓✗
is_deletedboolean✗✓
emis_code_idbigint✓✓code_id
dmd_productcode_idbigint✓✓dmd_product_code_id
emis_old_codevarchar✓✓old_code
emis_termvarchar✓✓term
organisationvarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
data_filterinteger✓✗