Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions openspec/changes/brp-kvk-register-sets/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Why

When creating a zaak (case), the initiator ("indiener") must be linked to a real person or organization. Currently, cases have no structured initiator data connected to base registries like BRP (Basisregistratie Personen) or KVK (Kamer van Koophandel). Users cannot search or select an initiator from authoritative sources during case creation. This is a core GEMMA Zaakafhandel requirement -- every zaak must have a "rol: initiator" linked to a betrokkene (involved party). Without BRP/KVK integration, Procest cannot demonstrate realistic case handling workflows.

## What Changes

- **REQ-BRP-001**: Create a BRP person register schema in OpenRegister with fields for BSN, name, address, and birthdate
- **REQ-BRP-002**: Seed 10 test persons into the BRP register for development and demo purposes
- **REQ-KVK-001**: Create a KVK company register schema in OpenRegister with fields for KVK number, trade name, legal form, and address
- **REQ-KVK-002**: Seed 10 test companies into the KVK register for development and demo purposes
- **REQ-INIT-001**: Add initiator type selector to case creation UI (Person / Company / Contact)
- **REQ-INIT-002**: Implement cross-source search across BRP, KVK, and Nextcloud Contacts with unified results
- **REQ-INIT-003**: Store selected initiator reference on the case (type + source ID)
- **REQ-INIT-004**: Display initiator details on the case detail view

## Capabilities

### New Capabilities
- `brp-register`: BRP person register schema and test seed data in OpenRegister
- `kvk-register`: KVK company register schema and test seed data in OpenRegister
- `initiator-selection`: Unified initiator search and selection across BRP, KVK, and Nextcloud Contacts during case creation
- `initiator-display`: Initiator details shown on case detail view with link to source record

### Modified Capabilities
- `procest-case-creation`: CaseCreateDialog extended with initiator type selector and cross-source search
- `procest-case-detail`: Case info panel shows initiator name, type, and source details
- `procest-register`: Case schema extended with initiator reference fields (type, sourceId, sourceName)

## Standards

- **GEMMA Zaakafhandel**: Rol "initiator" is a required betrokkene on every zaak
- **ZGW ZRC**: Rol betrokkene model (natuurlijk persoon / niet-natuurlijk persoon)
- **Haal Centraal BRP Personen API**: Field naming conventions for person data (burgerservicenummer, naam, verblijfplaats, geboorte)
- **KVK Zoeken API**: Field naming conventions for company data (kvkNummer, handelsnaam, rechtsvorm, adres)

## Impact

- **OpenRegister**: New register JSON schemas for BRP persons and KVK companies with seed data in `components.objects`
- **Frontend**: `CaseCreateDialog.vue` -- add initiator type tabs and search component
- **Frontend**: `CaseDetail.vue` -- display initiator info section
- **Backend**: Case schema in `procest_register.json` -- add `initiatorType`, `initiatorSourceId`, `initiatorDisplayName` fields
- **Dependencies**: OpenRegister (register schemas and seed data), Nextcloud Contacts API (DAV/CardDAV search)

## Risks

- BRP and KVK schemas are simplified test versions based on API field naming conventions, not actual registry connections. Real BRP/KVK integration would require Haal Centraal and KVK API credentials and compliance.
- Nextcloud Contacts search depends on the Contacts app being installed and populated.
- Cross-source search performance may need optimization if registers grow large.
Loading