Definition
Overview
Section titled “Overview”mart_epharmacy_registration contains Scotland ePharmacy registration requests for the CMS, MAS, and AMS services. It combines registration status and request type with patient and pharmacy details, and uses the latest qualifying registration history record to provide the patient’s CHI number.
Key Data Fields
Section titled “Key Data Fields”| Field | Description |
|---|---|
| registration_request_id | Registration request identifier. |
| registration_request_guid | Registration request GUID from SETP registration requests. |
| service_type | Scotland service type description from registration request data. |
| registration_status | Registration status description from registration request data. |
| registration_request_type | Registration request type description from registration request data. |
| patient_chi_number | CHI number from the latest qualifying registration request history row. |
| registration_added_date | Registration request created timestamp. |
| registration_modified_date | Registration request modified timestamp. |
Source
Section titled “Source”The source tables are ProScript Connect setp_registrationrequest and
setp_registrationrequesthistory, with service type, request type, and
registration status lookups. The lineage is proscript_connect source tables ->
stg_setp_registration_request and related staging models ->
epharmacy_registration -> mart_epharmacy_registration. The control model
also joins stg_pharmacy_patient and active_pharmacy, and filters to CMS,
MAS, and AMS requests for patients that are not deleted.
mart_epharmacy_registration is incremental with merge strategy and unique key
(organisation, registration_request_id). Incremental updates are triggered by
ingestion dates for registration requests, service types, request types,
registration statuses, and patients, plus the pharmacy updated date. Duplicate
rows are reduced to one registration request and routed to the quarantine model.