Skip to content
Partner Developer Portal

Definition

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.

FieldDescription
prescription_item_idInternal identifier for the prescription item, unique within an organisation.
prescription_typeType of prescription, for example FP10, Dental, Private, or Hospital.
quantityQuantity of the preparation prescribed to the patient.
is_owedIndicates whether part of the prescribed quantity is still owed.
prescription_statusCurrent status of the prescription, for example new, dispensed, or claim sent.
prescription_item_statusCurrent status of the prescription item, such as To Be Dispensed, Cancelled, or Expired.
treatment_typeTreatment category, such as Acute, Repeat Prescribing, or Repeat Dispensing.
dispensed_date_timeDate and time the prescription item was dispensed.

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.