Merged PR 4952: upgraded screening
# Description Added `has_upgraded_screening_services_business_type` So in the report we can filter by this because currently all bookings should have `has_screening_services_business_type` with BASIC SCREENING # Checklist - [x] The edited models and dependants run properly with production data. - [x] The edited models are sufficiently documented. - [x] The edited models contain PK tests, and I've ran and passed them. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. upgraded screening Related work items: #28640
This commit is contained in:
commit
d4713dbdf3
4 changed files with 29 additions and 0 deletions
|
|
@ -109,6 +109,21 @@ select
|
||||||
then true
|
then true
|
||||||
else false
|
else false
|
||||||
end as has_screening_service_business_type,
|
end as has_screening_service_business_type,
|
||||||
|
case
|
||||||
|
when
|
||||||
|
sum(
|
||||||
|
case
|
||||||
|
when
|
||||||
|
bsd.service_business_type = 'SCREENING'
|
||||||
|
and bsd.service_name <> {{ var("default_service") }}
|
||||||
|
then 1
|
||||||
|
else 0
|
||||||
|
end
|
||||||
|
)
|
||||||
|
> 0
|
||||||
|
then true
|
||||||
|
else false
|
||||||
|
end as has_upgraded_screening_service_business_type,
|
||||||
case
|
case
|
||||||
when
|
when
|
||||||
sum(
|
sum(
|
||||||
|
|
|
||||||
|
|
@ -4398,6 +4398,12 @@ models:
|
||||||
Flag to identify if the booking contains any Screening service
|
Flag to identify if the booking contains any Screening service
|
||||||
or not.
|
or not.
|
||||||
|
|
||||||
|
- name: has_upgraded_screening_service_business_type
|
||||||
|
data_type: boolean
|
||||||
|
description: |
|
||||||
|
Flag to identify if the booking contains any Screening services
|
||||||
|
different from Basic Screening.
|
||||||
|
|
||||||
- name: has_deposit_management_service_business_type
|
- name: has_deposit_management_service_business_type
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@ select
|
||||||
b.is_booking_cancelled as is_booking_cancelled,
|
b.is_booking_cancelled as is_booking_cancelled,
|
||||||
b.has_upgraded_services as has_upgraded_services,
|
b.has_upgraded_services as has_upgraded_services,
|
||||||
b.has_screening_service_business_type as has_screening_service_business_type,
|
b.has_screening_service_business_type as has_screening_service_business_type,
|
||||||
|
b.has_upgraded_screening_service_business_type
|
||||||
|
as has_upgraded_screening_service_business_type,
|
||||||
b.has_deposit_management_service_business_type
|
b.has_deposit_management_service_business_type
|
||||||
as has_deposit_management_service_business_type,
|
as has_deposit_management_service_business_type,
|
||||||
b.has_protection_service_business_type as has_protection_service_business_type
|
b.has_protection_service_business_type as has_protection_service_business_type
|
||||||
|
|
|
||||||
|
|
@ -1464,6 +1464,12 @@ models:
|
||||||
Flag to identify if the booking contains any Screening service
|
Flag to identify if the booking contains any Screening service
|
||||||
or not.
|
or not.
|
||||||
|
|
||||||
|
- name: has_upgraded_screening_service_business_type
|
||||||
|
data_type: boolean
|
||||||
|
description: |
|
||||||
|
Flag to identify if the booking contains any Screening services
|
||||||
|
different from Basic Screening.
|
||||||
|
|
||||||
- name: has_deposit_management_service_business_type
|
- name: has_deposit_management_service_business_type
|
||||||
data_type: boolean
|
data_type: boolean
|
||||||
description: |
|
description: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue