Skip to content
Partner Developer Portal

Definition

mart_dispensing contains dispensing-event records at prescription-item dispensed level for Community Pharmacy. It combines dispensed item facts with prescribed item context, product pack details, patient and nursing home address context, and operational indicators such as owing and off-site fulfilment. Duplicate records are filtered from the mart and routed to the quarantine model.

FieldDescription
prescription_item_dispensed_idUnique identifier for the dispensed prescription item within an organisation.
prescription_item_idIdentifier for the underlying prescribed item linked to the dispensed record.
dispensed_date_timeDate and time when the item was dispensed.
dispensed_quantityQuantity dispensed for the item event.
is_dispensing_activityTrue when quantity is positive, item is not deleted, and item was given.
off_site_fulfilmentIndicates whether the item was fulfilled or dispensed off-site.
prescribed_productProduct name for the prescribed preparation context.
dispensed_pack_code_idPack identifier for the dispensed item.

The lineage for this model is: ProScript Connect dispensing and prescribing source tables -> stg_prescription_item_dispensed, mart_prescribing, dim_product_pack, dim_preparation, stg_pharmacy_patient, stg_address, patient_nursing_home, and RDS bulk dispense staging models -> dispensing -> mart_dispensing.

mart_dispensing is materialized as incremental with merge strategy and unique key (organisation, prescription_item_dispensed_id). Incremental updates are driven by the mart incremental filter and row hash comparison (row_id), so changed or new records are inserted or updated while unchanged rows are skipped.