Skip to content

fix(datasync): add missing Stop TB diagnostic/beneficiary tables to V… - #174

Merged
vishwab1 merged 1 commit into
release-3.8.2from
vb/release-3.8.2-van
Aug 7, 2026
Merged

fix(datasync): add missing Stop TB diagnostic/beneficiary tables to V…#174
vishwab1 merged 1 commit into
release-3.8.2from
vb/release-3.8.2-van

Conversation

@vishwab1

@vishwab1 vishwab1 commented Aug 7, 2026

Copy link
Copy Markdown
Member

…ALID_TABLES

Central's isValidTableName() silently rejects any table not in this allowlist before it ever tries to build SQL against it - a defense against SQL injection via unparameterizable table/column identifiers.

Full gap analysis against the van-side m_synctabledetail registration found 5 tables that were registered to push (or about to be) but would still get rejected on arrival at central:

  • tb_diagnostic_order, tb_diagnostic_result, tb_diagnostic_document: the diagnostic-device (X-ray/TrueNat) integration tables added to FLW-API after this allowlist was last updated. FLW-API already stamps VanID/VanSerialNo correctly on all three.
  • i_beneficiarydetails_rmnch, i_bornbirthdeatils: never added despite being core Stop TB beneficiary tables.

tb_diagnostic_provider_token deliberately excluded - local EMRLite auth/session state, not beneficiary data, shouldn't sync to central.

tb_stoptb_visit and i_householddetails were already present from an earlier fix; this closes out the rest of the gap.

Companion van-side fix (not in this repo): register the same 7 tables in m_synctabledetail (SyncTableGroupID=11, Stop TB) so the van side actually attempts to push them - see stoptb_sync_tables.sql in ADMIN-UI.

📋 Description

JIRA ID:

Please provide a summary of the change and the motivation behind it. Include relevant context and details.


✅ Type of Change

  • 🐞 Bug fix (non-breaking change which resolves an issue)
  • New feature (non-breaking change which adds functionality)
  • 🔥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🛠 Refactor (change that is neither a fix nor a new feature)
  • ⚙️ Config change (configuration file or build script updates)
  • 📚 Documentation (updates to docs or readme)
  • 🧪 Tests (adding new or updating existing tests)
  • 🎨 UI/UX (changes that affect the user interface)
  • 🚀 Performance (improves performance)
  • 🧹 Chore (miscellaneous changes that don't modify src or test files)

ℹ️ Additional Information

Please describe how the changes were tested, and include any relevant screenshots, logs, or other information that provides additional context.

…ALID_TABLES

Central's isValidTableName() silently rejects any table not in this
allowlist before it ever tries to build SQL against it - a defense
against SQL injection via unparameterizable table/column identifiers.

Full gap analysis against the van-side m_synctabledetail registration
found 5 tables that were registered to push (or about to be) but would
still get rejected on arrival at central:

- tb_diagnostic_order, tb_diagnostic_result, tb_diagnostic_document:
  the diagnostic-device (X-ray/TrueNat) integration tables added to
  FLW-API after this allowlist was last updated. FLW-API already
  stamps VanID/VanSerialNo correctly on all three.
- i_beneficiarydetails_rmnch, i_bornbirthdeatils: never added despite
  being core Stop TB beneficiary tables.

tb_diagnostic_provider_token deliberately excluded - local EMRLite
auth/session state, not beneficiary data, shouldn't sync to central.

tb_stoptb_visit and i_householddetails were already present from an
earlier fix; this closes out the rest of the gap.

Companion van-side fix (not in this repo): register the same 7 tables
in m_synctabledetail (SyncTableGroupID=11, Stop TB) so the van side
actually attempts to push them - see stoptb_sync_tables.sql in ADMIN-UI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vishwab1
vishwab1 requested a review from vanitha1822 August 7, 2026 15:58
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 69c91943-1d7f-4c5a-8b04-416d2cc03c66

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Aug 7, 2026

Copy link
Copy Markdown

@vishwab1
vishwab1 merged commit 01533a8 into release-3.8.2 Aug 7, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants