Skip to content
Partner Developer Portal byOptum

Definition

The Drug Record model captures medication prescribing records at patient level, including prescribing details, issue cadence, quantities, and lifecycle status.

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.

  • 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.
  • dosage: Prescribing dose instructions.
  • quantity: Quantity prescribed.
  • quantity_unit: Unit for prescribed quantity.
  • prescription_type_description: Prescribing type classification.
  • 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.
  • is_deleted: Indicates whether the source record is soft deleted.
  • transform_datetime: Timestamp when record was transformed.
  • model_updated_datetime: Source model update timestamp.
SELECT
drug_record_id,
patient_id,
code_id,
effective_datetime,
review_date
FROM explorer_open_safely.medication_drug_record
WHERE
is_deleted = FALSE
ORDER BY
effective_datetime DESC
SELECT
drug_record_id,
patient_id,
dosage,
review_date,
organisation
FROM explorer_open_safely.medication_drug_record
WHERE
review_date <= CURRENT_DATE
AND is_deleted = FALSE
ORDER BY
review_date ASC