Skip to main content

Billing Domain

Domain Summary

The Billing domain manages the financial billing processes for healthcare services provided to clients. It handles the creation, validation, issuance, and tracking of invoices for care services, as well as generating various reports required for billing and compliance purposes.

This domain enables healthcare providers to bill clients, funding agencies, and insurance companies for services rendered, track billing periods, generate required documentation, and integrate with external financial systems. It serves as a critical component for revenue management within the healthcare platform.

Architectural Overview

The Billing domain follows the standard domain architecture pattern.

Entities

  1. ClientBillingPeriodEntity - The aggregate root entity representing a billing period for a client with:

    • Client and residential park identification
    • Billing period month and date range
    • Billing status (OPEN, FINALIZED, ISSUED, COMPLETED)
    • Collection of invoices
    • Various reports (performance, blood sugar insulin, report sheet)
    • Work unit tracking
  2. Invoice - Entity representing an invoice with:

    • Basic information (invoice number, date, recipient)
    • Financial details (total amount, tax information)
    • Collection of invoice positions
    • Status tracking
    • Associated documents (PDF, DTA files)
    • Integration with external systems (Odoo, AS Bremen)
  3. InvoicePosition - Entity representing a line item on an invoice with:

    • Service description
    • Quantity and unit price
    • Total amount
    • Benefit product information
  4. Reports

    • PerformanceReport - Report of care services performed
    • BloodSugarInsulinReport - Report of blood sugar and insulin measurements
    • ReportSheetReport - General report sheet for care services
    • DividedPerformanceReport - Performance report divided by funding source

Key Operations

Billing Period Management

  • Create and retrieve billing periods for clients
  • Recreate billing periods for clients or residential parks
  • Apply work items to billing periods
  • Track and update billing period status

Invoice Management

  • Create invoices for client billing periods
  • Validate and revalidate invoices
  • Issue invoices to recipients
  • Track invoice status through the billing lifecycle

Report Generation

  • Generate performance reports
  • Generate blood sugar and insulin reports
  • Generate report sheets
  • Sign reports with employee signatures

Document Generation

  • Render invoice PDFs
  • Generate DTA (Data Transfer and Accumulation) files
  • Create billing documentation for compliance

External System Integration

  • Integrate with Odoo for financial management
  • Send invoices to AS Bremen for processing
  • Track external system status and responses

Validation and Compliance

  • Validate invoices against business rules
  • Ensure compliance with healthcare billing regulations
  • Track and manage validation responses

Integration with Other Domains

The Billing domain integrates with several other domains:

  1. Client Domain - Billing periods and invoices are associated with clients
  2. Residential Park Domain - Billing is organized by residential parks
  3. Employee Domain - Employees sign reports and perform billable services
  4. Tour Planning Domain - Tour work items contribute to billable services
  5. Funding Agency Domain - Funding agencies are invoice recipients
  6. PDF Generator Domain - Used to generate invoice and report PDFs
  7. Odoo Domain - Integration with Odoo for financial management