From aa76532536a41038f4fcb611e9c8b581f0d1c4e8 Mon Sep 17 00:00:00 2001 From: vishwab1 Date: Fri, 7 Aug 2026 22:37:30 +0530 Subject: [PATCH] fix(datasync): add Dynamic Form response tables to VALID_TABLES t_form_response, t_section_response, t_question_response hold actual per-beneficiary submitted counselling/contact-tracing answers and need to sync to central, same as every other beneficiary-data table. They were never registered here since the Dynamic Form module (V87) postdates this allowlist's last update - identical gap to the diagnostic-device tables fixed earlier. The 7 form-definition/structure tables (t_dynamic_form, t_form_version, t_form_section, t_question_option, t_question_validation, t_option_condition, t_section_question) are deliberately NOT registered - they're seeded once at app startup, not per-van transactional data. Companion fixes (not in this repo): FLW-API now stamps VanSerialNo on all 3 response tables (was previously only stamping VanID), and the van side needs these 3 tables registered in m_synctabledetail. Co-Authored-By: Claude Sonnet 5 --- .../dataSyncLayerCentral/DataSyncRepositoryCentral.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/iemr/mmu/service/dataSyncLayerCentral/DataSyncRepositoryCentral.java b/src/main/java/com/iemr/mmu/service/dataSyncLayerCentral/DataSyncRepositoryCentral.java index de966306..0da5bf4b 100644 --- a/src/main/java/com/iemr/mmu/service/dataSyncLayerCentral/DataSyncRepositoryCentral.java +++ b/src/main/java/com/iemr/mmu/service/dataSyncLayerCentral/DataSyncRepositoryCentral.java @@ -85,7 +85,14 @@ private JdbcTemplate getJdbcTemplate() { "tb_diagnostic_order", "tb_diagnostic_result", "tb_diagnostic_document", // Also missing despite being registered van-side for Stop TB — same silent-reject // gap as above, found during the full Stop TB sync gap analysis. - "i_beneficiarydetails_rmnch", "i_bornbirthdeatils"); + "i_beneficiarydetails_rmnch", "i_bornbirthdeatils", + // Dynamic Form module (Counselling / contact-tracing forms) — the response tables + // hold actual per-beneficiary submitted answers and need to sync; the 7 form- + // definition/structure tables (t_dynamic_form, t_form_version, t_form_section, + // t_question_option, t_question_validation, t_option_condition, t_section_question) + // are seeded once at startup and deliberately NOT registered here — they're + // reference data, not per-van transactional records. + "t_form_response", "t_section_response", "t_question_response"); private boolean isValidDatabaseIdentifierCharacter(String identifier) { return identifier != null && identifier.matches("^[a-zA-Z_][a-zA-Z0-9_]*$");