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>
1 line
12 KiB
JSON
1 line
12 KiB
JSON
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "label": "FixIrimcNamesCommand.php", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L1"}, {"id": "command_fixirimcnamescommand_fixirimcnamescommand", "label": "FixIrimcNamesCommand", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L22"}, {"id": "command", "label": "Command", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "command_fixirimcnamescommand_fixirimcnamescommand_construct", "label": ".__construct()", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L28"}, {"id": "command_fixirimcnamescommand_fixirimcnamescommand_configure", "label": ".configure()", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L33"}, {"id": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "label": ".execute()", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38"}, {"id": "inputinterface", "label": "InputInterface", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38"}, {"id": "outputinterface", "label": "OutputInterface", "file_type": "code", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "doctor", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "persiantext", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "entitymanagerinterface", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L7", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "ascommand", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L8", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "command", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L9", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "inputinterface", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L10", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "inputoption", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L11", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "outputinterface", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L12", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "symfonystyle", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L13", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_fixirimcnamescommand_php", "target": "command_fixirimcnamescommand_fixirimcnamescommand", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L22", "weight": 1.0}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand", "target": "command", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L26", "weight": 1.0}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand", "target": "command_fixirimcnamescommand_fixirimcnamescommand_construct", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L28", "weight": 1.0}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand", "target": "command_fixirimcnamescommand_fixirimcnamescommand_configure", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L33", "weight": 1.0}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand", "target": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38", "weight": 1.0}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "target": "inputinterface", "relation": "references", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38", "weight": 1.0, "context": "parameter_type"}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "target": "outputinterface", "relation": "references", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L38", "weight": 1.0, "context": "parameter_type"}, {"source": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "target": "command", "relation": "references_constant", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L68", "weight": 1.0}], "raw_calls": [{"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_construct", "callee": "parent", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L30", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_configure", "callee": "addOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L35", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L41", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getResult", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getQuery", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "setParameter", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "where", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "createQueryBuilder", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getRepository", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "PersianText", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L52", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getName", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L52", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getName", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L53", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "text", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L54", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "sprintf", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L54", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "getName", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L54", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "setName", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L56", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "flush", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L63", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "success", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L66", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "sprintf", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L66", "receiver": null}, {"caller_nid": "command_fixirimcnamescommand_fixirimcnamescommand_execute", "callee": "count", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/FixIrimcNamesCommand.php", "source_location": "L66", "receiver": null}]} |