Skip to content
Partner Developer Portal

Schema

Column Name Data Type Description
organisation varchar An organisation is synonymous with a pharmacy and is also known as the RXid.
prescription_id integer The internal identifier for the prescription in scriptq, is unique within the organisation.
prescription_guid varchar Unique identifier for prescription across other systems.
prescription_item_id integer The internal identifier for the prescription item in scriptq, is unique within the organisation.
prescription_item_guid varchar Unique identifier for prescription item across other systems.
prescription_item_deleted boolean Prescription item deleted flag.
prescription_deleted boolean Prescription deleted flag.
unique_patient_id varchar A globally unique patient identifier.
patient_id integer The internal identifier for a patient, is unique within the organisation. Could be null if the patient is not registered.
patient_full_name varchar Only populated if the patient id is not known, otherwise it should be sourced from mart_patient.
prescription_type_id integer The unique identifier for the type of prescription.
prescription_type varchar The type of prescription. This could be things like FP10, Dental, Private, Hospital.
prescription_source_id integer Identifier for the source of prescription.
prescription_exemption_code varchar Holds the exemption code for the exemption the patient had at the time of prescribing.
prescription_added_date_time timestamp The date and time when the prescription was dispensed.
preparation_code_id integer The unique identifier for the preparation that has been prescribed.
virtual_product_id integer Unique virtual product identifier.
quantity numeric The quantity of the preparation that has been prescribed to the patient.
original_quantity numeric The original quantity of the preparation.
dosage varchar Dosage for the prescribed item.
endorsement_text varchar Endorsement for the prescribed item.
prescription_cost numeric Captures the final cost for the prescription item.
is_non_mds boolean Whether the prescription item is non-MDS.
rds_type_id integer Identifier for repeat dispensing type.
is_opd_applied boolean Set to true when original pack dispensing has been applied.
prescription_item_not_dispensed_reason_id integer The identifier for the reason why a prescription item was not dispensed.
is_owed boolean A boolean flag to indicate whether some outstanding quantity has not been dispensed to the patient.
owing_date date The date when the owing was created.
owing_quantity numeric The quantity that is still owed to the patient.
pharmacy_name varchar The name of the pharmacy.
pharmacy_guid varchar Guid of the pharmacy.
pharmacy_address integer Address id of the pharmacy.
pharmacy_rx_id varchar RX id of the pharmacy.
branch_identifier varchar Branch identifier assigned by the head office. Used when sending and receiving data from a head office, but otherwise not used by the application.
national_practice_code varchar Pharmacy NacsCode. Used to identify the pharmacy when the user logs in.
prescriber_id integer The prescriber’s identifier.
prescriber_type_id integer Foreign key to the PrescriberType table. Configures the prescriber type such as GP or Dentist.
prescriber_prescribing_organisation_id integer Prescribing organisation identifier associated with the prescriber.
prescriber_surname varchar Surname of the prescriber.
prescriber_first_name varchar First name of the prescriber.
prescriber_post_code varchar Post code of the prescriber.
prescriber_registration_number varchar The prescriber’s registration number.
region_id integer Foreign key to the Region table, determining which country the pharmacy is running in, for example England or Scotland.
pharmacy_id integer Id of the pharmacy.
surgery_name varchar The name of the surgery.
surgery_registration_code varchar The registration code of the surgery.
repeat_number integer For repeat prescriptions this signifies which repeat this is.
patient_nhs_number varchar NHS number. 10-digit number, like 3347775786 or 334-777-5786.
has_controlled_drugs boolean Whether or not this prescription has controlled drugs.
all_controlled_drugs boolean Flag is true if all prescription items have controlled drug schedule between 2 and 5.
prescription_expiry_date date The expiry date based on controlled drug, repeat number, and stage in the process.
dispense_notification_expiry_date date Expiry date used for dispense notifications. For Scotland this comes from the SETP prescription item expiry date, for controlled drugs it is prescription date plus 28 days, otherwise it uses prescription_expiry_date.
prescription_date date The date of the prescription. This is the added date if the prescription date is null.
prescription_status_id integer The identifier for the status of the prescription.
prescription_status varchar The text for the status of the prescription.
prescription_item_status_id integer The identifier for the status of the prescription item.
prescription_item_status varchar The text for the status of the prescription item.
treatment_type_id integer The identifier for the treatment type.
treatment_type varchar The text for treatment type. This is either Acute, Repeat Prescribing, or Repeat Dispensing.
is_eps_england boolean A boolean flag to indicate if the prescription is electronic and for England.
is_eps_scotland boolean A boolean flag to indicate if the prescription is electronic and for Scotland.
is_eps_wales boolean A boolean flag to indicate if the prescription is electronic and for Wales.
digital_exemption_code varchar The digital exemption code received from the NHS Spine for the patient.
digital_exemption_description varchar Translates the received code into unknown, exempt, or paying.
prescription_reference varchar A GUID that is used to identify the prescription by the NHS.
exemption varchar Calculated exemption label: RTEC: Exempt/RTEC: Paying when digital exemption is present for EPS England, otherwise Exemption Unknown or prescription exemption code.
claim_expiry date Claim expiry date for the prescription.
is_expiring_to_dispense boolean Flag indicating whether the prescription is approaching dispense expiry.
is_expiring_to_claim boolean Flag indicating whether the prescription is approaching claim expiry.
is_claim_expired boolean Flag indicating whether the claim window has expired.
prescription_identifier varchar Source-system prescription identifier carried in prescribing and dispensing messages.
number_of_claims integer Number of claims sent.
first_claim_date_time timestamp The date and time of the first claim.
controlled_drug_schedule integer The schedule of a controlled drug preparation (1 to 5). Default 0 means not a controlled drug.
dispense_notification_completed_date_time timestamp Dispense notification completed datetime.
dispensed_date_time timestamp Date and time of dispense.
patient_registration_date date Date in which the patient record has been registered.
total_dispensed_cost numeric Total dispensed cost reimbursement price calculated from aggregated dispensing costs per prescription item.
mapping_preparations array List of mapped preparation and product relationships from dim_preparation.
bnf_chapter_refs array An array of BNF chapters that the item is referenced in.
virtual_product_name varchar PKB virtual product name.
preparation_description varchar Text description of the preparation code.
prescribed_product varchar Prescribed product.
prescribed_drug_code varchar The DrugCode of the Pack from which the Preparation is derived.
prescription_ingest_date date The date when the prescription data was ingested into the system.
prescription_item_ingest_date date The date when the prescription item data was ingested into the system.
row_id varchar Unique hash generated based on column values, used to identify data changes.
last_updated_date date Date that this record was last updated by the orchestration process.