Skip to content
Partner Developer Portal

Schema

The core schema represents the Drug Record model schema derived from source to present a unified view of prescription information.

Please note that how much of this model is visible varies between flavours.

Column NameData TypeDescriptionExample / Values
is_deletedbooleanIndicates whether a drug record has been deleted at source.FALSE
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 is a legacy column maintained for backward compatibility‘20230512143015’
organisationvarcharAn identifier for the source of data (an organisation) relating to a given GP practice‘CDB-1234’
drug_record_idbigintThe unique internal identifier for the drug record within an organisation.123456789
drug_record_guidvarcharThe GUID for the drug record within an organisation.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
drug_record_uuidvarcharThe UUID derived from drug_record_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
patient_idbigintThe unique internal identifier for the patient record within the organisation, for whom the drug record was prescribed.123456
patient_guidvarcharThe unique GUID for the patient record within an organisation‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
patient_uuidvarcharThe UUID derived from patient_id and organisation, providing a stable unique identifier‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
patient_organisation_idbigintThe unique internal identifier for the organisation where the patient is registered12345
patient_organisation_guidvarcharThe GUID of the organisation where the patient is registered‘c9d0e1f2-a3b4-2c5d-7e8f-9a0b1c2d3e4f’
patient_organisation_uuidvarcharThe UUID derived from patient_organisation_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
drug_record_organisation_idbigintThe unique internal identifier of the organisation where the drug record was prescribed12345
drug_record_organisation_guidvarcharThe GUID of the organisation where the drug record was prescribed.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
drug_record_organisation_uuidvarcharThe UUID derived from drug_record_organisation_id and organisation, providing a stable unique identifier‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
authorising_user_in_role_idbigintThe unique identifier of the clinician who authorised or authored the drug record112
authorising_user_in_role_uuidvarcharThe UUID derived from authorising_user_in_role_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
original_authorising_user_in_role_idbigintThe unique identifier of the original clinician who authorised or authored the drug record. This will differ from authorising_user_in_role_id in situations where changes have been authorised to the original prescription by a different clinician.44556677
original_authorising_user_in_role_uuidvarcharThe UUID of the original authorising user derived from original_authorising_user_in_role_id and organisation, providing a stable unique identifier‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
entered_by_user_in_role_idbigintThe unique identifier of the user who entered the drug record334
entered_by_user_in_role_uuidvarcharThe UUID derived from entered_by_user_in_role_id and organisation, providing a stable unique identifier.‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
cancelled_by_user_in_role_idbigintThe unique identifier of the user who cancelled the drug record. Will only be populated if a drug record has ended or is cancelled.447
cancelled_by_user_in_role_uuidvarcharThe UUID of the user who cancelled the drug record derived from cancelled_by_user_in_role_id and organisation, providing a stable unique identifier‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
cancellation_reasonvarcharReason for the cancellation (free text)‘Patient request’
cancellation_datetimetimestamp(6) with time zoneDate and time the drug record was cancelled‘2023-09-01 09:00:00.000000 UTC’
availability_datetimetimestamp(6) with time zoneThe date and time the drug record was recorded in the source system‘2023-09-01 10:30:00.000000 UTC’
effective_datetimetimestamp(6) with time zoneClinical effective date and time of the drug record‘2023-09-01 09:00:00.000000 UTC’
effective_datetime_precisionvarcharPrecision of the effective datetime; set to ‘YMDT’.‘YMDT’
expiry_datetimetimestamp(6) with time zoneDate and time the prescription expires‘2023-09-01 09:00:00.000000 UTC’
first_issue_datetimetimestamp(6) with time zoneDate and time of the first issue against this drug record. This is taken from Issue Record to be the effective date of the first issue recorded, excluding cancelled issues and future dates. Will be NULL where prescription was never issued.‘2023-09-01 09:00:00.000000 UTC’
authorised_course_datetimetimestamp(6) with time zoneDate and time the course was authorised‘2023-09-01 09:00:00.000000 UTC’
review_datedateDate the prescription is due for review‘2024-07-01’
original_termvarcharThe EMIS term for the medication prescribed.‘Amoxicillin 500mg capsules’
patient_textvarcharNotes made for the patient while recording the prescription (free text)‘Patient Info - Ibuprofen’
pharmacy_textvarcharNotes made for the pharmacy related to the prescription (free text)‘Pharmacy Info - Ibuprofen’
local_mixture_namevarcharName of the locally prepared mixture, if applicable. This is for locally prescribed drug records that don’t have a coded equivalent. Expect this to be very sparsely populated.‘ADULT COUGH LINCTUS’
local_mixture_idbigintThe unique identifier for the local mixture prescribed8
drug_statusbigintIndicates whether the status of the drug record is Current (1) i.e. active or Past (2) i.e Completed or Cancelled1
prescription_type_idbigintThe unique identifier for the type of prescription2
prescription_type_descriptionvarcharThe type of prescription of the drug record i.e. acute, repeat, repeat-dispensing, or automatic‘repeat’
dosagevarcharDosage instructions for the drug record‘One to be taken twice daily’
course_duration_in_daysbigintCourse length of prescription, in days28
quantitydecimal(9,3)Quantity prescribed56.000
quantity_unitvarcharUnit of the quantity‘tablet’
quantity_representationvarcharComplete representation of the quantity prescribed, combining quantity and unit. representation‘56 tablet’
quantity_multiplicanddecimal(9,3)Multiplicand component of quantity56.000
quantity_multiplierdecimal(9,3)Multiplier component of quantity1.000
quantity_multiplier_uomvarcharUnit of measure for the multiplier‘pack’
number_of_issuesbigintNumber of times this drug record has been issued so far.3
number_of_issues_authorisedbigintNumber of issues authorised for the prescription i.e. maximum times it can be issued.12
most_recent_issue_record_idbigintThe unique internal identifier of the most recent issue record for this prescription, within an organisation. This is taken from Issue Record to be the most recent not cancelled issue recorded, excluding future dates.777888999
most_recent_issue_record_uuidvarcharThe UUID of the corresponding most recent issue record derived from most_recent_issue_record_id and organisation, providing a stable unique identifier‘a1b2c3d4-e5f6-4a5b-9c8d-0e1f2a3b4c5d’
most_recent_issue_method_idbigintInternal identifier for the most recent issue method of this drug record. This is taken from Issue Record to be the issue method associated with the most recent issue record above.10
most_recent_issue_method_descriptionvarcharDescription of the equivalent most recent issue method of this drug record‘Private’
most_recent_issue_datetimetimestamp(6) with time zoneDate and time of the most recent issue of the prescription to date. This is taken from Issue Record to be the effective date of the most recent not cancelled issue recorded, excluding future dates.‘2023-09-01 09:00:00.000000 UTC’
code_idbigintThe unique EMIS code identifier for the medication prescribed578241000033111
min_next_issue_daysbigintMinimum number of days before the next issue can be processed14
max_next_issue_daysbigintMaximum number of days before the next issue must be processed28
is_prescribed_as_contraceptivebooleanIndicates whether the drug was prescribed as a contraceptiveFALSE
is_privately_prescribedbooleanIndicates whether the drug was privately prescribedTRUE
quantity_unit_of_measure_idbigintInternal identifier for the quantity unit of measure12345
confidentiality_policy_idbigintIdentifier of the applied confidentiality policy-1
is_sensitivebooleanIndicates whether the drug record 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)FALSE
is_confidentialbooleanIndicates whether the drug record is confidential. This is based on confidentiality policy set against the patient / drug recordTRUE
transform_datetimetimestamp(6) with time zoneThe timestamp indicating when the record was last processed and updated in the data model. This field is crucial for understanding the current state of the data.‘2024-01-15 03:00:05.000000 UTC’
_execution_datevarcharThe transform_datetime formatted as yyyyMMddHHmmss. This is a legacy column provided only for backward compatibility with.‘20240115030005’

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✗✓
nhs_prescribing_agencyvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
authorisedissues_authorised_datetimestamp(6) with time zone✓✓authorised_course_datetime
authorisedissues_authorising_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_enteredby_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
cancellation_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
original_authorising_user_in_role_idbigint✗✓
original_authorising_user_in_role_uuidvarchar✗✓
authorisedissues_first_issue_datetimestamp(6) with time zone✓✓first_issue_datetime
cancellation_reasonvarchar✓✓
cancelled_by_user_in_role_idbigint✗✓
cancelled_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
confidential_flagboolean✓✓is_confidential
confidentiality_policy_idbigint✓✓
dosevarchar✓✓dosage
emis_medication_statusbigint✓✓drug_status
duration_in_daysbigint✓✓course_duration_in_days
duration_uomvarchar✓✓
fhir_medication_statusvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
fhir_medication_intentvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
effective_datetimestamp(6) with time zone✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
most_recent_issue_record_idbigint✗✓
most_recent_issue_record_uuidvarchar✗✓
emis_mostrecent_issue_datetimestamp(6) with time zone✓✓most_recent_issue_datetime
most_recent_issue_method_idbigint✗✓
emis_mostrecent_issue_methodvarchar✓✓most_recent_issue_method_description
prescription_type_idbigint✗✓
exa_mostrecent_issue_datevarchar✓✗
emis_prescription_typevarchar✓✓prescription_type_description
nhs_prescription_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
end_datetimestamp(6) with time zone✓✓expiry_datetime
max_nextissue_daysbigint✓✓max_next_issue_days
min_nextissue_daysbigint✓✓min_next_issue_days
number_authorisedbigint✓✓number_of_issues_authorised
number_of_issuesbigint✓✓
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_patient_idbigint✓✓patient_id
patient_uuidvarchar✗✓
pharmacy_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
prescribed_as_contraceptive_flagboolean✓✓is_prescribed_as_contraceptive
privately_prescribed_flagboolean✓✓is_privately_prescribed
quantitydecimal(9,3)✓✓
quantity_multiplicanddecimal(9, 3)✓✓
quantity_multiplierdecimal(9, 3)✓✓
quantity_multiplier_uomvarchar✓✓
quantity_representationvarchar✓✓
recorded_datetimestamp(6) with time zone✓✓availability_datetime
registration_guidvarchar✓✓patient_guid
registration_ods_codevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
reimburse_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
review_datedate✓✓
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
sensitive_flagboolean✓✓is_sensitive
cancellation_datetimestamp(6) with time zone✓✓cancellation_datetime
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
_execution_datevarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✗✓
confidential_patient_flagboolean✓✗
sensitive_patient_flagboolean✓✗
dummy_patient_flagboolean✓✗
regular_patient_flagboolean✓✗
regular_and_current_active_flagboolean✓✗
regular_current_active_and_inactive_flagboolean✓✗
non_regular_and_current_active_flagboolean✓✗
opt_out_93c1_flagboolean✓✗
opt_out_9nd19nu09nu4_flagboolean✓✗
opt_out_9nd19nu0_flagboolean✓✗
opt_out_9nu0_flagboolean✓✗
snomed_concept_idbigint✓✗
snomed_description_idbigint✓✗
other_codevarchar✓✗
other_code_systemvarchar✓✗
other_displayvarchar✓✗
uom_dmdvarchar✓✗
_record_versionvarchar✓✗
_update_datevarchar✓✗
_update_hourvarchar✓✗

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✗✓
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
patient_idbigint✗✓
registration_guidvarchar✓✓patient_guid
patient_uuidvarchar✗✓
patient_organisation_idbigint✗✓
patient_organisation_guidvarchar✗✓
patient_organisation_uuidvarchar✗✓
duration_in_daysbigint✓✓course_duration_in_days
emis_code_idbigint✓✓code_id
effective_datetimestamp(6) with time zone✓✓effective_datetime
expiry_datetimestamp(6) with time zone✓✓expiry_datetime
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
quantitydecimal(9, 3)✓✓
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
dosevarchar✓✓dosage
quantity_representationvarchar✓✓
quantity_multiplicanddecimal(9, 3)✓✓
quantity_multiplierdecimal(9, 3)✓✓
quantity_multiplier_uomvarchar✓✓
prescription_type_idbigint✗✓
emis_prescription_typevarchar✗✓prescription_type_description
nhs_prescription_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
activeboolean✓✓drug_status
number_of_issuesbigint✓✓
number_authorisedbigint✓✓number_of_issues_authorised
registration_ods_codevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
transform_datetimetimestamp(6) with time zone✗✓
_execution_datevarchar✓✓
organisationvarchar✓✓
snomed_concept_idbigint✓✗

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✗✓
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
nhs_prescribing_agencyvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_authorised_datetimestamp(6) with time zone✓✓authorised_course_datetime
authorisedissues_authorising_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_enteredby_user_in_rolevarchar✓✓Renamed from authorisedissues_enteredby_userinole in V1. Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
cancellation_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
original_authorising_user_in_role_idbigint✗✓
original_authorising_user_in_role_uuidvarchar✗✓
authorisedissues_first_issue_datetimestamp(6) with time zone✓✓first_issue_datetime
cancellation_reasonvarchar✓✓
cancelled_by_user_in_role_idbigint✗✓
cancelled_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
confidential_flagboolean✓✓is_confidential
confidentiality_policy_idbigint✓✓
dosevarchar✓✓dosage
emis_medication_statusbigint✓✓drug_status
duration_in_daysbigint✓✓course_duration_in_days
duration_uomvarchar✓✓
fhir_medication_statusvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
fhir_medication_intentvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
effective_datetimestamp(6) with time zone✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
most_recent_issue_record_idbigint✗✓
most_recent_issue_record_uuidvarchar✗✓
emis_mostrecent_issue_datetimestamp(6) with time zone✓✓most_recent_issue_datetime
most_recent_issue_method_idbigint✗✓
emis_mostrecent_issue_methodvarchar✓✓most_recent_issue_method_description
prescription_type_idbigint✗✓
emis_prescription_typevarchar✓✓prescription_type_description
nhs_prescription_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
end_datetimestamp(6) with time zone✓✓expiry_datetime
max_nextissue_daysbigint✓✓max_next_issue_days
min_nextissue_daysbigint✓✓min_next_issue_days
number_authorisedbigint✓✓number_of_issues_authorised
number_of_issuesbigint✓✓
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
emis_patient_idbigint✓✓patient_id
patient_uuidvarchar✗✓
prescribed_as_contraceptive_flagboolean✓✓is_prescribed_as_contraceptive
privately_prescribed_flagboolean✓✓is_privately_prescribed
quantitydecimal(9, 3)✓✓
recorded_datetimestamp(6) with time zone✓✓availability_datetime
registration_guidvarchar✓✓patient_guid
registration_ods_codevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
reimburse_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
review_datedate✓✓
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
sensitive_flagboolean✓✓is_sensitive
cancellation_datetimestamp(6) with time zone✓✓cancellation_datetime
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
_execution_datevarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓
_record_versionvarchar✓✗
_update_datevarchar✓✗
_update_hourvarchar✓✗
confidential_patient_flagboolean✓✗
consultation_source_emis_code_idvarchar✓✗
consultation_source_emis_original_termvarchar✓✗
dummy_patient_flagboolean✓✗
emis_issue_methodvarchar✓✗
emis_encounter_guidvarchar✓✗
exa_encounter_guidvarchar✓✗
exa_prescription_guidvarchar✓✗
estimated_nhs_costvarchar✓✗
exa_mostrecent_issue_datevarchar✓✗
non_regular_and_current_active_flagboolean✓✗
opt_out_93c1_flagboolean✓✗
opt_out_9nd19nu09nu4_flagboolean✓✗
opt_out_9nd19nu0_flagboolean✓✗
opt_out_9nu0_flagboolean✓✗
other_codevarchar✓✗
other_code_systemvarchar✓✗
other_displayvarchar✓✗
regular_and_current_active_flagboolean✓✗
regular_current_active_and_inactive_flagboolean✓✗
regular_patient_flagboolean✓✗
sensitive_patient_flagboolean✓✗
snomed_concept_idvarchar✓✗
snomed_description_idvarchar✓✗
uom_dmdvarchar✓✗

