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
authorised_course_datetime timestamp(6) with time zone Date the course was authorised; Rounded to the first of the month 2023-05-01 00:00:00.000000 UTC
cancellation_datetime timestamp(6) with time zone Date 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
course_duration_in_days bigint Intended course duration in days 28
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 TAKE ONE TWICE DAILY
drug_record_id varbinary Unique identifier for the 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
expiry_datetime timestamp(6) with time zone When this prescription expires; Rounded to the first of the month 2023-05-01 00:00:00.000000 UTC
first_issue_datetime timestamp(6) with time zone Date of the first issue of this prescription; Rounded to the first of the month 2023-05-01 00:00:00.000000 UTC
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
issued_count bigint Number of issues already issued 1
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 25
min_next_issue_days bigint The number of days that a patient needs to wait in-between getting prescriptions 12
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
most_recent_issue_datetime timestamp(6) with time zone Date of the most recent issue; Rounded to the first of the month 2023-05-01 00:00:00.000000 UTC
most_recent_issue_method_description varchar Description of the issue method Electronic
number_of_issues_authorised bigint The number of issues that have been authorised 6
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 1000
quantity_multiplicand double Multiplicand component of the quantity calculation 1
quantity_multiplier double Multiplier component of the quantity calculation 120
quantity_multiplier_uom varchar Unit of measure for the quantity multiplier ml
quantity_representation varchar Human-readable representation of the quantity 1000 ml
quantity_unit varchar Unit of measure for the total issued quantity ml
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_drug_record
LIMIT 100;