Skip to content

Commit b232e9f

Browse files
committed
ssd_cla_placement to ensure that restricted address detail no longer populates
1 parent 000c042 commit b232e9f

2 files changed

Lines changed: 41 additions & 10 deletions

File tree

‎deployment_extracts/ssd_version_history.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,21 @@ meta:
55
owner: "Data to Insight"
66
status: "Release"
77

8-
current_version: "1.4.7"
8+
current_version: "1.4.8"
99

1010
releases:
11+
- version_number: "1.4.8"
12+
release_date: "2025-08-21"
13+
includes_changes: >
14+
Change to ssd_cla_placement to ensure that restricted address detail no longer populates.
15+
Postcode data is replaced with (upper)"CON" string - ssd_Address adjusted also to reflect this case
16+
impact_description: >
17+
prev address change now to be reflected in placement data also. Enforce uppercase on CON string
18+
Change deemed essential as SSD schema retains data outside CMS permissions/protections.
19+
impacts_cms_deployment:
20+
- "systemc"
21+
22+
1123
- version_number: "1.4.7"
1224
release_date: "2025-08-14"
1325
includes_changes: >

deployment_extracts/systemc/live/ssd_deployment_individual_files/systemc_sqlserver_v1.4.7_1_20260814.sql renamed to deployment_extracts/systemc/live/ssd_deployment_individual_files/systemc_sqlserver_v1.4.8_1_20260821.sql

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,14 +1343,14 @@ END
13431343
END AS IsProtected,
13441344

13451345
-- Postcode cleanse rules:
1346-
-- * Protected addresses -> 'con'
1346+
-- * Protected addresses -> 'CON'
13471347
-- * All-X postcodes -> ''
13481348
-- * 'nopostcode' -> ''
13491349
-- * Otherwise retain trimmed postcode
13501350
CASE
13511351
WHEN UPPER(ISNULL(pa.CONFIDENTIAL, 'N')) = 'Y'
13521352
OR UPPER(ISNULL(pa.IS_RESTRICTED_FLAG, 'N')) = 'Y'
1353-
THEN 'con'
1353+
THEN 'CON' -- confidential/restricted mask
13541354
WHEN REPLACE(pa.POSTCODE, ' ', '') =
13551355
REPLICATE('X', LEN(REPLACE(pa.POSTCODE, ' ', '')))
13561356
THEN ''
@@ -4370,9 +4370,10 @@ PRINT 'Table created: ' + @TableName;
43704370
-- =============================================================================
43714371
-- Description:
43724372
-- Author: D2I
4373-
-- Version: 1.0
4374-
-- 0.2: 060324 JH
4375-
-- 0.1: Corrected/removal of placement_la & episode_id 090124 RH
4373+
-- Version: 1.1
4374+
-- 1.0 placement_postcode CON mask for restricted address added 210826 RH
4375+
-- 0.2: 060324 JH
4376+
-- 0.1: Corrected/removal of placement_la & episode_id 090124 RH
43764377
-- Status: [R]elease
43774378
-- Remarks: [EA_API_PRIORITY_TABLE]
43784379
-- DEV: filtering for OFSTED_URN LIKE 'SC%'
@@ -4445,10 +4446,28 @@ SELECT
44454446
TRY_CAST(fcp.DISTANCE_FROM_HOME AS FLOAT) AS clap_cla_placement_distance, -- convert to FLOAT (source col is nvarchar, also holds nulls/ints)
44464447
fcp.DIM_LOOKUP_PLACEMENT_PROVIDER_CODE AS clap_cla_placement_provider,
44474448

4448-
CASE -- removal of common/invalid placeholder data i.e ZZZ, XX
4449-
WHEN LEN(LTRIM(RTRIM(fcp.POSTCODE))) <= 4 THEN NULL
4450-
ELSE LTRIM(RTRIM(fcp.POSTCODE)) -- simplistic clean-up
4451-
END AS clap_cla_placement_postcode,
4449+
CASE
4450+
WHEN EXISTS
4451+
(
4452+
SELECT 1
4453+
-- if child had ANY protected/CON address instance
4454+
-- we CON mask the placement location
4455+
FROM HDM.Child_Social.DIM_PERSON_ADDRESS pa
4456+
WHERE pa.DIM_PERSON_ID = fcp.DIM_PERSON_ID
4457+
AND (
4458+
UPPER(ISNULL(pa.CONFIDENTIAL, 'N')) = 'Y'
4459+
OR UPPER(ISNULL(pa.IS_RESTRICTED_FLAG, 'N')) = 'Y'
4460+
)
4461+
)
4462+
THEN 'CON'
4463+
4464+
-- clean common/invalid placeholder data i.e ZZZ, XX
4465+
WHEN LEN(LTRIM(RTRIM(fcp.POSTCODE))) <= 4
4466+
THEN NULL
4467+
4468+
ELSE LTRIM(RTRIM(fcp.POSTCODE))
4469+
END AS clap_cla_placement_postcode,
4470+
44524471
fcp.END_DTTM AS clap_cla_placement_end_date,
44534472
fcp.DIM_LOOKUP_PLAC_CHNG_REAS_CODE AS clap_cla_placement_change_reason
44544473

0 commit comments

Comments
 (0)