Purpose
- Validates that the claim's fee code maps to a category of law that the provider (office) is contracted to provide for the claim's effective date.
How it works
- Determine the
effectiveDatefor the claim usingClaimEffectiveDateUtil.getEffectiveDate(claim)(may use case dates / submission period etc.). - Call the Provider Details API via
HttpProviderDetailsProvider.getProviderFirmSchedules(officeCode, effectiveDate)to retrieve the provider's schedule lines and extract the categories of law the provider is contracted for. - Call the Fee Scheme API via
FeeSchemeClient.getFeeDetails(feeCode)to retrieve theFeeDetailsResponseand readcategoryOfLawCodefrom the fee details. - If the fee details are missing or
categoryOfLawCodeis null -> addINVALID_CATEGORY_OF_LAW_AND_FEE_CODE. - If the provider's categories do not contain the fee's categoryOfLaw -> add
INVALID_CATEGORY_OF_LAW_NOT_AUTHORISED_FOR_PROVIDER.
Priority & scope
- Priority: 1000.
- Applies to scope:
feeandallonly.
Error handling & technical issues
- Network or API errors when calling provider details are handled and result in a
TECHNICAL_ERROR_PROVIDER_DETAILS_APIvalidation issue containing technical details. The validator logs errors with context (officeCode, effectiveDate).
Configuration points
- This validator depends on API client configuration provided by
FeeSchemeApiConfigandProviderDetailsApiConfig(see README configuration section). Ensure thelaa.fee-scheme-platform-api.urlandlaa.provider-details-api.urlsettings are configured correctly for production or tests.
Notes
- This validator performs network calls and therefore can introduce latency; it runs at a later priority so earlier cheap validations filter out bad requests.
- Because it depends on external data, ensure appropriate caching or rate-limiting is in place upstream if high throughput is expected.