Skip to content
Partner Developer Portal

Definition

mart_rds is a warehouse mart for Remote Dispensing System activity in Community Pharmacy. It captures order and order-item level events with dispensing/check workflow detail, patient context, and quantities ordered versus received. Duplicate records are filtered from the mart and routed to the quarantine model.

FieldDescription
ods_order_idIdentifier for the RDS order.
ods_order_item_idIdentifier for the RDS order item within an order.
local_dispenseIndicates whether the item was dispensed locally.
item_status_reasonStatus reason recorded for the order item.
action_descriptionDescription of the latest relevant action for the order item.
quantity_orderedQuantity requested for the order item.
quantity_receivedQuantity confirmed as received from the service response.
date_accuracy_checkedTimestamp when the order item accuracy check was completed.

The lineage for this model is: psc RDS order and order item source tables -> staging RDS/prescribing/patient/user models -> rds -> mart_rds.

The upstream control model joins stg_rds_ods_order, stg_rds_ods_order_item, stg_rds_ods_order_item_action, stg_rds_ods_order_item_status, stg_rds_ods_order_item_tote, stg_prescription, stg_prescription_item, stg_pharmacy_patient, stg_pharmacy_user, stg_pharmacy_user_in_role, stg_pharmacist, and active_pharmacy to produce enriched RDS rows.

mart_rds is materialized as incremental with merge strategy and unique key (organisation, ods_order_id, ods_order_item_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.