Files
clinicpro/graphify-out/cache/ast/v0.8.44/b7801eae1d8e5515a35c3c99e9d2858204c660975c0e17f35ec38a0d1afcfc5c.json
T
hamedandClaude Opus 4.8 51432c7bb9 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>
2026-07-11 14:07:18 +03:30

1 line
11 KiB
JSON

{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "label": "PurgeDoctorsCommand.php", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L1"}, {"id": "command_purgedoctorscommand_purgedoctorscommand", "label": "PurgeDoctorsCommand", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L22"}, {"id": "command", "label": "Command", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "command_purgedoctorscommand_purgedoctorscommand_construct", "label": ".__construct()", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L36"}, {"id": "command_purgedoctorscommand_purgedoctorscommand_configure", "label": ".configure()", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L41"}, {"id": "command_purgedoctorscommand_purgedoctorscommand_execute", "label": ".execute()", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47"}, {"id": "inputinterface", "label": "InputInterface", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47"}, {"id": "outputinterface", "label": "OutputInterface", "file_type": "code", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "connection", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "ascommand", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "command", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L7", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "inputinterface", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L8", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "inputoption", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L9", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "outputinterface", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L10", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "symfonystyle", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L11", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_src_doctor_command_purgedoctorscommand_php", "target": "command_purgedoctorscommand_purgedoctorscommand", "relation": "contains", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L22", "weight": 1.0}, {"source": "command_purgedoctorscommand_purgedoctorscommand", "target": "command", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L26", "weight": 1.0}, {"source": "command_purgedoctorscommand_purgedoctorscommand", "target": "command_purgedoctorscommand_purgedoctorscommand_construct", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L36", "weight": 1.0}, {"source": "command_purgedoctorscommand_purgedoctorscommand", "target": "command_purgedoctorscommand_purgedoctorscommand_configure", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L41", "weight": 1.0}, {"source": "command_purgedoctorscommand_purgedoctorscommand", "target": "command_purgedoctorscommand_purgedoctorscommand_execute", "relation": "method", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47", "weight": 1.0}, {"source": "command_purgedoctorscommand_purgedoctorscommand_execute", "target": "inputinterface", "relation": "references", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47", "weight": 1.0, "context": "parameter_type"}, {"source": "command_purgedoctorscommand_purgedoctorscommand_execute", "target": "outputinterface", "relation": "references", "confidence": "EXTRACTED", "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L47", "weight": 1.0, "context": "parameter_type"}, {"source": "command_purgedoctorscommand_purgedoctorscommand_execute", "target": "command", "relation": "references_constant", "confidence": "EXTRACTED", "confidence_score": 1.0, "source_file": "src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L54", "weight": 1.0}], "raw_calls": [{"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_construct", "callee": "parent", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L38", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_configure", "callee": "addOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L43", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_configure", "callee": "addOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L44", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "getOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L50", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "getOption", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L52", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "error", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L53", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "section", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L57", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "fetchOne", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L61", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "table", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L63", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "warning", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L66", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "executeStatement", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L70", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "executeStatement", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L73", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "text", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L74", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "sprintf", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L74", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "executeStatement", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L77", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "text", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L80", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "sprintf", "is_member_call": false, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L80", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "executeStatement", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L82", "receiver": null}, {"caller_nid": "command_purgedoctorscommand_purgedoctorscommand_execute", "callee": "success", "is_member_call": true, "source_file": "/Users/hamed/pj/my_pj/clinic_pro/clinicpro/src/Doctor/Command/PurgeDoctorsCommand.php", "source_location": "L85", "receiver": null}]}