Definition
The Drug Record model captures medication prescribing records at patient level, including prescribing details, issue cadence, quantities, and lifecycle status.
Information
Section titled “Information”The Drug Record model provides a structured view of prescribed medications for patients. It combines prescribing metadata, coding references, and operational status so downstream users can safely analyse prescribing activity.
Each record is uniquely identified by a combination of drug_record_id and
organisation.
Key Data Fields
Section titled “Key Data Fields”Identifiers and Links
Section titled “Identifiers and Links”- drug_record_id: Unique identifier for a medication record.
- patient_id: Patient identifier linked to the patient model.
- code_id: Medication code identifier linked to drug reference data.
- dmd_product_code_id: Mapped dm+d product identifier.
Prescribing Details
Section titled “Prescribing Details”- dosage: Prescribing dose instructions.
- quantity: Quantity prescribed.
- quantity_unit: Unit for prescribed quantity.
- prescription_type_description: Prescribing type classification.
Clinical and Operational Timing
Section titled “Clinical and Operational Timing”- effective_datetime: Date/time medication becomes effective.
- first_issue_datetime: First issue month/year.
- most_recent_issue_datetime: Latest issue month/year.
- review_date: Next medication review date.
- expiry_datetime: Medication expiry month/year.
Data Management
Section titled “Data Management”- is_deleted: Indicates whether the source record is soft deleted.
- transform_datetime: Timestamp when record was transformed.
- model_updated_datetime: Source model update timestamp.
Examples
Section titled “Examples”Find active medication records
Section titled “Find active medication records”SELECT drug_record_id, patient_id, code_id, effective_datetime, review_dateFROM explorer_open_safely.medication_drug_recordWHERE is_deleted = FALSEORDER BY effective_datetime DESCFind records due for review
Section titled “Find records due for review”SELECT drug_record_id, patient_id, dosage, review_date, organisationFROM explorer_open_safely.medication_drug_recordWHERE review_date <= CURRENT_DATE AND is_deleted = FALSEORDER BY review_date ASC
