🌠Worker Registry
Overview
The Worker Registry Service is a new system that keeps track of campaign workers — the field staff who go out and do the hands-on work during a health campaign (for example, distributing supplies or administering commodities).
Think of it as the "HR + Payroll card file" for campaign workers. It stores:
Who the worker is, linked back to their main personal record (called an "individual" record elsewhere in the system)
How to pay them — bank details, payment provider, payee name and phone number
Proof of their work — a signature and photo that get captured automatically the first time they log attendance
This is a brand-new service introduced in this release. Nothing here is an update to something older — it's all new.
What's new in this?
During a health campaign, people are recruited to work in the field. The system already has a general record for every person ("individual"). But workers need extra information that doesn't belong on that general record — mainly:
Payment information (so they can actually get paid)
Campaign-specific proof of work (signature, photo)
This service exists to hold that extra worker-specific information, and to connect it back to the person's main record.
In one sentence: "Who are the workers on this campaign, how do we pay them, and do we have their signature/photo on file?"
What the Service Actually Does
Keeps Worker Records
Workers can be created and updated in bulk (many at once), which matches how other parts of the system handle large volumes of data during a campaign rollout.
Links Workers to People
Each worker is connected to one or more "individual" records through a linking table. This means the system can:
Look up which worker corresponds to a given person, and
Look up which people are behind a given worker record
Automatically Captures Signature & Photo
The first time a worker logs their attendance, the system automatically grabs their signature and photo from that event and saves it to their worker record — no separate upload step is needed.
⚠️ Important limitation: This only happens once. If the signature or photo needs to be corrected later, someone has to manually update the record — the automatic capture won't overwrite it.
Protects Sensitive Information
Payment and personal details are encrypted while stored, and only unlocked (decrypted) when they need to be shown to an authorized caller. This protects sensitive financial and personal data at rest.
Works Across Multiple Regions/States
The system that listens for attendance events is built to work whether it's deployed for a single location or a central system serving multiple states/regions.
Business Flow
A. Onboarding a Worker
Workers are created in bulk.
Each worker is checked against the existing "individual" records to make sure they're real, valid people already in the system.
A link is created connecting the worker to their individual record(s).
B. Getting Ready to Pay Workers
When a worker is created or updated, their payment details (bank, provider, payee info) are checked for completeness and validity.
This ensures that when it's time to actually send payments, all the needed information is already in place.
C. Capturing Proof of Work
The first time a worker logs attendance, an event is triggered.
The system finds the matching worker record.
If the worker doesn't already have a signature/photo on file, it saves the one from this event.
If they already have one, the event is ignored (see limitation above).
D. Searching for Workers
Workers can be looked up either by their own worker ID or by the ID of the person (individual) linked to them.
Results always come back showing which individual(s) are connected to that worker.
E. Keeping Data Safe
Sensitive fields are encrypted before being saved.
They're only decrypted when returned to someone authorized to see them.
How the Pieces Fit Together
The diagram below shows two flows:
Top half — Creating a Worker: A client (another system or user) submits worker details. The system checks everything is valid, generates IDs, encrypts sensitive data, saves it, and returns the clean (decrypted) worker info.
Bottom half — Attendance Enrichment: When a worker's first attendance record comes in, the system automatically finds their profile and fills in their signature/photo — but only if it's missing.

6. Key Access Points
These are the "doors" other systems use to interact with the Worker Registry:
Create many workers at once
Submit a bulk request; the system validates everyone and returns the finished, readable records
Update many workers at once
Submit changes; only the fields you send are changed — nothing else is wiped out
Search for workers
Search by worker ID or by the linked person's ID; must specify which location/tenant you're searching in
Link workers to people in bulk
Submit a bulk request to create these connections
Automatic attendance capture
Happens automatically in the background when a worker's first attendance record is submitted
7. What This Service Relies On
This service doesn't work alone — it depends on several other systems:
Individual Records System — to confirm the people behind each worker actually exist
ID Generator — to create unique worker IDs
Encryption Service — to protect sensitive payment and personal data
Master Data System — for location-specific reference data
Shared Utilities — common tools and validation used across the health campaign systems
Messaging System (Kafka) — carries the events that trigger saves and the attendance-capture process
Database (PostgreSQL) — where worker and worker-to-person link records are stored
Cache (Redis) — speeds up repeated lookups
A separate "writer" service — actually commits the database changes for create/update actions
8. How Problems Are Handled
Bad data is caught early. Before anything is saved, every worker record is checked; only valid ones move forward, and errors are collected and reported.
Updates don't erase what you didn't mean to change. If you update part of a worker's record, the rest stays exactly as it was — it won't get blanked out.
A bad attendance event won't break anything. If something goes wrong while processing an attendance event, it's simply logged and skipped — it won't crash the system.
Signature/photo capture won't overwrite existing data. Once it's set, a new attendance event won't replace it (this is by design, though it has the trade-off noted below).
Searching with no results returns quickly and cleanly, rather than running an unnecessarily broad search.
Invalid location/tenant IDs produce a clear, readable error rather than a technical crash message.
9. Known Limitations & Risks
It's worth being aware of a few current limitations:
No automatic retry for failed attendance events. If an attendance-triggered update fails, it's simply dropped — there's no automatic "try again later" mechanism.
Signature/photo can only be captured once automatically. If it needs to be corrected, that has to be done manually through an update.
Depends on the Individual Records System being available. If that system is down, or if a batch is too large, validating worker-to-person links can be affected.
Local database setup requires an extra manual step. Automatic database setup (migrations) is turned off by default in local environments.
Searching always requires specifying a location/tenant. There's no way to search across all locations at once.
Data quality depends heavily on the encryption service working correctly. If it's misconfigured, worker data could be stored or returned in a garbled, unreadable state.
10. Technical Snapshot
Release
v2.1 — first version of this service
Built With
Spring Boot 3.2.2, Java 17
Shared Components
Common health-campaign libraries, encryption client, tracing library
Last updated
Was this helpful?