Definition
Overview
Section titled “Overview”mart_attendance_absences is a warehouse model for pharmacy staff leave and absence records. It captures sign-out and sign-in times, destinations, and reasons for leaving, linked back to the parent attendance register entry. Duplicate records are filtered from the mart and routed to the quarantine model.
Key Data Fields
Section titled “Key Data Fields”| Field | Description |
|---|---|
| leave_register_id | Primary identifier for the leave register entry. |
| attendance_register_id | Foreign key linking the absence back to the parent attendance register record. |
| psc_sign_out_time | User-editable time when the staff member signed out. |
| system_sign_out_time | System-recorded time when the staff member signed out. |
| psc_sign_in_time | User-editable time when the staff member signed back in. |
| actual_sign_in_time | System-recorded time when the staff member signed back in. |
| destination | Destination recorded during the leave period. |
| reason_for_leaving | Reason provided for taking leave. |
Source
Section titled “Source”The lineage for this model is: proscript_connect.attendanceregister_leaveregister -> stg_leave_register -> attendance_absences -> mart_attendance_absences.
mart_attendance_absences is materialized as incremental with merge strategy and unique key (organisation, leave_register_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.