[Uganda project - Technoforte team] PRN Validation Before Printing Certificate – Architectural Limitation & Proposal #11708
-
SummaryWe are implementing a PRN (Payment Reference Number) flow for late birth registrations, where a PRN is generated during declaration and must be validated before allowing certificate printing. While a temporary workaround stores the PRN in a form field, this approach has proven unreliable and insufficient for enforcing validation during the Background / Context
Conceptually, PRN behaves very similarly to
Current Implementation (Workaround)
This works functionally, but introduces architectural issues (explained below). Problem ObservedDuring implementation, we found that PRN validation cannot be reliably enforced in the PRINT_CERTIFICATE flow due to framework constraints. 1. PRINT_CERTIFICATE has no reliable access to user-entered form data
2. Form-level validators cannot access event metadata
3. UI-only validation is not enforceable
4. Storing PRN as form data is unreliable
Key Insight
Because of this:
Proposed Solution (Core-Level)1. Persist PRN at the Event Level
2. Introduce a Server-Side Print Guard
3. Keep UI Validation as a Convenience Only
Why Tracking ID Was Not a Viable SubstituteAs part of exploration, we attempted to validate using
This confirmed that the issue is architectural, not implementation-specific. Questions for Core Team
Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
@Abhay-Dev-Gautam We have just finished a meeting with Aman and Prabakaran, with @jpye-finch as well to discuss this issue. Aman is going to be providing a list of the use cases that is going to be supported with regards to the PRN. Once he does this, we'll internally review and come back to you with an approach. CC: @euanmillar |
Beta Was this translation helpful? Give feedback.
@Abhay-Dev-Gautam your architectural decision making in how to implement this is in contradiction with OpenCRVS design and you need to re-think your approach. We are not going to introduce the ability to customise metadata with random ids at this time I'm afraid.
You say "Should not rely on form fields" - can you explain why? Using HTTP components in a form can request generation of a field via an API and it can be immutable, as the API can potentially store it for validation in a custom DB and it can pre-populate a disabled field. See some docs on this here re "API integration within an event form": If it is impossible to change by the user, and exists in a custom DB you could validate i…