data-to-insight / csc-validator-be-903

Python-side code for the Quality LAC Data Beta frontend
https://903.datatoinsight.org
MIT License
8 stars 4 forks source link

Error code SW11bSTG2 [Added 2023 v1.2] #783

Open SLornieCYC opened 3 months ago

SLornieCYC commented 3 months ago

Note: This rule was added by DFE in the 2023/24 v1.2 validation check document. It replaces SW11STG2 (#679)

Error information

Error code

SW11bSTG2

Description to display

There should be a social worker episode open on 31 March. Social worker episode has ended before 31 March and no subsequent social worker episode has been provided.

DfE Long-form description of error

The social worker episode has ended before 31 March and no following social worker episode has been provided. All social worker episodes should be provided for the time period 1 April to 31 March for a child looked after on 31 March, including periods when the child was no longer looked after if they still had a social worker, Missing social worker episodes should be added. If there is no social worker on 31 March then please request a bypass and provide a reason.

DfE suggested coding

If <SW_DEC> >= (<COLLECTION_END_DATE> - 5 days) then next social worker episode <SW_DECOM> must be present

For further info, refer to the DfE validation document here