Accounting Domain
Domain Summary
The Accounting domain manages financial accounts and transactions for clients in the healthcare system. It provides functionality for tracking and managing different types of care budgets, including preventive care budgets and care and discharge budgets.
This domain enables healthcare providers to monitor financial resources allocated to clients, book transactions against these accounts, and retrieve account balances. It serves as a critical component for financial management within the healthcare platform.
Architectural Overview
The Accounting domain follows the standard domain architecture pattern.
Entities
-
BankAccountEntity - The aggregate root entity representing a client's bank account with:
- Client identification (clientId)
- Preventive Care account for tracking preventive care budget
- Care and Discharge account for tracking care and discharge budget
- Transaction booking capabilities
- Balance retrieval functionality
-
CareAccountTypes - Enum defining the types of care accounts:
- PREVENTIVE_CARE_BUDGET - Budget allocated for preventive care
- CARE_AND_DISCHARGE_BUDGET - Budget allocated for care and discharge activities
Key Operations
Account Management
- Retrieve bank accounts by client ID
- Create new bank accounts for clients
Transaction Operations
- Book transactions to specific care account types
- Initialize accounts with yearly budgets for preventive care
Balance Operations
- Retrieve balances for specific care account types
- Track financial resources across different budget categories
Integration with Other Domains
The Accounting domain integrates with several other domains:
- Client Domain - Bank accounts are associated with clients via ClientId
- Budget Plan Domain - Uses budget plan information for initializing preventive care budgets
- Shared Kernel - Leverages shared financial components like Account and Transaction