Skip to content
Partner Developer Portal

Schema

Column Name Data Type Description Example
is_deleted boolean If this record should be considered soft deleted; all columns excluding primary keys will be NULL if TRUE false
cancellation_datetime timestamp(6) with time zone Date and time the issue was cancelled; NULL if not cancelled 2023-05-12 14:30:15.000000 UTC
code_id bigint EMIS code ID - internal identifier 2986010
consultation_id varbinary Unique identifier for the linked consultation for this diary entry F422B34E0AC397B6A8C9D0E1F2345678
consultation_source_code_id bigint EMIS code ID representing the consultation purpose; used for categorisation 1572871000006117
course_duration_in_days bigint Intended course duration in days 7
dmd_product_code_id bigint Dictionary of Medicines and Devices (dm+d) product identifier; also a SNOMED CT concept identifier 12354611500001104
dosage varchar Dosage instructions for the medication as recorded at the point of issue One To Be Taken At Bedtime
drug_record_id varbinary Unique identifier for the linked medication drug record F422B34E0AC397B6A8C9D0E1F2345678
effective_datetime timestamp(6) with time zone Date and time the issue record came into effect 2023-05-12 14:30:15.000000 UTC
estimated_nhs_cost decimal(10,4) Estimated NHS cost of the issued medication 2.84
is_cancelled boolean Indicates if the prescription issue has been cancelled false
is_prescribed_as_contraceptive boolean Indicates if the medication is prescribed as a contraceptive false
is_privately_prescribed boolean Indicates if the medication is privately prescribed false
issue_method_description varchar Description of the issue method Electronic
issue_record_id varbinary Unique identifier for the medication issue record F422B34E0AC397B6A8C9D0E1F2345678
local_mixture_name varchar Name of the local mixture, populated when the issue relates to a locally prepared mixture HYDROCORTISONE 0.5 PERCENT IN WSP
max_next_issue_days bigint The maximum number of days that a patient can wait for before getting a prescription 7
min_next_issue_days bigint The number of days that a patient needs to wait in-between getting prescriptions 25
model_updated_datetime timestamp(6) with time zone Date and time the model last updated this record 2023-05-12 14:30:15.000000 UTC
patient_id varbinary Unique patient identifier F422B34E0AC397B6A8C9D0E1F2345678
prescription_type_description varchar Description of the prescription type (‘Acute’, ‘Repeat’, ‘Repeat Dispensing’ or ‘Automatic’) acute
quantity double Total quantity of medication issued 28
quantity_multiplicand double Multiplicand component of the quantity calculation 1
quantity_multiplier double Multiplier component of the quantity calculation 200
quantity_multiplier_uom varchar Unit of measure for the quantity multiplier ml
quantity_representation varchar Human-readable representation of the quantity 28 tablet(s)
quantity_unit varchar Unit of measure for the total issued quantity tablet(s)
review_date date Date that this prescription needs to be reviewed by a clinician 2023-05-12
transform_datetime timestamp(6) with time zone Date and time the data was made available in the model with a relevant change 2023-05-12 14:30:15.000000 UTC

Use this query to preview recent rows and validate expected columns:

SELECT *
FROM explorer_open_safely.medication_issue_record
LIMIT 100;