Skip to content
Partner Developer Portal

Schema

Column NameData TypeDescription
organisationvarcharAn organisation is synonymous with a pharmacy and is also known as the RXid.
prescription_idintegerThe internal identifier for the prescription in scriptq, is unique within the organisation.
prescription_guidvarcharUnique identifier for prescription across other systems.
prescription_item_idintegerThe internal identifier for the prescription item in scriptq, is unique within the organisation.
prescription_item_guidvarcharUnique identifier for prescription item across other systems.
prescription_item_deletedbooleanPrescription item deleted flag.
prescription_deletedbooleanPrescription deleted flag.
unique_patient_idvarcharA globally unique patient identifier.
patient_idintegerThe internal identifier for a patient, is unique within the organisation. Could be null if the patient is not registered.
patient_full_namevarcharOnly populated if the patient id is not known, otherwise it should be sourced from mart_patient.
prescription_type_idintegerThe unique identifier for the type of prescription.
prescription_typevarcharThe type of prescription. This could be things like FP10, Dental, Private, Hospital.
prescription_source_idintegerIdentifier for the source of prescription.
prescription_exemption_codevarcharHolds the exemption code for the exemption the patient had at the time of prescribing.
prescription_added_date_timetimestampThe date and time when the prescription was dispensed.
preparation_code_idintegerThe unique identifier for the preparation that has been prescribed.
virtual_product_idintegerUnique virtual product identifier.
quantitynumericThe quantity of the preparation that has been prescribed to the patient.
original_quantitynumericThe original quantity of the preparation.
dosagevarcharDosage for the prescribed item.
endorsement_textvarcharEndorsement for the prescribed item.
prescription_costnumericCaptures the final cost for the prescription item.
is_non_mdsbooleanWhether the prescription item is non-MDS.
rds_type_idintegerIdentifier for repeat dispensing type.
is_opd_appliedbooleanSet to true when original pack dispensing has been applied.
is_owedbooleanA boolean flag to indicate whether some outstanding quantity has not been dispensed to the patient.
owing_datedateThe date when the owing was created.
owing_quantitynumericThe quantity that is still owed to the patient.
pharmacy_namevarcharThe name of the pharmacy.
pharmacy_guidvarcharGuid of the pharmacy.
pharmacy_addressintegerAddress id of the pharmacy.
pharmacy_rx_idvarcharRX id of the pharmacy.
branch_identifiervarcharBranch 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_codevarcharPharmacy NacsCode. Used to identify the pharmacy when the user logs in.
prescriber_idintegerThe prescriber’s identifier.
prescriber_type_idintegerForeign key to the PrescriberType table. Configures the prescriber type such as GP or Dentist.
prescriber_prescribing_organisation_idintegerPrescribing organisation identifier associated with the prescriber.
prescriber_surnamevarcharSurname of the prescriber.
prescriber_first_namevarcharFirst name of the prescriber.
prescriber_post_codevarcharPost code of the prescriber.
prescriber_registration_numbervarcharThe prescriber’s registration number.
region_idintegerForeign key to the Region table, determining which country the pharmacy is running in, for example England or Scotland.
pharmacy_idintegerId of the pharmacy.
surgery_namevarcharThe name of the surgery.
surgery_registration_codevarcharThe registration code of the surgery.
repeat_numberintegerFor repeat prescriptions this signifies which repeat this is.
patient_nhs_numbervarcharNHS number. 10-digit number, like 3347775786 or 334-777-5786.
has_controlled_drugsbooleanWhether or not this prescription has controlled drugs.
all_controlled_drugsbooleanFlag is true if all prescription items have controlled drug schedule between 2 and 5.
prescription_expiry_datedateThe expiry date based on controlled drug, repeat number, and stage in the process.
prescription_datedateThe date of the prescription. This is the added date if the prescription date is null.
prescription_status_idintegerThe identifier for the status of the prescription.
prescription_statusvarcharThe text for the status of the prescription.
prescription_item_status_idintegerThe identifier for the status of the prescription item.
prescription_item_statusvarcharThe text for the status of the prescription item.
treatment_type_idintegerThe identifier for the treatment type.
treatment_typevarcharThe text for treatment type. This is either Acute, Repeat Prescribing, or Repeat Dispensing.
is_eps_englandbooleanA boolean flag to indicate if the prescription is electronic and for England.
is_eps_scotlandbooleanA boolean flag to indicate if the prescription is electronic and for Scotland.
is_eps_walesbooleanA boolean flag to indicate if the prescription is electronic and for Wales.
digital_exemption_codevarcharThe digital exemption code received from the NHS Spine for the patient.
digital_exemption_descriptionvarcharTranslates the received code into unknown, exempt, or paying.
prescription_referencevarcharA GUID that is used to identify the prescription by the NHS.
prescription_identifiervarcharSource-system prescription identifier carried in prescribing and dispensing messages.
number_of_claimsintegerNumber of claims sent.
first_claim_date_timetimestampThe date and time of the first claim.
controlled_drug_scheduleintegerThe schedule of a controlled drug preparation (1 to 5). Default 0 means not a controlled drug.
dispense_notification_completed_date_timetimestampDispense notification completed datetime.
dispensed_date_timetimestampDate and time of dispense.
patient_registration_datedateDate in which the patient record has been registered.
mapping_preparationsarrayList of mapped preparation and product relationships from dim_preparation.
bnf_chapter_refsarrayAn array of BNF chapters that the item is referenced in.
prescription_ingest_datedateThe date when the prescription data was ingested into the system.
prescription_item_ingest_datedateThe date when the prescription item data was ingested into the system.
prescribing_surgery_ingest_datedateThe date when prescribing surgery data was ingested into the system.
row_idvarcharUnique hash generated based on column values, used to identify data changes.
last_updated_datedateDate that this record was last updated by the orchestration process.