Fee calculator for LAA
For development setup see instructions here
Load data into calculator
Swagger docs are accessible at
/api/v1/fee-schemes/?type=<type>&case_date=<case_date> to get the appropriate scheme.
/api/v1/fee-schemes/<scheme_id>/scenarios/ /api/v1/fee-schemes/<scheme_id>/offence-classes/ /api/v1/fee-schemes/<scheme_id>/advocate-types/
to get the options for these values.
Once all of these choices have been made, use the values to request:
This will give you a list of fee types which are applicable for the situation
For each applicable fee type, find out the information required by the user by requesting the relevant units and modifiers:
Make a request to the calculate endpoint as shown:
<unit_id>=<number_of_units> for each applicable unit of the fee type eg for the basic fee of a trial that was 6 days long with 1002 pages of evidence and 2 witnesses one would add:
For modifiers, for every request to the calculate endpoint, add additional URL parameters of the form
<modifier_type_name>=<number_of_units> eg if there are 3 defendants and 2 cases one would add:
to the calculate request.
This should then return a response of the form:
which is the total price for that fee, taking into account differing prices for different counts and all modifiers.
For example when calculating the basic advocate's fee, if the number of days attended is 45, under Scheme 9 the returned amount will include the fixed fee for the first 2 days, the daily fee for days 3-40 and the reduced daily fee for days 41-45.
As well as the calculator endpoint, one can also get a list of prices directly from the endpoint
/api/v1/fee-schemes/<scheme_id>/prices/. See swagger documentation for available filters.
Currently a commit to master will kickoff the AWS pipeline and deploy to the only environment existent at the moment.
- To check where the application is running:
kubectl get ingress --namespace laa-fee-calculator-dev NAME HOSTS ADDRESS PORTS AGE laa-fee-dev laa-fee-calculator-dev.apps.non-production.k8s.integration.dsd.io
- To check what is the status of the application pods:
kubectl get pods -n laa-fee-calculator-dev NAME READY STATUS RESTARTS AGE laa-fee-dev-app-6644dfb5d6-znbmx 1/1 Running 0 4m laa-fee-dev-db-84bfb9d45c-68grw 1/1 Running 0 73d tiller-deploy-5cf7859b7c-xg86p 1/1 Running 0 19d