Files
clinicpro/graphify-out/cache/ast/v0.8.44/2cb340da1777982d5574a2b0814759c29b69df1c17c980a29833e9cb256eaf14.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
10 KiB
JSON

{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_claude_prompt_fix_doctor_name_and_purge_md", "label": "fix-doctor-name-and-purge.md", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L1"}, {"id": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "label": "\u0631\u0641\u0639 \u0646\u0627\u0645 \u062f\u0648\u062a\u0627\u06cc\u06cc \u00ab\u062f\u06a9\u062a\u0631\u00bb \u062f\u0631 \u0627\u06cc\u0645\u067e\u0648\u0631\u062a IRIMC + \u062f\u0633\u062a\u0648\u0631 \u067e\u0627\u06a9\u200c\u0633\u0627\u0632\u06cc \u06a9\u0627\u0645\u0644 \u067e\u0632\u0634\u06a9\u0627\u0646", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L1"}, {"id": "prompt_fix_doctor_name_and_purge_\u067e\u0631\u0648\u0698\u0647", "label": "\u067e\u0631\u0648\u0698\u0647", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L3"}, {"id": "prompt_fix_doctor_name_and_purge_\u0632\u0645\u06cc\u0646\u0647", "label": "\u0632\u0645\u06cc\u0646\u0647", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L7"}, {"id": "prompt_fix_doctor_name_and_purge_\u0645\u0634\u06a9\u0644_\u0647\u062f\u0641", "label": "\u0645\u0634\u06a9\u0644 / \u0647\u062f\u0641", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L30"}, {"id": "prompt_fix_doctor_name_and_purge_\u0641\u0627\u06cc\u0644_\u0647\u0627\u06cc_\u0645\u0631\u062a\u0628\u0637", "label": "\u0641\u0627\u06cc\u0644\u200c\u0647\u0627\u06cc \u0645\u0631\u062a\u0628\u0637", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L36"}, {"id": "prompt_fix_doctor_name_and_purge_\u0648\u0636\u0639\u06cc\u062a_\u0641\u0639\u0644\u06cc", "label": "\u0648\u0636\u0639\u06cc\u062a \u0641\u0639\u0644\u06cc", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L45"}, {"id": "prompt_fix_doctor_name_and_purge_\u0648\u0638\u0627\u06cc\u0641", "label": "\u0648\u0638\u0627\u06cc\u0641", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L64"}, {"id": "prompt_fix_doctor_name_and_purge_\u06f1_\u062d\u0630\u0641_\u067e\u06cc\u0634\u0648\u0646\u062f_\u062f\u06a9\u062a\u0631_\u0647\u0646\u06af\u0627\u0645_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a", "label": "\u06f1. \u062d\u0630\u0641 \u067e\u06cc\u0634\u0648\u0646\u062f \u00ab\u062f\u06a9\u062a\u0631\u00bb \u0647\u0646\u06af\u0627\u0645 \u0627\u06cc\u0645\u067e\u0648\u0631\u062a", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L66"}, {"id": "prompt_fix_doctor_name_and_purge_\u06f2_\u0627\u0635\u0644\u0627\u062d_\u0631\u06a9\u0648\u0631\u062f\u0647\u0627\u06cc_irimc_\u0645\u0648\u062c\u0648\u062f", "label": "\u06f2. \u0627\u0635\u0644\u0627\u062d \u0631\u06a9\u0648\u0631\u062f\u0647\u0627\u06cc IRIMC \u0645\u0648\u062c\u0648\u062f", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L85"}, {"id": "prompt_fix_doctor_name_and_purge_\u06f3_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646_\u062f\u06cc\u062a\u0627\u0628\u06cc\u0633_\u062a\u0645\u06cc\u0632_\u062a\u0633\u062a", "label": "\u06f3. \u062f\u0633\u062a\u0648\u0631 \u067e\u0627\u06a9\u200c\u0633\u0627\u0632\u06cc \u06a9\u0627\u0645\u0644 \u067e\u0632\u0634\u06a9\u0627\u0646 (\u062f\u06cc\u062a\u0627\u0628\u06cc\u0633 \u062a\u0645\u06cc\u0632 \u062a\u0633\u062a)", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L99"}, {"id": "prompt_fix_doctor_name_and_purge_\u0646\u06a9\u0627\u062a_\u0645\u0647\u0645", "label": "\u0646\u06a9\u0627\u062a \u0645\u0647\u0645", "file_type": "document", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L131"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_claude_prompt_fix_doctor_name_and_purge_md", "target": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L1", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u067e\u0631\u0648\u0698\u0647", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L3", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0632\u0645\u06cc\u0646\u0647", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L7", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0645\u0634\u06a9\u0644_\u0647\u062f\u0641", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L30", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0641\u0627\u06cc\u0644_\u0647\u0627\u06cc_\u0645\u0631\u062a\u0628\u0637", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L36", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0648\u0636\u0639\u06cc\u062a_\u0641\u0639\u0644\u06cc", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L45", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0648\u0638\u0627\u06cc\u0641", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L64", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0648\u0638\u0627\u06cc\u0641", "target": "prompt_fix_doctor_name_and_purge_\u06f1_\u062d\u0630\u0641_\u067e\u06cc\u0634\u0648\u0646\u062f_\u062f\u06a9\u062a\u0631_\u0647\u0646\u06af\u0627\u0645_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L66", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0648\u0638\u0627\u06cc\u0641", "target": "prompt_fix_doctor_name_and_purge_\u06f2_\u0627\u0635\u0644\u0627\u062d_\u0631\u06a9\u0648\u0631\u062f\u0647\u0627\u06cc_irimc_\u0645\u0648\u062c\u0648\u062f", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L85", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0648\u0638\u0627\u06cc\u0641", "target": "prompt_fix_doctor_name_and_purge_\u06f3_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646_\u062f\u06cc\u062a\u0627\u0628\u06cc\u0633_\u062a\u0645\u06cc\u0632_\u062a\u0633\u062a", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L99", "weight": 1.0}, {"source": "prompt_fix_doctor_name_and_purge_\u0631\u0641\u0639_\u0646\u0627\u0645_\u062f\u0648\u062a\u0627\u06cc\u06cc_\u062f\u06a9\u062a\u0631_\u062f\u0631_\u0627\u06cc\u0645\u067e\u0648\u0631\u062a_irimc_\u062f\u0633\u062a\u0648\u0631_\u067e\u0627\u06a9_\u0633\u0627\u0632\u06cc_\u06a9\u0627\u0645\u0644_\u067e\u0632\u0634\u06a9\u0627\u0646", "target": "prompt_fix_doctor_name_and_purge_\u0646\u06a9\u0627\u062a_\u0645\u0647\u0645", "relation": "contains", "confidence": "EXTRACTED", "source_file": ".claude/prompt/fix-doctor-name-and-purge.md", "source_location": "L131", "weight": 1.0}], "input_tokens": 0, "output_tokens": 0}