Definition
Overview
Section titled “Overview”mart_prescribing contains prescription-item level records for prescriptions received by a pharmacy, including both electronic and paper pathways. It combines prescribing, patient, prescriber, surgery, product, and pharmacy context so each row can be analyzed as a complete item-level prescribing event. Duplicate records are filtered from the mart and routed to the quarantine model.
Key Data Fields
Section titled “Key Data Fields”| Field | Description |
|---|---|
| prescription_item_id | Internal identifier for the prescription item, unique within an organisation. |
| prescription_type | Type of prescription, for example FP10, Dental, Private, or Hospital. |
| quantity | Quantity of the preparation prescribed to the patient. |
| is_owed | Indicates whether part of the prescribed quantity is still owed. |
| prescription_status | Current status of the prescription, for example new, dispensed, or claim sent. |
| prescription_item_status | Current status of the prescription item, such as To Be Dispensed, Cancelled, or Expired. |
| treatment_type | Treatment category, such as Acute, Repeat Prescribing, or Repeat Dispensing. |
| dispensed_date_time | Date and time the prescription item was dispensed. |
Source
Section titled “Source”The lineage for this model is:
ProScript Connect prescribing source tables -> stg_prescription, stg_prescription_item, stg_prescription_status, stg_prescription_type, stg_prescription_item_dispensed, stg_pharmacy_patient, stg_patient_identifier -> prescribing_surgery, prescriber, fact_electronic_prescribing, dim_preparation, active_pharmacy -> prescribing -> mart_prescribing.
mart_prescribing is materialized as incremental with merge strategy and unique key (organisation, prescription_item_id). Incremental updates are driven by the mart incremental filter and row hash comparison (row_id), so changed or new rows are inserted or updated while unchanged rows are skipped.