The table below presents the flavour specific schema.

Column NameData TypeCore Mapping
is_deletedboolean
pseudo_drug_record_uuidvarchardrug_record_uuid
pseudo_patient_uuidvarcharpatient_uuid
pseudo_patient_organisation_uuidvarcharpatient_organisation_uuid
pseudo_drug_record_organisation_uuidvarchardrug_record_organisation_uuid
cancellation_datetimetimestamp(6) with time zone
availability_datetimetimestamp(6) with time zone
effective_datetimetimestamp(6) with time zone
effective_datetime_precisionvarchar
expiry_datetimetimestamp(6) with time zone
first_issue_datetimetimestamp(6) with time zone
authorised_course_datetimetimestamp(6) with time zone
review_datedate
original_termvarchar
local_mixture_namevarchar
local_mixture_idbigint
drug_statusbigint
prescription_type_idbigint
prescription_type_descriptionvarchar
dosagevarchar
course_duration_in_daysbigint
quantitydecimal(9,3)
quantity_unitvarchar
quantity_representationvarchar
quantity_multiplicanddecimal(9,3)
quantity_multiplierdecimal(9,3)
quantity_multiplier_uomvarchar
number_of_issuesbigint
number_of_issues_authorisedbigint
most_recent_issue_method_idbigint
most_recent_issue_method_descriptionvarchar
most_recent_issue_datetimetimestamp(6) with time zone
code_idbigint
min_next_issue_daysbigint
max_next_issue_daysbigint
is_prescribed_as_contraceptiveboolean
is_privately_prescribedboolean
quantity_unit_of_measure_idbigint
confidentiality_policy_idbigint
is_sensitiveboolean
is_confidentialboolean
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✗✓
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
nhs_prescribing_agencyvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_authorised_datetimestamp(6) with time zone✓✓authorised_course_datetime
authorisedissues_authorising_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_enteredby_user_in_rolevarchar✓✓Renamed from authorisedissues_enteredby_userinole in V1. Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
cancellation_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
original_authorising_user_in_role_idbigint✗✓
original_authorising_user_in_role_uuidvarchar✗✓
authorisedissues_first_issue_datetimestamp(6) with time zone✓✓first_issue_datetime
cancellation_reasonvarchar✓✓
cancelled_by_user_in_role_idbigint✗✓
cancelled_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
confidential_flagboolean✓✓is_confidential
confidentiality_policy_idbigint✓✓
dosevarchar✓✓dosage
emis_medication_statusbigint✓✓drug_status
duration_in_daysbigint✓✓course_duration_in_days
fhir_medication_statusvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
fhir_medication_intentvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
effective_datetimestamp(6) with time zone✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
most_recent_issue_record_idbigint✗✓
most_recent_issue_record_uuidvarchar✗✓
emis_mostrecent_issue_datetimestamp(6) with time zone✓✓most_recent_issue_datetime
most_recent_issue_method_idbigint✗✓
emis_mostrecent_issue_methodvarchar✓✓most_recent_issue_method_description
prescription_type_idbigint✗✓
emis_prescription_typevarchar✓✓prescription_type_description
nhs_prescription_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
expiry_datetimestamp(6) with time zone✓✓expiry_datetime
max_nextissue_daysbigint✓✓max_next_issue_days
min_nextissue_daysbigint✓✓min_next_issue_days
number_authorisedbigint✓✓number_of_issues_authorised
number_of_issuesbigint✓✓
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_patient_idbigint✓✓patient_id
patient_uuidvarchar✗✓
pharmacy_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
prescribed_as_contraceptive_flagboolean✓✓is_prescribed_as_contraceptive
privately_prescribed_flagboolean✓✓is_privately_prescribed
quantitydecimal(9, 3)✓✓
recorded_datetimestamp(6) with time zone✓✓availability_datetime
registration_guidvarchar✓✓patient_guid
registration_ods_codevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
review_datedate✓✓
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
sensitive_flagboolean✓✓is_sensitive
cancellation_datetimestamp(6) with time zone✓✓cancellation_datetime
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
_execution_datevarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓
exa_prescription_guidvarchar✓✗
exa_mostrecent_issue_datevarchar✓✗
snomed_concept_idbigint✓✗
snomed_description_idbigint✓✗
other_code_systemvarchar✓✗
other_codevarchar✓✗
other_displayvarchar✓✗
regular_patient_flagboolean✓✗
regular_current_active_and_inactive_flagboolean✓✗
regular_and_current_active_flagboolean✓✗
non_regular_and_current_active_flagboolean✓✗
sensitive_patient_flagboolean✓✗
confidential_patient_flagboolean✓✗

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
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
pseudo_registration_guidvarchar✓✓patient_guidhashed
pseudo_patient_uuidvarchar✗✓patient_uuidhashed
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
effective_datedate✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
entered_datedate✓✓availability_datetime
entered_timevarchar✓✓availability_datetime
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
dosevarchar✓✓dosage
quantitydecimal(9, 3)✓✓
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
prescription_type_idbigint✗✓
emis_prescription_typevarchar✓✓prescription_type_description
drug_active_flagboolean✓✓drug_status
cancellation_datedate✓✓cancellation_datetime
number_of_issuesbigint✓✓
number_authorisedbigint✓✓number_of_issues_authorised
confidential_flagboolean✓✓is_confidential
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
_execution_datevarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓

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
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
pseudo_registration_guidvarchar✓✓patient_guidhashed
pseudo_patient_uuidvarchar✗✓patient_uuidhashed
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
effective_datedate✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
entered_datedate✓✓availability_datetime
entered_timevarchar✓✓availability_datetime
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
dosevarchar✓✓dosage
quantitydecimal(9, 3)✓✓
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
prescription_type_idbigint✗✓
emis_prescription_typevarchar✓✓prescription_type_description
drug_active_flagboolean✓✓drug_status
cancellation_datedate✓✓cancellation_datetime
number_of_issuesbigint✓✓
number_authorisedbigint✓✓number_of_issues_authorised
confidential_flagboolean✓✓is_confidential
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
_execution_datevarchar✓✓Renamed from execution_date in V1
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓

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
drug_record_idbigint✗✓
drug_record_guidvarchar✓✓
id_type5varchar✓✓drug_record_uuid
patient_guidvarchar✓✓
patient_uuidvarchar✗✓
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
effective_datedate✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
entered_datedate✓✓availability_datetime
entered_timevarchar✓✓availability_datetime
clinician_user_in_role_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
code_idbigint✓✓
dosagevarchar✓✓
quantitydecimal(9, 3)✓✓
quantity_unit_of_measure_idbigint✗✓
quantity_unitvarchar✓✓
problem_observation_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
prescription_type_idbigint✗✓
prescription_typevarchar✓✓prescription_type_description
is_activeboolean✓✓drug_status
cancellation_datedate✓✓cancellation_datetime
number_of_issuesbigint✓✓
number_of_issues_authorisedbigint✓✓
is_confidentialboolean✓✓
processing_idbigint✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
_execution_datevarchar✓✓Renamed from execution_date in V1
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓

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✗✓
drug_record_idbigint✗✓
emis_drug_guidvarchar✓✓drug_record_guid
exa_drug_guidvarchar✓✓drug_record_uuid
nhs_prescribing_agencyvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_authorised_datetimestamp(6) with time zone✓✓authorised_course_datetime
authorisedissues_authorising_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_enteredby_user_in_rolevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_authorising_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
cancellation_userinrole_guidvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_idbigint✗✓
entered_by_user_in_role_uuidvarchar✗✓
authorising_user_in_role_idbigint✗✓
authorising_user_in_role_uuidvarchar✗✓
original_authorising_user_in_role_idbigint✗✓
original_authorising_user_in_role_uuidvarchar✗✓
authorisedissues_first_issue_datetimestamp(6) with time zone✓✓first_issue_datetime
cancellation_reasonvarchar✓✓
cancelled_by_user_in_role_idbigint✗✓
cancelled_by_user_in_role_uuidvarchar✗✓
emis_code_idbigint✓✓code_id
confidential_flagboolean✓✓is_confidential
confidentiality_policy_idbigint✓✓
dosevarchar✓✓dosage
emis_medication_statusbigint✓✓drug_status
duration_in_daysbigint✓✓course_duration_in_days
duration_uomvarchar✓✓
fhir_medication_statusvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
fhir_medication_intentvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
effective_datetimestamp(6) with time zone✓✓effective_datetime
effective_date_precisionvarchar✓✓effective_datetime_precision
most_recent_issue_record_idbigint✗✓
most_recent_issue_record_uuidvarchar✗✓
emis_mostrecent_issue_datetimestamp(6) with time zone✓✓most_recent_issue_datetime
most_recent_issue_method_idbigint✗✓
emis_mostrecent_issue_methodvarchar✓✓most_recent_issue_method_description
prescription_type_idbigint✗✓
exa_mostrecent_issue_datevarchar✓✗
emis_prescription_typevarchar✓✓prescription_type_description
nhs_prescription_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
patient_organisation_idbigint✗✓
emis_registration_organisation_guidvarchar✓✓patient_organisation_guid
patient_organisation_uuidvarchar✗✓
end_datetimestamp(6) with time zone✓✓expiry_datetime
max_nextissue_daysbigint✓✓max_next_issue_days
min_nextissue_daysbigint✓✓min_next_issue_days
number_authorisedbigint✓✓number_of_issues_authorised
number_of_issuesbigint✓✓
drug_record_organisation_idbigint✗✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✗✓
patient_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_patient_idbigint✓✓patient_id
patient_uuidvarchar✗✓
pharmacy_textvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
prescribed_as_contraceptive_flagboolean✓✓is_prescribed_as_contraceptive
privately_prescribed_flagboolean✓✓is_privately_prescribed
quantitydecimal(9, 3)✓✓
quantity_multiplicanddecimal(9, 3)✓✓
quantity_multiplierdecimal(9, 3)✓✓
quantity_multiplier_uomvarchar✓✓
quantity_representationvarchar✓✓
recorded_datetimestamp(6) with time zone✓✓availability_datetime
registration_guidvarchar✓✓patient_guid
registration_ods_codevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
reimburse_typevarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
review_datedate✓✓
emis_original_termvarchar✓✓original_term
local_mixture_idbigint✗✓
local_mixture_namevarchar✗✓
sensitive_flagboolean✓✓is_sensitive
cancellation_datetimestamp(6) with time zone✓✓cancellation_datetime
quantity_unit_of_measure_idbigint✗✓
uomvarchar✓✓quantity_unit
_execution_datevarchar✓✓
transform_datetimetimestamp(6) with time zone✗✓
organisationvarchar✓✓
confidential_patient_flagboolean✓✗
sensitive_patient_flagboolean✓✗
dummy_patient_flagboolean✓✗
regular_patient_flagboolean✓✗
regular_and_current_active_flagboolean✓✗
regular_current_active_and_inactive_flagboolean✓✗
non_regular_and_current_active_flagboolean✓✗
opt_out_93c1_flagboolean✓✗
opt_out_9nd19nu09nu4_flagboolean✓✗
opt_out_9nd19nu0_flagboolean✓✗
opt_out_9nu0_flagboolean✓✗
snomed_concept_idbigint✓✗
snomed_description_idbigint✓✗
other_codevarchar✓✗
other_code_systemvarchar✓✗
other_displayvarchar✓✗
uom_dmdvarchar✓✗
exa_prescription_guidvarchar✓✗
_record_versionvarchar✓✗
_update_datevarchar✓✗
_update_hourvarchar✓✗

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✓
nhs_prescribing_agencyvarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
drug_record_idbigint✓
emis_drug_guidvarchar✓drug_record_guid
exa_drug_guidvarchar✓drug_record_uuid
pseudo_registration_guid_oureavarchar✓patient_guidhashed
pseudo_patient_uuidvarchar✓patient_uuidhashed
patient_organisation_idbigint✓
emis_registration_organisation_guidvarchar✓patient_organisation_guid
patient_organisation_uuidvarchar✓
drug_record_organisation_idbigint✓
drug_record_organisation_guidvarchar✓✓Renamed from emis_medication_organisation_guid in V1
drug_record_organisation_uuidvarchar✓
authorisedissues_authorised_datetimestamp(6) with time zone✓authorised_course_datetime
authorisedissues_authorising_user_in_rolevarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
authorisedissues_enteredby_userinolevarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_enteredby_userinrole_guidvarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
emis_authorising_userinrole_guidvarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
cancellation_userinrole_guidvarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
entered_by_user_in_role_uuidvarchar✓
authorising_user_in_role_uuidvarchar✓
original_authorising_user_in_role_uuidvarchar✓
authorisedissues_first_issue_datetimestamp(6) with time zone✓first_issue_datetime
cancellation_reasonvarchar✓
cancelled_by_user_in_role_uuidvarchar✓
emis_code_idbigint✓code_id
confidential_flagboolean✓is_confidential
confidentiality_policy_idbigint✓
dosevarchar✓dosage
emis_medication_statusbigint✓drug_status
duration_in_daysbigint✓course_duration_in_days
duration_uomvarchar✓
fhir_medication_statusvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
fhir_medication_intentvarchar✓✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
effective_datetimestamp(6) with time zone✓effective_datetime
effective_date_precisionvarchar✓effective_datetime_precision
emis_mostrecent_issue_datetimestamp(6) with time zone✓most_recent_issue_datetime
most_recent_issue_method_idbigint✓
emis_mostrecent_issue_methodvarchar✓most_recent_issue_method_description
exa_mostrecent_issue_datevarchar✓✗
prescription_type_idbigint✓
emis_prescription_typevarchar✓prescription_type_description
nhs_prescription_typevarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
end_datetimestamp(6) with time zone✓expiry_datetime
max_nextissue_daysbigint✓max_next_issue_days
min_nextissue_daysbigint✓min_next_issue_days
number_authorisedbigint✓number_of_issues_authorised
number_of_issuesbigint✓
prescribed_as_contraceptive_flagboolean✓is_prescribed_as_contraceptive
privately_prescribed_flagboolean✓is_privately_prescribed
quantitydecimal(9, 3)✓
quantity_multiplicanddecimal(9, 3)✓
quantity_multiplierdecimal(9, 3)✓
quantity_multiplier_uomvarchar✓
quantity_representationvarchar✓
recorded_datetimestamp(6) with time zone✓availability_datetime
registration_ods_codevarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
reimburse_typevarchar✓Always NULL as it is deprecated in v2. Refer changes in v2 for more details.
review_datedate✓
emis_original_termvarchar✓original_term
local_mixture_idbigint✓
local_mixture_namevarchar✓
sensitive_flagboolean✓is_sensitive
cancellation_datetimestamp(6) with time zone✓cancellation_datetime
quantity_unit_of_measure_idbigint✓
uomvarchar✓quantity_unit
uom_dmdvarchar✓✗
_execution_datevarchar✓
transform_datetimetimestamp(6) with time zone✓
organisationvarchar✓
_record_versionvarchar✓✗
_update_datevarchar✓✗
_update_hourvarchar✓✗