diff --git a/src/main/resources/judicialProfileSample.json b/src/main/resources/judicialProfileSample.json index 862078015..aeaaa30d4 100644 --- a/src/main/resources/judicialProfileSample.json +++ b/src/main/resources/judicialProfileSample.json @@ -61,6 +61,5 @@ "service_codes": ["BFA2"], "ticket_code": "374" } - ] } \ No newline at end of file diff --git a/src/main/resources/validationrules/sscs/sscs-judicial-office-holder-mapping.drl b/src/main/resources/validationrules/sscs/sscs-judicial-office-holder-mapping.drl index d1a87d79f..e7870b5e3 100644 --- a/src/main/resources/validationrules/sscs/sscs-judicial-office-holder-mapping.drl +++ b/src/main/resources/validationrules/sscs/sscs-judicial-office-holder-mapping.drl @@ -268,7 +268,6 @@ when $jap: JudicialAccessProfile(appointment == "Tribunal Member Financially Qualified", appointmentType == "Fee Paid", baseLocationId == "1032", - ticketCodes != null && ticketCodes.contains("362"), (endTime == null || endTime.compareTo(ZonedDateTime.now()) >= 0), validateAuthorisation(authorisations, "BBA3")) then diff --git a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolSscsJudicialOfficeMappingTest.java b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolSscsJudicialOfficeMappingTest.java index b4e4a571f..f628103cd 100644 --- a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolSscsJudicialOfficeMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolSscsJudicialOfficeMappingTest.java @@ -71,26 +71,27 @@ void shouldReturSalariedRoles(String appointment, String appointmentType, //=================================FEE-PAID ROLES================================== @ParameterizedTest @CsvSource({ - "Tribunal Judge,Fee Paid,BBA3,'fee-paid-judge,hmcts-judiciary'", - "Tribunal Member Medical,Fee Paid,BBA3,'fee-paid-medical,hmcts-judiciary'", - "Tribunal Member Optometrist,Fee Paid,BBA3,'fee-paid-medical,hmcts-judiciary'", - "Tribunal Member Disability,Fee Paid,BBA3,'fee-paid-disability,hmcts-judiciary'", - "Tribunal Member,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary'", - "Tribunal Member Lay,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary'", - "Tribunal Member Service,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary'", - "Tribunal Member Financially Qualified,Fee Paid,BBA3,'fee-paid-financial,hmcts-judiciary'" + "Tribunal Judge,Fee Paid,BBA3,'fee-paid-judge,hmcts-judiciary','371'", + "Tribunal Member Medical,Fee Paid,BBA3,'fee-paid-medical,hmcts-judiciary','371'", + "Tribunal Member Optometrist,Fee Paid,BBA3,'fee-paid-medical,hmcts-judiciary','371'", + "Tribunal Member Disability,Fee Paid,BBA3,'fee-paid-disability,hmcts-judiciary','371'", + "Tribunal Member,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary','371'", + "Tribunal Member Lay,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary','371'", + "Tribunal Member Service,Fee Paid,BBA3,'fee-paid-tribunal-member,hmcts-judiciary','371'", + "Tribunal Member Financially Qualified,Fee Paid,BBA3,'fee-paid-financial,hmcts-judiciary','372'", + "Tribunal Member Financially Qualified,Fee Paid,BBA3,'fee-paid-financial,hmcts-judiciary','362'" }) void shouldReturnTribunalMemberMedicalFeePaidRoles2(String appointment, String appointmentType, - String serviceCode, String expectedRoles) { + String serviceCode, String expectedRoles, String ticketCode) { judicialAccessProfiles.forEach(judicialAccessProfile -> { judicialAccessProfile.setAppointment(appointment); judicialAccessProfile.setAppointmentType(appointmentType); judicialAccessProfile.setBaseLocationId("1032"); - judicialAccessProfile.setTicketCodes(List.of("362")); + judicialAccessProfile.setTicketCodes(List.of(ticketCode)); judicialAccessProfile.getAuthorisations().forEach(a -> { a.setServiceCodes(List.of(serviceCode)); - a.setTicketCode("362"); + a.setTicketCode(ticketCode); }); }); @@ -108,7 +109,7 @@ void shouldReturnTribunalMemberMedicalFeePaidRoles2(String appointment, String a assertNull(r.getAuthorisations()); assertNull(r.getAttributes().get("primaryLocation")); } else { - assertEquals("[362]", r.getAuthorisations().toString()); + assertEquals("[" + ticketCode + "]", r.getAuthorisations().toString()); assertEquals("primary location", r.getAttributes().get("primaryLocation").asText()); assertEquals("SSCS", r.getAttributes().get("jurisdiction").asText()); }