Implementation of the scoring configuration module
CLEA need to be flexible and apply various scoring configuration depending of the venue type, category1 and category2 of a specific location.
Scoring rules are defined according to the pattern :
- Risk rule : venueType, venueCat1, venueCat2, clusterThresholdBackward, clusterThresholdForward, riskLevelBackward, riskLevelForward
- Exposure time rule : venueType, venueCat1, venueCat2, exposureTimeBackward, exposureTimeForward, exposureTimeStaffBackward, exposureTimeStaffForward
A wildcard is available (*) and mean "any of"
Example for exposure time : '3,WILDCARD,WILDCARD,3,3,3,3' means => for venueType 3, any venueCat1 and any venueCat2, all values are 3.
- Exposure time configuration is injected and used by the clea-consumer
- Risk configuration is injected and used by the clea-batch
For a venue (tuple of venueType, venueCat1 and venueCat2), only one rule is returned, the most specific one.
Priority is venueType > venueCat1 > venueCat2.
Validators ensure that at least a default rule is available to be applied and VenueType must be specified if it is not the default rule