Q1 #928
Answered
by
imalkipinto
Dilusha-Ranasingha
asked this question in
Q&A
Q1
#928
|
In an application, user inputs a Sri Lankan NIC number. From this single input, the system auto derives gender of the person and EIC. What are the best practices to ensure data integrity, traceability, and future-proofing when derived fields are auto generated on the client side? |
Answered by
imalkipinto
Dec 16, 2025
Replies: 1 comment
|
Single Source of Truth Treat NIC as the authoritative input. Mark derived fields as read-only in the user interface Deterministic Derivation Logic Ensure gender and EIC are generated using pure deterministic functions Backend Re-validation to prevent retampering Auditability Persist both the raw NIC and derived values with timestamps for traceability. Versioned Logic Version the derivation logic (e.g. NIC_LOGIC_VERSION = 1) to support future rule changes, |
0 replies
Answer selected by
Dilusha-Ranasingha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Single Source of Truth
Treat NIC as the authoritative input.
Mark derived fields as read-only in the user interface
Deterministic Derivation Logic
Ensure gender and EIC are generated using pure deterministic functions
Backend Re-validation to prevent retampering
Auditability
Persist both the raw NIC and derived values with timestamps for traceability.
Versioned Logic
Version the derivation logic (e.g. NIC_LOGIC_VERSION = 1) to support future rule changes,