# GetDepartmentChildren

## Overview

GetDepartmentChildren retrieves the direct child departments of a given parent department. Returns a list of departments whose parentDepartmentId matches the specified department ID. This supports organizational tree navigation and hierarchy display.

## Business Rules

- Returns only direct children (one level deep), not the full subtree
- Returns both ACTIVE and INACTIVE child departments by default
- An optional `status` filter can restrict results to a specific status
- Returns an empty list if the department has no children
- The parent department itself is not included in the results

## Process Flow

```mermaid
flowchart TD
    A[Receive request with departmentId] --> B[Query departments where parentDepartmentId = departmentId]
    B --> C{Status filter provided?}
    C -->|Yes| D[Filter by status]
    C -->|No| E[Return all children]
    D --> E
```

## External Dependencies

- None

## Error Scenarios

- None (returns empty list when no children found)

## Test Cases

- returns direct children of department
- returns empty list when department has no children
- filters children by ACTIVE status
- filters children by INACTIVE status
- does not return grandchildren
