Expense Service

Overview

The expense module implements the functionality of bills and payments. A bill or a group of bills can be aggregated together as payments. Payment advice can be submitted through any other third-party payment provider. The expense module always works in combination with a calculator service. The calculator service is implementation-specific and provides business logic to compute bills. The calculator calls into the expense service to create bills. In general, the expense create/update APIs are not called by any other module other than the calculator.

Click here to browse for more information on the sample calculator provided with the Health platform.

Functionalities

  • Create/update/search functionality for bills

  • Ability to create different bill types according to configuration.

  • The workflow is integrated and needs to be configured for usage.

  • Works with an expense calculator that contains the business logic to compute bills.

Deployment Details

Here is a list of variables that needs to be configured in the Helm environment file before deploying the expense service. This file can typically be found under a specific directory or location as given below:

https://github.com/{{ORG}}/DIGIT-DevOps/deploy-as-code/helm/environments/{{EnvironmentFile}}.yaml

Add these β€˜db-host’,’db-name’,’db-url’, ’domain’ and all the digit core platform services configurations (Idgen, workflow, user etc.) in respective environments yaml file.

Add muster-roll-service related environment variables’ value like the way it's done in the β€˜dev’ environment yaml file.

Check the expense persister file is added to the egov-persister.perister-yml-path variable. If not, follow the steps outlined here

Make sure to add the DB(Postgres and flyway) username & password in the respective environment secret YAML file as per the steps outlined here.

Make sure to add the digit core services-related secrets that are configured in the respective environment secret file as per the steps outlined here.

Configure Actions

Add all the APIs exposed (refer to the table below for actual APIs) to the actions.json file in MDMS

Module name: ACCESSCONTROL-ACTIONS-TEST

Master name: actions-test

Configure Roles

Configure roles based on the roles column below in roles.json file.

Module name: ACCESSCONTROL-ROLES

Master name: roles

Configure Role-Action

Role-action mapping is configured in MDMS per the table below.

Module name: ACCESSCONTROL-ROLEACTIONS

Master name: roleactions.json

Roles
API Endpoints

Internal call

/bill/v1/_create

Internal call

/bill/v1/_update

CAMPAIGN_SUPERVISOR

/bill/v1/_search

Other masters to be added

Other expense masters are configured in the common-masters folder:

IdFormat

Last updated

Was this helpful?