Skip to content
Partner Developer Portal

Definition

mart_mds is a warehouse model for Monitored Dosage System (MDS) activity at patient-item level. It combines patient, pharmacy, nursing home, and product context to support operational reporting on MDS medicines and dispensing timelines. Duplicate records are filtered from the mart and routed to the quarantine model.

FieldDescription
mds_item_idPrimary identifier for each MDS item record.
patient_full_nameFormatted patient name used for operational review.
nursing_home_nameName of the nursing home linked to the patient where applicable.
nursing_home_typeCategory of nursing home associated with the patient.
dispensed_dateDate and time when the matching item was dispensed.
product_nameProduct description for the dispensed pack.
quantityQuantity recorded for the MDS item.
pharmacy_namePharmacy name for the organisation that owns the record.

The lineage for this model is: proscript_connect MDS, prescription, patient, nursing home, pharmacy, and PKB pack source tables -> stg_mds_item, stg_prescription, stg_prescription_item, stg_prescription_item_dispensed, stg_pharmacy_patient, stg_nursing_home, stg_nursing_home_type, active_pharmacy, and dim_product_pack -> mds -> mart_mds.

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