fix(doctor): strip «دکتر» prefix on IRIMC import + name-fix & purge commands
Root cause of "دکتر دکتر …" (and ellipsis-truncated "…نی") in admin: IRIMC
names already contain the «دکتر» title, while the panel renders «دکتر {name}».
Convention is to store the bare name.
- DoctorImportService: normalize name via PersianText::stripDoctorTitle
(also fixes ي/ی, ك/ک, half-space)
- PersianText::stripDoctorTitle now strips consecutive «دکتر دکتر …» prefixes
- app:doctors:fix-irimc-names: one-off backfill for existing source='irimc'
rows (dry-run supported) — fixed 340 rows
- app:doctors:purge: FK-safe full wipe of doctors + all dependent tables +
orphan surrogate users, for a clean test DB (dry-run default, --force to
apply, prod-guarded)
- tests: PersianTextTest cases for the title stripping; DoctorImportTest
asserts stored name has no «دکتر» prefix
- docs/api/doctor-import.md: name convention + the two new commands
Verified: import "دکتر صفورا حجازی نیا" → stored "صفورا حجازی نیا" → panel
shows single «دکتر صفورا حجازی نیا».
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -755,5 +755,21 @@
|
||||
"753": "Community 753",
|
||||
"754": "Community 754",
|
||||
"755": "Community 755",
|
||||
"756": "Community 756"
|
||||
"756": "Community 756",
|
||||
"757": "Community 757",
|
||||
"758": "Community 758",
|
||||
"759": "Community 759",
|
||||
"760": "Community 760",
|
||||
"761": "Community 761",
|
||||
"762": "Community 762",
|
||||
"763": "Community 763",
|
||||
"764": "Community 764",
|
||||
"765": "Community 765",
|
||||
"766": "Community 766",
|
||||
"767": "Community 767",
|
||||
"768": "Community 768",
|
||||
"769": "Community 769",
|
||||
"770": "Community 770",
|
||||
"771": "Community 771",
|
||||
"772": "Community 772"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user