feat(stoptb): Nikshay ID Generator CSV export and results import - #177
feat(stoptb): Nikshay ID Generator CSV export and results import#177snehar-nd wants to merge 3 commits into
Conversation
Streams pending Stop TB camp beneficiaries (filtered by van/service point/date range, excluding those with an existing Nikshay ID) as a CSV formatted for the Nikshay ID Generator desktop app. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds an export-batch tracking mechanism (row order + beneficiary/ diagnostics identity per CSV row) so the Nikshay ID Generator app's results file can be re-uploaded and matched back to the right beneficiary, since that app's own template strips any AMRIT identifier on read. Export now also returns a batch ID header; new POST /stopTb/nikshay/importResultsCsv writes nikshay_id back for success/single-ID-skip rows and flags ambiguous/failed rows for manual review instead of guessing. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…hrough column Adds benRegId as a CSV column the Nikshay ID Generator app carries through untouched (a companion change in that app), so each results row is self-identifying instead of needing AMRIT-side row-order tracking. Import now resolves/creates the right tb_stoptb_diagnostics row live via findLatestDiagnosticsId, keyed off benRegId directly. Drops the export-batch header/param from both endpoints. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|
|
This is not needed, it already done |



Summary
Adds Nikshay ID Generator CSV round-trip support for Stop TB camp beneficiaries:
GET /stopTb/nikshay/exportBeneficiariesCsvstreams pending Stop TB camp beneficiaries (filtered by van / service point / date range, excluding those that already have a Nikshay ID) as a CSV formatted for the Nikshay ID Generator desktop app.POST /stopTb/nikshay/importResultsCsvreads the results file back from that app and writesnikshay_idback for success and single-ID-skip rows, flagging ambiguous/failed rows for manual review rather than guessing.benRegIdpassthrough column that the Nikshay ID Generator app leaves untouched (companion change in that app), so each results row is self-identifying. Import resolves/creates the righttb_stoptb_diagnosticsrow live viafindLatestDiagnosticsId, keyed offbenRegId. This replaced an earlier export-batch/row-order tracking approach, which is why no batch tables or batch header/param remain.Changes
NikshayExportController.javaNikshayExportService.javaNikshayImportService.javanikshay_idwrite-backNikshayExportRepository.javafindLatestDiagnosticsIdpom.xml771 insertions, no deletions — all new files apart from
pom.xml.Notes
benRegIdpassthrough change in the Nikshay ID Generator app.Testing
Not yet exercised end-to-end against the Nikshay ID Generator app — please confirm the CSV column contract matches on that side before merge.
🤖 Generated with Claude Code