Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COT-684 removed check on ticket code 362 for Tribunal Member Financially Qualified SSCS #1698

Merged
merged 6 commits into from
Dec 19, 2023
Merged
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
1 change: 0 additions & 1 deletion src/main/resources/judicialProfileSample.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,5 @@
"service_codes": ["BFA2"],
"ticket_code": "374"
}

]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});

Expand All @@ -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());
}
Expand Down