Definition
Overview
Section titled “Overview”mart_fridge_log is a warehouse model for pharmacy fridge temperature log entries. It captures minimum and maximum temperature thresholds recorded against named pharmacy locations, supporting compliance and cold-chain monitoring reporting. Duplicate records are filtered from the mart and routed to the quarantine model.
Key Data Fields
Section titled “Key Data Fields”| Field | Description |
|---|---|
| fridge_log_id | Primary identifier for each fridge log entry. |
| date_added | Date the fridge log entry was created. |
| location_name | Name of the pharmacy location where the temperature was recorded. |
| minimum_temperature | Minimum temperature threshold recorded for the fridge. |
| maximum_temperature | Maximum temperature threshold recorded for the fridge. |
| notes | Additional notes recorded against the fridge log entry. |
| pharmacy_name | Pharmacy that owns the fridge log record. |
Source
Section titled “Source”The lineage for this model is: proscript_connect.premisesmanagement_fridgelog -> stg_fridge_log, proscript_connect.premisesmanagement_location -> stg_location, and proscript_connect.dbo_pharmacy -> stg_pharmacy -> active_pharmacy -> fridge_log -> mart_fridge_log.
The upstream fridge_log control model joins stg_fridge_log to stg_location on location_id and organisation, then to active_pharmacy on pharmacy_id and organisation, to resolve the location name and pharmacy context for each log entry.
mart_fridge_log is materialized as incremental with merge strategy and unique key (organisation, fridge_log_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.