Financial Management - Technical Specification
Case accounting and financial transaction processing
Purpose
The Financial Management module handles all financial aspects of legal cases including case account creation, cost tracking, journal entry generation, and integration with Business Central. It manages the financial lifecycle from initial case creation through settlement, tracking medical costs, calculating balances, and generating appropriate journal entries for the general ledger. The module ensures accurate financial reporting and seamless synchronization with the enterprise financial system.
Key Concepts
| Term | Definition |
|---|---|
| Case Account | Financial account tied to each legal case |
| Journal Entry | General ledger transaction record |
| Journal Template | Predefined pattern for journal entries |
| Debit/Credit | Double-entry bookkeeping entries |
| Case Balance | Running total of case financial position |
| Retail Amount | Standard charge before contractual adjustment |
| Contracted Amount | Negotiated rate per contract |
| Write-Off | Contractual adjustment amount |
| Account Status | Current state of case account |
| Business Central | Microsoft ERP system for financial management |
User Roles
| Role | Description | Permissions |
|---|---|---|
| Financial Analyst | Manages case finances | Full CRUD |
| Accounting Manager | Oversees journal entries | Create, Read, Update, Approve |
| Case Manager | Views case financials | Read only |
| CFO/Controller | Financial oversight | Read, Approve, Reports |
| Auditor | Reviews transactions | Read, Audit access |
| System Administrator | System configuration | All permissions |
Field Documentation - Case Account Entity
| Field Name | Type | Required | Description | Validation Rules | Related Entity |
|---|---|---|---|---|---|
| ID | String | Yes | Unique account ID | Auto-generated CUID | Primary Key |
| Account Number | String | Yes | Human-readable number | Format: CA-YYYY-XXXXXXX | - |
| Legal Case | LegalCase | Yes | Associated legal case | One-to-one relationship | LegalCase |
| Patient | Patient | Yes | Case patient | Must match legal case | Patient |
| MRN | String | Yes | Member Registration Number | From legal case | - |
| Account Status | String | Yes | Current status | Enum: Active, Hold, Closed, Written Off | - |
| Status Reason | String | No | Reason for status | Required for Hold/Written Off | - |
| Status Date | DateTime | Yes | When status changed | Auto-set on change | - |
| Opening Date | DateTime | Yes | Account creation date | Matches case creation | - |
| Closing Date | DateTime | No | Account closure date | Required for Closed status | - |
| Total Retail Charges | Decimal | Yes | Sum of all retail charges | Calculated field, >= 0 | - |
| Total Contracted Amount | Decimal | Yes | Sum of contracted amounts | Calculated field, >= 0 | - |
| Total Adjustments | Decimal | Yes | Total write-offs | Calculated: Retail - Contracted | - |
| Total Payments | Decimal | Yes | Payments received | Sum of all payments, >= 0 | - |
| Current Balance | Decimal | Yes | Outstanding amount | Contracted - Payments | - |
| Medical Lien Amount | Decimal | Yes | Total medical liens | Sum of all liens, >= 0 | - |
| Attorney Fees | Decimal | No | Estimated attorney fees | Based on fee percentage | - |
| Settlement Amount | Decimal | No | Case settlement value | From legal case | - |
| Settlement Date | DateTime | No | When case settled | From legal case | - |
| Patient Portion | Decimal | No | Patient responsibility | Usually 0 for legal cases | - |
| Insurance Portion | Decimal | No | Insurance responsibility | If applicable | - |
| Legal Case Portion | Decimal | Yes | Case responsibility | Usually 100% | - |
| Credit Limit | Decimal | No | Maximum allowed charges | Set by policy | - |
| Over Limit | Boolean | Yes | Exceeds credit limit | Calculated field | - |
| Last Activity Date | DateTime | Yes | Last transaction date | Auto-updated | - |
| Days Since Activity | Integer | Yes | Days since last transaction | Calculated field | - |
| Aging Bucket | String | Yes | Age category | Enum: Current, 30, 60, 90, 120+ | - |
| Collection Status | String | No | Collection state | Enum: None, Pending, In Collection | - |
| Business Central ID | String | No | BC customer number | From BC sync | - |
| BC Sync Status | String | Yes | Sync state | Enum: Pending, Synced, Error | - |
| BC Last Sync | DateTime | No | Last sync timestamp | Set on sync | - |
| GL Account Codes | Text | No | Associated GL accounts | JSON array | - |
| Cost Center | String | No | Financial cost center | From configuration | - |
| Department | String | No | Financial department | From configuration | - |
| Financial Notes | Text | No | Accounting notes | Max 5000 chars | - |
| Created At | DateTime | Yes | Creation timestamp | Auto-generated | - |
| Updated At | DateTime | Yes | Update timestamp | Auto-updated | - |
| Created By | User | Yes | Creating user | Valid user ID | User |
| Updated By | User | Yes | Updating user | Valid user ID | User |
| Journal Entries | JournalEntry[] | No | Related journal entries | - | JournalEntry (1:Many) |
| Transactions | Transaction[] | No | Financial transactions | - | Transaction (1:Many) |
Field Documentation - Journal Entry Entity
| Field Name | Type | Required | Description | Validation Rules | Related Entity |
|---|---|---|---|---|---|
| ID | String | Yes | Unique journal entry ID | Auto-generated | Primary Key |
| Journal Number | String | Yes | JE number | Format: JE-YYYY-XXXXXXX | - |
| Case Account | CaseAccount | No | Related case account | If case-related | CaseAccount |
| Journal Template | JournalTemplate | Yes | Template used | Valid template | JournalTemplate |
| Entry Date | DateTime | Yes | Transaction date | Cannot be future | - |
| Posting Date | DateTime | Yes | GL posting date | Accounting period | - |
| Entry Type | String | Yes | Type of entry | Enum: Charge, Payment, Adjustment, Accrual | - |
| Description | String | Yes | Entry description | Max 500 chars | - |
| Reference Number | String | No | External reference | Claim number, etc. | - |
| Total Debits | Decimal | Yes | Sum of debits | Must equal credits | - |
| Total Credits | Decimal | Yes | Sum of credits | Must equal debits | - |
| Is Balanced | Boolean | Yes | Entry balanced | Debits = Credits | - |
| Posted | Boolean | Yes | Posted to GL | Default false | - |
| Posted Date | DateTime | No | When posted | Set when posted | - |
| Posted By | User | No | Who posted | Valid user ID | User |
| Reversed | Boolean | Yes | Is reversed | Default false | - |
| Reversal Entry | JournalEntry | No | Reversal JE | For corrections | JournalEntry |
| Business Central ID | String | No | BC journal ID | From BC sync | - |
| BC Sync Status | String | Yes | Sync status | Enum: Pending, Synced, Error | - |
| Approval Status | String | Yes | Approval state | Enum: Draft, Pending, Approved, Rejected | - |
| Approved By | User | No | Approving user | Required if approved | User |
| Approval Date | DateTime | No | When approved | Set on approval | - |
| Journal Lines | JournalLine[] | Yes | Entry lines | Min 2 lines | JournalLine (1:Many) |
Field Documentation - Journal Line Entity
| Field Name | Type | Required | Description | Validation Rules | Related Entity |
|---|---|---|---|---|---|
| ID | String | Yes | Unique line ID | Auto-generated | Primary Key |
| Journal Entry | JournalEntry | Yes | Parent entry | Must exist | JournalEntry |
| Line Number | Integer | Yes | Line sequence | Sequential from 1 | - |
| GL Account | String | Yes | General ledger account | Valid GL code | - |
| GL Description | String | Yes | Account description | From GL master | - |
| Debit Amount | Decimal | No | Debit value | Positive, 0 if credit | - |
| Credit Amount | Decimal | No | Credit value | Positive, 0 if debit | - |
| Description | String | Yes | Line description | Max 500 chars | - |
| Cost Center | String | No | Cost center code | Valid cost center | - |
| Department | String | No | Department code | Valid department | - |
| Project | String | No | Project code | If applicable | - |
| Vendor | Vendor | No | Related vendor | For AP entries | Vendor |
| Customer | String | No | Customer code | For AR entries | - |
Field Documentation - Journal Template Entity
| Field Name | Type | Required | Description | Validation Rules | Related Entity |
|---|---|---|---|---|---|
| ID | String | Yes | Template ID | Auto-generated | Primary Key |
| Template Name | String | Yes | Template identifier | Unique, max 100 chars | - |
| Template Type | String | Yes | Category | Enum: Charge, Payment, Adjustment, Settlement | - |
| Description | String | Yes | Template purpose | Max 500 chars | - |
| Active | Boolean | Yes | Template available | Default true | - |
| Debit Accounts | Text | Yes | Debit GL accounts | JSON array | - |
| Credit Accounts | Text | Yes | Credit GL accounts | JSON array | - |
| Auto Post | Boolean | Yes | Post automatically | Default false | - |
| Requires Approval | Boolean | Yes | Needs approval | Default true | - |
Workflows
Case Account Creation Workflow
-
Automatic Creation
- Triggered by legal case creation
- Generate account number
- Set initial status to Active
- Initialize all balances to zero
-
Account Setup
- Link to Business Central
- Assign GL accounts
- Set credit limit
- Configure cost center
-
Initial Journal Entry
- Create opening JE
- Set up receivable
- Post to GL
- Sync to BC
Charge Posting Workflow
-
Claim Approval
- Claim approved for payment
- Calculate retail amount
- Calculate contracted amount
- Determine adjustment
-
Journal Entry Creation
- Select charge template
- Create journal entry
- Debit: Medical Expense
- Credit: Accounts Payable
-
Account Update
- Update total charges
- Update contracted amount
- Calculate new balance
- Update aging
-
Business Central Sync
- Send journal to BC
- Update vendor payable
- Receive BC confirmation
- Update sync status
Payment Processing Workflow
-
Payment Receipt
- Receive payment information
- Identify case account
- Verify payment amount
- Select payment template
-
Journal Entry Creation
- Create payment JE
- Debit: Cash
- Credit: Medical Expense
- Post to GL
-
Balance Update
- Apply payment to balance
- Update payment total
- Recalculate current balance
- Update last activity
Settlement Workflow
-
Settlement Notification
- Receive settlement amount
- Calculate distributions
- Attorney fees
- Medical liens
- Patient portion
-
Settlement Entries
- Create settlement JE
- Clear medical expenses
- Record attorney fees
- Process liens
-
Account Closure
- Verify zero balance
- Change status to Closed
- Final BC sync
- Archive account
Month-End Processing
-
Accrual Calculation
- Identify unbilled services
- Calculate accruals
- Create accrual entries
- Post to GL
-
Reconciliation
- Compare to BC
- Identify discrepancies
- Create adjustments
- Balance accounts
-
Reporting
- Generate financial reports
- Aging analysis
- Revenue recognition
- Case profitability
Business Rules
Account Rules
- One account per legal case
- Account created automatically with case
- Cannot delete account with transactions
- Status changes require documentation
- Credit limit enforcement optional
Journal Entry Rules
- Debits must equal credits
- Cannot post to closed periods
- Approval required over threshold
- Templates mandatory for standard entries
- Reversal creates new entry
Balance Rules
- Balance = Contracted - Payments
- Negative balances require review
- Write-offs require approval
- Adjustments need documentation
- Zero balance required for closure
Sync Rules
- Real-time sync for critical transactions
- Batch sync for routine entries
- Failed syncs retry automatically
- Manual intervention for persistent failures
- Sync status tracked per transaction
Integrations
| System | Integration Type | Purpose |
|---|---|---|
| Business Central | REST API | GL posting, AR/AP |
| Claims System | Direct Database | Charge creation |
| Legal Case System | Direct Database | Case linkage |
| Payment System | API | Payment processing |
| Reporting System | Database Views | Financial reports |
| Document Management | File System | Supporting documents |
Common Issues
| Issue | Description | Resolution |
|---|---|---|
| Out of Balance | JE debits ≠ credits | Review and correct lines |
| Sync Failure | BC sync fails | Retry or manual sync |
| Period Closed | Cannot post to period | Post to next open period |
| Missing Template | JE template not found | Create or select template |
| Credit Limit | Exceeds limit | Increase or override |
Screenshots Needed
- Case Account Dashboard
- Journal Entry Form
- Journal Template Manager
- Balance Summary View
- Payment Application Screen
- Settlement Calculator
- BC Sync Monitor
- Financial Reports
- Approval Queue
- Month-End Checklist
Performance Considerations
- Journal posting < 3 seconds
- Support 10,000+ accounts
- Real-time balance calculation
- Efficient BC sync process
- Quick financial reporting
Security Considerations
- Financial data encryption
- Approval workflow enforcement
- Audit trail for all entries
- Segregation of duties
- BC credential security
Notes
- Journal entries are immutable once posted
- BC sync is critical for financial integrity
- Templates reduce entry errors
- Automated accruals improve accuracy