Definition
Overview
Section titled “Overview”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.
Key Data Fields
Section titled “Key Data Fields”| Field | Description |
|---|---|
| prescription_item_dispensed_id | Unique identifier for the dispensed prescription item within an organisation. |
| prescription_item_id | Identifier for the underlying prescribed item linked to the dispensed record. |
| dispensed_date_time | Date and time when the item was dispensed. |
| dispensed_quantity | Quantity dispensed for the item event. |
| is_dispensing_activity | True when quantity is positive, item is not deleted, and item was given. |
| off_site_fulfilment | Indicates whether the item was fulfilled or dispensed off-site. |
| prescribed_product | Product name for the prescribed preparation context. |
| dispensed_pack_code_id | Pack identifier for the dispensed item. |
Source
Section titled “Source”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.