Searching the codebase for the Person domain model, case links, certificates, and any PersonFile read-model code.
[tool: update_current_step — Tool use: update_current_step]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 5 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/Person.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/PersonId.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Configurations/PersonConfiguration.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/PersonRepository.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 0 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 6 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-16-person-file.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegistrationCase.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressCase.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/BirthDeclaration/BirthDeclarationCase.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/IdentityDocuments/DocumentRequestCase.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 7 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/Household.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/HouseholdMember.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Certificates/CertificateRequest.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Certificates/CertificateType.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/CaseAuditEntry.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/CaseAuditAction.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 5 results in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 10 results in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 11 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/RegistrationCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/BirthDeclarationCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/ChangeOfAddressCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/DocumentRequestCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterPerson.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/INationalRegisterRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatusRecord.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/IdentityDetails.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Certificates/ICertificateRequestRepository.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/ConfirmRegistration/ConfirmRegistrationHandl]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/HouseholdRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/CertificateRequestRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterNumber.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Address/BelgianAddress.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/BirthDeclaration/BirthDeclarationParentLink.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/ChangeOfAddressHouseholdMemberLink.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/CaseAuditRecorder.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 5 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/BirthDeclaration/ConfirmBirthDeclaration/ConfirmBirthDecl]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/IHouseholdRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/HouseholdMemberDetails.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/DOMAIN.md]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Police/PoliceVerificationRequest.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Police/IPoliceVerificationRepository.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/NationalRegisterRepository.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Notifications/OutboundNotification.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/IRegistrationCaseRepository.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 4 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/HouseholdMemberRole.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/MunicipalDbContext.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/BisNumber.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/RegisterTarget.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Address/HousingSituation.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/BirthDeclaration/ParentRole.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Notifications/IOutboundNotificationRepository.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Configurations/CertificateRequestConfiguration.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/RecordHouseholdComposition/RecordHouseholdCo]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatus.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/IdentityDocuments/IDocumentRequestCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/BirthDeclaration/IBirthDeclarationCaseRepository.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/ChangeOfAddress/IChangeOfAddressCaseRepository.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/PopulationRegisterSeeder.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/SearchNationalRegister/SearchNationalRegiste]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/Registration/SearchNationalRegister/SearchNationalRegiste]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/IdentityDocuments/DocumentRequestType.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/IdentityDocuments/DocumentRequestCaseStatus.cs]
[tool: update_current_step — Tool use: update_current_step]
Phase 16 context
Planned, not implemented. Spec: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-16-person-file.md. No PersonFile, GetPersonFile, or /persons/ routes exist in code yet. Phase 16 is a query-side read model composing existing tables.
1. Person entity / aggregate
Core type: Person — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/Person.cs
ID: PersonId (Guid wrapper) — .../Identity/PersonId.cs
Table: persons — .../Infrastructure/Persistence/Configurations/PersonConfiguration.cs
| Field | Type | Notes |
|---|
Id | PersonId | PK |
GivenName, FamilyName | string | |
BirthDate | DateOnly | |
Nationality | string | |
LinkedRegisterRecordId | NationalRegisterPersonId? | FK to stub NR table |
BisNumber | BisNumber? | 11-digit, starts with 7 |
NationalRegisterNumber | NationalRegisterNumber? | 11-digit, unique index |
CivilStatus | owned CivilStatusRecord? | Status, spouse names, marriage date/place, recognition |
BirthPlace, BirthCountry | string? | |
DomicileAddress | owned BelgianAddress? | Canonical current domicile |
Key behavior: Create, CreateFromRegisterRecord, Update, AssignNationalRegisterNumber, ConvertBisToNationalRegister, RecordCivilStatus, RecordBirthInformation, UpdateDomicile.
Domicile updates:
- Registration confirm →
DeclaredAddress copied to Person.DomicileAddress (ConfirmRegistrationHandler.cs)
- COA confirm →
NewAddress copied (ConfirmAddressChangeHandler.cs)
Address value object
BelgianAddress — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Address/BelgianAddress.cs
Fields: Street, HouseNumber, Box?, PostalCode, Municipality.
Household (separate aggregate — not on Person)
Household — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/Household.cs
| Field | Notes |
|---|
Id | HouseholdId |
RegistrationCaseId | 1:1 with registration case, not Person |
Members | HouseholdMember[] — name/date/role only, no PersonId |
HouseholdMember: GivenName, FamilyName, BirthDate, HouseholdMemberRole (Head, Spouse, Child, Other).
Repo: IHouseholdRepository.GetByCaseIdAsync — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Household/IHouseholdRepository.cs
PersonId-linked household elsewhere:
BirthDeclarationParentLink — parent PersonId + ParentRole (Mother/Father/CoParent)
ChangeOfAddressHouseholdMemberLink — co-moving PersonIds
- Birth case also has
HouseholdAddress (address snapshot, not members)
Civil status (owned on Person)
CivilStatusRecord — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/CivilStatusRecord.cs
Spouse stored as names, not PersonId.
2. How cases link to PersonId
| Case type | Link field(s) | File | Cardinality |
|---|
| RegistrationCase | PersonId? (nullable until identity recorded) | .../Registration/RegistrationCase.cs | Direct; set by RecordIdentity / LinkExistingPerson |
| BirthDeclarationCase | ChildPersonId? after confirm; ParentLinks[].PersonId | .../BirthDeclaration/BirthDeclarationCase.cs | Child + 0–2 parents via join table |
| ChangeOfAddressCase | PersonId (subject); HouseholdMemberLinks[].PersonId | .../ChangeOfAddress/ChangeOfAddressCase.cs | Direct + optional co-movers |
| DocumentRequestCase | PersonId (required at open) | .../IdentityDocuments/DocumentRequestCase.cs | Direct |
Existing PersonId queries (only one):
IRegistrationCaseRepository.GetLatestRegisteredByPersonIdAsync — used by COA and document-request open handlers to snapshot previous address / verify registration.
No ListByPersonId on birth/COA/document repos — Phase 16 will need new EF queries (e.g. filter registration_cases.person_id, birth_declaration_parent_links.person_id, child_person_id, change_of_address_cases.person_id, document_request_cases.person_id).
Register target (for person-file header) lives on RegistrationCase.SelectedRegisterTarget (RegisterTarget enum: PopulationRegister, ForeignersRegister, WaitingRegister, SpecialRegister) — not on Person.
Per-case address snapshots:
- Registration:
DeclaredAddress, HousingSituation
- COA:
PreviousAddress, NewAddress, HousingSituation, EffectiveDate
- Birth:
HouseholdAddress
3. Certificate entities (Phase 8)
Type: CertificateRequest — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Certificates/CertificateRequest.cs
Table: certificate_requests
| Field | Type |
|---|
Id | CertificateRequestId |
RegistrationCaseId | ties to registration case |
CertificateType | ResidenceCertificate | HouseholdComposition |
PersonId | subject person |
IssuedByOfficerId | |
ReferenceNumber | unique (prefixes RC / HC) |
IssuedAt | |
Repo: ICertificateRequestRepository — ListByCaseIdAsync, CountByTypeAsync (no ListByPersonId yet).
Handlers: IssueResidenceCertificateHandler, IssueHouseholdCompositionHandler — require Registered case + PersonId.
Rendering: HtmlCertificateRenderer — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Certificates/HtmlCertificateRenderer.cs
4. Audit / history patterns
Registration-only structured audit
CaseAuditEntry — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Registration/CaseAuditEntry.cs
Fields: CaseId (RegistrationCaseId), Action, OfficerId, OccurredAt, Details?
CaseAuditAction enum (16 values): CaseOpened, IdentityRecorded, AddressDeclared, PoliceVerificationRequested, CaseApproved, RegistrationConfirmed, CertificateIssued, etc.
CaseAuditRecorder + ICaseAuditRepository.ListByCaseIdAsync
- API:
GET /registration/cases/{id}/audit — ListCaseAuditHandler
No audit tables for BirthDeclaration, ChangeOfAddress, or DocumentRequest.
Other history-like data
| Pattern | Scope | Key types |
|---|
| Police verification attempts | Registration + COA cases | PoliceVerificationRequest — ListByCaseIdAsync on IPoliceVerificationRepository |
| Police history in UI | Registration detail DTO | PoliceVerificationHistory on RegistrationCaseDetailDto |
| Outbound notifications | Registration, birth, COA | OutboundNotification has PersonId + optional case FKs |
| Domain events | Registration confirm, birth confirm, COA confirm | RegistrationConfirmed, BirthRegistered, etc. — not persisted as timeline |
Phase 16 “History” tab will likely union registration audit + inferred events from case status/timestamps unless new audit is added.
5. National Register fields & PersonId lookups
Value objects
NationalRegisterNumber — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterNumber.cs — normalize, validate check digits, GenerateStub, Format()
BisNumber — same folder
NationalRegisterPersonId — NR stub record ID
Stub NR table
NationalRegisterPerson — /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/NationalRegister/NationalRegisterPerson.cs
Fields: Id, identity fields, BisNumber?, NationalRegisterNumber?
IPersonRepository
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Domain/Identity/IPersonRepository.cs
| Method | Lookup |
|---|
GetByIdAsync | PersonId |
GetByRegisterRecordIdAsync | LinkedRegisterRecordId |
GetByNationalRegisterNumberAsync | NationalRegisterNumber (unique index) |
GetForUpdateAsync | tracked PersonId |
IsRegisterRecordLinkedAsync / IsNationalRegisterNumberAssignedAsync | conflict checks |
Implementation: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/Repositories/PersonRepository.cs
NR search entry: SearchNationalRegisterHandler resolves “registered in population” via GetByRegisterRecordIdAsync then fallback GetByNationalRegisterNumberAsync.
Indexes on Person: linked_register_record_id, unique national_register_number.
6. Existing PersonFile / read-model code
None implemented. Only documentation references:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/phases/phase-16-person-file.md
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/DOMAIN.md (§ Person file)
- UI template:
/Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/docs/design-system/06-page-templates.md §10
Planned slices: GetPersonFile (by PersonId or NR), SearchPersonFile, ListPersonCases; optional PersonFileQuery in Infrastructure; route /persons/{personId}.
DbContext entities available for composition: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Infrastructure/Persistence/MunicipalDbContext.cs — Persons, RegistrationCases, BirthDeclarationCases, ChangeOfAddressCases, DocumentRequestCases, Households, CertificateRequests, CaseAuditEntries, PoliceVerificationRequests, OutboundNotifications.
Phase 16 implementation notes (gaps)
- Household tab must merge three models: registration
Household (text members), birth ParentLinks (PersonId), COA HouseholdMemberLinks (PersonId). No single household aggregate on Person.
- Addresses tab: canonical =
Person.DomicileAddress; history from registration/COA case fields.
- Cases tab: requires new cross-table queries; repos today only
ListAsync() globally.
- Certificates tab: query
certificate_requests by person_id (field exists; repo method does not).
- History tab: registration audit only; other case types expose
OpenedAt/ClosedAt/ConfirmedAt/IssuedAt on case entities.
- Header “register type”: derive from latest registered case’s
SelectedRegisterTarget, not Person.