Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Databricks/ACTIVE/APPEALS/Active_Functions/DQRules.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def base_DQRules():
checks["valid_decisionLetterReceivedDate_format"] = (
"( (decisionLetterReceivedDate IS NOT NULL AND decisionLetterReceivedDate RLIKE r'^\\d{4}-\\d{2}-\\d{2}$' "
"AND array_contains(valid_categoryIdList, 38) "
"AND (lu_HORef LIKE '%GWF%' OR HORef LIKE '%GWF%' OR FCONumber LIKE '%GWF%')) "
"AND (lu_HORef NOT LIKE '%GWF%' OR HORef NOT LIKE '%GWF%' OR FCONumber NOT LIKE '%GWF%')) "
"OR (decisionLetterReceivedDate IS NULL) )"
)

Expand Down
3 changes: 2 additions & 1 deletion Databricks/ACTIVE/APPEALS/Active_Functions/paymentPending.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def map_postcode_to_hearing_centre(postcode):
how="left").join(silver_m2.alias("m2"), col("m1.CaseNo") == col("m2.CaseNo"), how="left") \
.withColumn("map_postcode_to_hearing_centre",
when((col("h.der_prevFileLocation").isin("Arnhem House","Arnhem House (Exceptions)","Loughborough","North Shields (Kings Court)","Not known at this time") | col("h.der_prevFileLocation").isNull()),
map_postcode_to_hearing_centre_udf(coalesce(col('m1.Rep_Postcode'),col('m1.CaseRep_Postcode'),('m2.Appellant_Postcode')))).otherwise(None)) \
coalesce(map_postcode_to_hearing_centre_udf(coalesce(col('m1.Rep_Postcode'),col('m1.CaseRep_Postcode'),('m2.Appellant_Postcode'))),lit("newport"))
).otherwise(None)) \
.join(bronze_derive_hearing_centres.alias("bhc3"), col("map_postcode_to_hearing_centre") == col("bhc3.hearingCentre"), how="left") \
.select(
col("m1.CaseNo"),
Expand Down
50 changes: 40 additions & 10 deletions Databricks/ACTIVE/APPEALS/GOLD_PAYMENT_PENDING_JSON.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "18504bdf-794e-4966-b290-b635328c3ed0",
"showTitle": false,
Expand Down Expand Up @@ -290,7 +293,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "a6b49dac-308d-447a-8532-b56207d5350c",
"showTitle": false,
Expand Down Expand Up @@ -432,7 +438,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "d1b86460-a200-4c6b-9bf1-382b6bc1e8db",
"showTitle": false,
Expand Down Expand Up @@ -548,7 +557,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "9a2e4c75-b6e3-403f-99f8-ca27a6e03b05",
"showTitle": false,
Expand All @@ -564,7 +576,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "b9dc2f07-0f34-46eb-a4fc-73e29b7966e1",
"showTitle": false,
Expand Down Expand Up @@ -1004,7 +1019,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "cd194be7-d459-40fb-b7fb-e1754f659817",
"showTitle": false,
Expand Down Expand Up @@ -1110,7 +1128,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "8ee255ab-a380-4564-b454-2c10e65707a5",
"showTitle": false,
Expand All @@ -1126,7 +1147,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "3966a5d7-de3a-467e-b1ed-04809e2d256b",
"showTitle": false,
Expand Down Expand Up @@ -1483,7 +1507,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "89fdf409-78a7-47f2-bbcf-d4b001ea7051",
"showTitle": false,
Expand All @@ -1499,7 +1526,10 @@
"cell_type": "markdown",
"metadata": {
"application/vnd.databricks.v1+cell": {
"cellMetadata": {},
"cellMetadata": {
"byteLimit": 2048000,
"rowLimit": 10000
},
"inputWidgets": {},
"nuid": "9edb7ba9-63ab-47ee-ac6a-245d6f2c0dc5",
"showTitle": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ def base_DQRules():
checks["valid_decisionLetterReceivedDate_format"] = (
"( (decisionLetterReceivedDate IS NOT NULL AND decisionLetterReceivedDate RLIKE r'^\\d{4}-\\d{2}-\\d{2}$' "
"AND array_contains(valid_categoryIdList, 38) "
"AND (lu_HORef LIKE '%GWF%' OR HORef LIKE '%GWF%' OR FCONumber LIKE '%GWF%')) "
"AND (lu_HORef NOT LIKE '%GWF%' OR HORef NOT LIKE '%GWF%' OR FCONumber NOT LIKE '%GWF%')) "
"OR (decisionLetterReceivedDate IS NULL) )"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def map_postcode_to_hearing_centre(postcode):
how="left").join(silver_m2.alias("m2"), col("m1.CaseNo") == col("m2.CaseNo"), how="left") \
.withColumn("map_postcode_to_hearing_centre",
when((col("h.der_prevFileLocation").isin("Arnhem House","Arnhem House (Exceptions)","Loughborough","North Shields (Kings Court)","Not known at this time") | col("h.der_prevFileLocation").isNull()),
map_postcode_to_hearing_centre_udf(coalesce(col('m1.Rep_Postcode'),col('m1.CaseRep_Postcode'),('m2.Appellant_Postcode')))).otherwise(None)) \
coalesce(map_postcode_to_hearing_centre_udf(coalesce(col('m1.Rep_Postcode'),col('m1.CaseRep_Postcode'),('m2.Appellant_Postcode'))),lit("newport"))
).otherwise(None)) \
.join(bronze_derive_hearing_centres.alias("bhc3"), col("map_postcode_to_hearing_centre") == col("bhc3.hearingCentre"), how="left") \
.select(
col("m1.CaseNo"),
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion ReferenceData/remissions.csv
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
1,5,Convention Case,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED
1,6,Other,exceptionalCircumstancesRemission,OMIT,OMIT,"""This is a migrated ARIA case. The remission reason was Other. Please see the documents for further information.""",OMIT,OMIT,OMIT
1,7,S20 Childrens Act,hoWaiverRemission,section20,Section 20,OMIT,OMIT,OMIT,OMIT
1,8,Home Office Waiver,hoWaiverRemission,hoWaiverRemission,Home Office fee waiver,OMIT,OMIT,OMIT,OMIT
1,8,Home Office Waiver,hoWaiverRemission,homeOfficeWavier,Home Office fee waiver,OMIT,OMIT,OMIT,OMIT
1,9,Help with Fees,helpWithFees,OMIT,OMIT,OMIT,OMIT,OMIT,M1.PaymentRemissionReasonNote; ELSE IF NULL 'Unknown'
1,10,Paid on CCD,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED,NO MAPPING REQUIRED