Skip to content

feat(stoptb): camp van drug list and release-3.8.2 StopTB fixes into release-3.12.0 - #167

Merged
SauravBizbRolly merged 10 commits into
release-3.12.0from
vb/stoptb-3.12.0
Oct 21, 2026
Merged

SauravBizbRolly merged 10 commits into
release-3.12.0from
vb/stoptb-3.12.0

Conversation

@vishwab1

Copy link
Copy Markdown
Member

📋 Description

JIRA ID: AMM-2342

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.

vishwab1 and others added 10 commits August 6, 2026 15:17
…it enforce.vanid config

- CommonBenStatusFlowServiceImpl.createBenFlowRecord: VanSerialNo was
  never set anywhere for i_ben_flow_outreach - now set to the row's own
  BenFlowID after save, matching the convention used elsewhere
  (e.g. IdentityService.regMap.setVanSerialNo(regMap.getBenRegId()))
- RegistrarServiceImpl: remove inline :false default from
  stoptb.enforce.vanid @value - every properties file must set this
  explicitly now, so a forgotten config fails loudly at startup instead
  of running fail-open

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(stoptb): stamp VanSerialNo on i_ben_flow_outreach, require explic…
…client text

Stop TB's district/village IDs are Nikshay-scoped (m_nikshay_district,
m_nikshay_village), not AMRIT's general m_district/m_village numbering.
The two ID spaces overlap - e.g. ID 1 means 'Nicobars' in m_district but
'Alluri Sitharama Raju' in m_nikshay_district - and i_ben_flow_outreach
previously just stored whatever district/village name text the client
sent verbatim, with no server-side validation. Observed live: two
beneficiaries in the same actual village had different district/village
text stored for the same numeric IDs.

Gated on countNikshayMappedUsersForPSM() so only PSMs actually mapped to
a Nikshay TU go through this resolution - every other program (ANC/NCD/
cancer-screening/teleconsultation/etc.) sharing this same BenFlowStatus
code path is unaffected and keeps using client-sent text exactly as
before, since their IDs are already correctly AMRIT-scoped.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(stoptb): resolve district/village names from Nikshay tables, not …
Redis (camp:vanID) was written once at MMU login and deleted globally,
unscoped, on ANY user's logout — a Redis outage or an unrelated user's
logout would silently break registration on this camp. Each camp/van
already runs its own dedicated backend instance, so which van this is
never actually changes at runtime.

registerBeneficiary() now injects vanID from the new stoptb.van.id
property (no inline default, every properties file must set it
explicitly, same convention as stoptb.enforce.vanid) instead of an
inline Redis lookup. Removed the now-unused RedisConnection/
LettuceConnectionFactory dependency from this class.

Scope: vanID only, parkingPlaceID is not part of this change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
fix(stoptb): read vanID from stoptb.van.id property instead of Redis
- Add hasRole('COUNSELLOR') to registrarBeneficaryRegistrationNew
  authorization; also fixes a dangling trailing '||' left in the
  existing @PreAuthorize expression.
- Add TRACE diagnostics around benRegID/providerServiceMapID/villageID/
  vanID in registerBeneficiary and createBenFlowRecord to verify van ID
  propagation.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat(registrar): allow COUNSELLOR role for beneficiary registration
On a Stop TB camp server (stoptb.van.id > 0) the doctor master drug list
(itemMaster) is read from the store of the configured van, whatever
vanID/facilityID the app sends. Servers with stoptb.van.id=0 keep the
current behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d20daba0-faa1-4dc7-8599-3ce6d4928242
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@SauravBizbRolly
SauravBizbRolly merged commit 09448fd into release-3.12.0 Oct 21, 2026
2 checks passed
@sonarqubecloud

Copy link
Copy Markdown

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