Skip to content

fix(stoptb): resolve district/block/village against Nikshay masters, … - #444

Open
vishwab1 wants to merge 1 commit into
release-3.8.2from
vb/stoptb-nikshay-address-fix
Open

fix(stoptb): resolve district/block/village against Nikshay masters, …#444
vishwab1 wants to merge 1 commit into
release-3.8.2from
vb/stoptb-nikshay-address-fix

Conversation

@vishwab1

Copy link
Copy Markdown
Member

…not standard AMRIT masters

Stop TB workers are mapped to Nikshay's own isolated location hierarchy (m_nikshay_district/tu/village), a separate ID space from AMRIT's standard masters (m_district/m_districtblock/m_DistrictBranchMapping). The beneficiary address mapper ignored the districtName/districtBranchName strings sent by mobile and re-derived them by looking the numeric ID up in the standard masters instead, so every Stop TB registration got stamped with whatever unrelated place happened to share that ID (e.g. district 1 -> "Nicobars" instead of "Alluri Sitharama Raju").

Add Nikshay-specific lookup entities/repos and a NikshayAddressResolver that gates on providerServiceMapID -> ServiceName == "Stop TB". Only Stop TB beneficiaries take the Nikshay resolution path; every other service line's address mapping is untouched. Hibernate ddl-auto=none means tenants without the Nikshay tables are unaffected at both startup and runtime, since the new repositories are never queried unless isStopTB is true.

📋 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.

…not standard AMRIT masters

Stop TB workers are mapped to Nikshay's own isolated location hierarchy
(m_nikshay_district/tu/village), a separate ID space from AMRIT's standard
masters (m_district/m_districtblock/m_DistrictBranchMapping). The beneficiary
address mapper ignored the districtName/districtBranchName strings sent by
mobile and re-derived them by looking the numeric ID up in the standard
masters instead, so every Stop TB registration got stamped with whatever
unrelated place happened to share that ID (e.g. district 1 -> "Nicobars"
instead of "Alluri Sitharama Raju").

Add Nikshay-specific lookup entities/repos and a NikshayAddressResolver
that gates on providerServiceMapID -> ServiceName == "Stop TB". Only Stop
TB beneficiaries take the Nikshay resolution path; every other service
line's address mapping is untouched. Hibernate ddl-auto=none means tenants
without the Nikshay tables are unaffected at both startup and runtime,
since the new repositories are never queried unless isStopTB is true.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

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: 0ad63deb-200a-4b05-b9f6-f285327afed3

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.

@vishwab1
vishwab1 requested a review from SauravBizbRolly July 28, 2026 11:48
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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