Refactor code structure for improved readability and maintainability

This commit is contained in:
hamed
2026-07-12 09:54:44 +03:30
parent ca66b86cf9
commit 476d5bb80e
16 changed files with 1617 additions and 907 deletions
@@ -0,0 +1,91 @@
# پروفایل unclaimed پزشک — حذف امتیاز پیش‌فرض جعلی از پاسخ API
## پروژه
`clinicpro` (backend) — **cross-repo**. پرامپت همتای frontend:
`nobat724_front/.claude/prompt/unclaimed-doctor-public-page.md`
این تغییر backend باید **اول** انجام شود؛ سایت عمومی و پنل ادمین و tauri همگی همین پاسخ را مصرف می‌کنند.
## زمینه
پزشکانِ ایمپورت‌شده از نظام پزشکی (IRIMC) با `owner_status = 'unclaimed'` ساخته می‌شوند و هیچ‌گاه فیلد امتیاز ست نمی‌شود؛ پس مقادیر پیش‌فرضِ انتیتی (`doctor_rate = 3.5`, `doctor_rate_percentage = 60`) به‌عنوان امتیاز واقعی در پاسخ عمومی برمی‌گردند. سایت این‌ها را به‌صورت «امتیاز: ۳.۵» و «۶۰٪ رضایت» و در JSON-LD به‌صورت `AggregateRating` نشان می‌دهد — در حالی که تعداد نظرات واقعی صفر است.
## مشکل / هدف
- **بحرانی:** داده‌ی امتیاز جعلی برای پروفایل بدون صاحب. هم گمراه‌کننده، هم نقض دستورالعمل structured data گوگل (ریویوی جعلی) و ریسک جریمه.
- هدف: تا وقتی پروفایل `claimed` نشده، فیلدهای امتیاز در پاسخ عمومی **null** برگردند (نه مقدار پیش‌فرض). بعد از claim، رفتار عادی برگردد (بدون تغییر، چون آن‌موقع `owner_status='claimed'`).
## فایل‌های مرتبط
| فایل | نقش |
|------|-----|
| `src/Doctor/Entity/Doctor.php` | `toDetailArray()` (L530576) و `toListArray()` (L506–528) — سریال‌سازی `satisfaction`/`point`/`owner_status` |
| `src/Doctor/Controller/DoctorController.php` | `show()` L149173 (public `GET /api/v1/doctor/{uuid}``list()` L244260 (public `GET /api/v1/doctors`) — بدون تغییر، فقط مصرف‌کننده |
| `docs/api/doctor.md` | باید به‌روز شود |
## وضعیت فعلی
فیلدهای انتیتی (`src/Doctor/Entity/Doctor.php`):
```php
#[ORM\Column(name: 'doctor_rate', type: 'float')]
private float $doctorRate = 3.5; // L6768
#[ORM\Column(name: 'doctor_rate_percentage', type: 'float')]
private float $doctorRatePercentage = 60.0; // L7071
// owner_status enum: claimed | unclaimed | pending_transfer (L83)
#[ORM\Column(name: 'owner_status', type: 'string', length: 20)]
private string $ownerStatus = 'claimed'; // L8485
```
سریال‌سازی فعلی (هر دو آرایه امتیاز را همیشه برمی‌گردانند):
```php
// toDetailArray() L557559
'satisfaction' => (string) $this->doctorRatePercentage,
'point' => (string) $this->doctorRate,
'owner_status' => $this->ownerStatus,
// toListArray() L521526 — همان دو کلید + owner_status
```
## وظایف
### ۱. helper برای «آیا امتیاز واقعی نمایش داده شود؟»
در `Doctor.php` یک متد کوچک اضافه کن (منبع واحد منطق):
```php
/** امتیاز فقط برای پروفایل claimed معتبر است؛ unclaimed/pending_transfer مقدار پیش‌فرض جعلی دارد. */
public function hasPublicRating(): bool
{
return $this->ownerStatus === 'claimed';
}
```
### ۲. null کردن امتیاز در `toDetailArray()` و `toListArray()`
در هر دو متد، به‌جای مقدار مستقیم:
```php
'satisfaction' => $this->hasPublicRating() ? (string) $this->doctorRatePercentage : null,
'point' => $this->hasPublicRating() ? (string) $this->doctorRate : null,
```
`owner_status` بدون تغییر بماند (frontend به آن نیاز دارد). کلیدها **حذف نشوند**، فقط مقدارشان `null` شود تا شکل پاسخ نشکند.
### ۳. مستندسازی
`docs/api/doctor.md` را به‌روز کن:
- در توضیح فیلدهای پاسخ single (L83118) و list (L196222) ذکر کن: `point` و `satisfaction` برای `owner_status !== 'claimed'` مقدار `null` دارند.
- یک خط در header note اضافه کن که امتیاز پیش‌فرض فقط برای پروفایل claimed منتشر می‌شود.
## نکات مهم
- **پاسخ double-nested است**: `show()` از `$this->success(['data' => array_merge($doctor->toDetailArray($schedule), [...])])` استفاده می‌کند → frontend با `data.data.data` می‌خواند. شکل را تغییر نده، فقط مقدار دو کلید.
- **بعد از claim خودکار درست می‌شود**: `DoctorClaimService::finalize()` وضعیت را به `'claimed'` می‌برد → `hasPublicRating()` صحیح می‌شود → امتیاز واقعی برمی‌گردد. نیازی به منطق اضافه برای «برگشت به حالت عادی» نیست.
- `pending_transfer` هم مثل `unclaimed` امتیاز نداشته باشد (فقط `claimed` امتیاز دارد).
- تست موجود اگر روی `toDetailArray`/`toListArray` هست را چک کن (مقدار `point`/`satisfaction` ممکن است اکنون `null` شود). `ddev exec php bin/phpunit`.
- migration لازم **نیست** (فقط منطق سریال‌سازی، نه تغییر schema).
- بعد از تغییر: `ddev exec php vendor/bin/phpstan analyse` و `graphify update .`.
+7
View File
@@ -3,6 +3,11 @@
> فیلد `owner_status` (`claimed` | `unclaimed` | `pending_transfer`) به خروجی لیست و جزئیات پزشک
> اضافه شده است — پروفایل `unclaimed` (ایمپورت نظام پزشکی) در سایت دکمهٔ «تصاحب پروفایل» می‌گیرد
> (`docs/api/doctor-claim.md`) و نوبت‌دهی آنلاینش غیرفعال است.
>
> **امتیاز فقط برای پروفایل `claimed` منتشر می‌شود.** برای هر `owner_status` غیر از `claimed`
> (یعنی `unclaimed` / `pending_transfer`) فیلدهای `point` و `satisfaction` مقدار `null` برمی‌گردند —
> مقدار پیش‌فرض انتیتی (`3.5` / `60`) نشتی نمی‌کند تا امتیاز جعلی/`AggregateRating` جعلی ساخته نشود.
> بعد از تصاحب و claimed شدن، امتیاز واقعی به‌صورت خودکار برمی‌گردد.
> **Prefix:** `/api/v1/doctor`, `/api/v1/doctors`, `/api/v1/clinic-pro/doctor-address*`
>
@@ -221,6 +226,8 @@ List doctors with pagination and filters.
}
```
> ️ `point` و `satisfaction` فقط برای `owner_status="claimed"` مقدار دارند؛ برای `unclaimed`/`pending_transfer` هر دو `null` هستند.
---
## PATCH `/api/v1/doctor/{uuid}`
+3 -3
View File
@@ -713,6 +713,7 @@
"711": "Community 711",
"712": "Community 712",
"713": "Community 713",
"714": "Community 714",
"715": "Community 715",
"716": "Community 716",
"717": "Community 717",
@@ -726,12 +727,12 @@
"725": "Community 725",
"726": "Community 726",
"727": "Community 727",
"728": "Community 728",
"729": "Community 729",
"730": "Community 730",
"731": "Community 731",
"732": "Community 732",
"733": "Community 733",
"734": "Community 734",
"735": "Community 735",
"736": "Community 736",
"738": "Community 738",
"739": "Community 739",
@@ -756,7 +757,6 @@
"763": "Community 763",
"764": "Community 764",
"766": "Community 766",
"767": "Community 767",
"768": "Community 768",
"769": "Community 769",
"770": "Community 770",
+131 -115
View File
@@ -1,16 +1,16 @@
# Graph Report - clinicpro (2026-07-11)
# Graph Report - clinicpro (2026-07-12)
## Corpus Check
- 767 files · ~566,250 words
- 768 files · ~567,734 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 9614 nodes · 13338 edges · 762 communities (602 shown, 160 thin omitted)
- 9637 nodes · 13372 edges · 762 communities (606 shown, 156 thin omitted)
- Extraction: 98% EXTRACTED · 2% INFERRED · 0% AMBIGUOUS · INFERRED: 294 edges (avg confidence: 0.8)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `3dcd4f3b`
- Built from commit: `ca66b86c`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@@ -715,6 +715,7 @@
- [[_COMMUNITY_Community 711|Community 711]]
- [[_COMMUNITY_Community 712|Community 712]]
- [[_COMMUNITY_Community 713|Community 713]]
- [[_COMMUNITY_Community 714|Community 714]]
- [[_COMMUNITY_Community 715|Community 715]]
- [[_COMMUNITY_Community 716|Community 716]]
- [[_COMMUNITY_Community 717|Community 717]]
@@ -728,12 +729,12 @@
- [[_COMMUNITY_Community 725|Community 725]]
- [[_COMMUNITY_Community 726|Community 726]]
- [[_COMMUNITY_Community 727|Community 727]]
- [[_COMMUNITY_Community 728|Community 728]]
- [[_COMMUNITY_Community 729|Community 729]]
- [[_COMMUNITY_Community 730|Community 730]]
- [[_COMMUNITY_Community 731|Community 731]]
- [[_COMMUNITY_Community 732|Community 732]]
- [[_COMMUNITY_Community 733|Community 733]]
- [[_COMMUNITY_Community 734|Community 734]]
- [[_COMMUNITY_Community 735|Community 735]]
- [[_COMMUNITY_Community 736|Community 736]]
- [[_COMMUNITY_Community 738|Community 738]]
- [[_COMMUNITY_Community 739|Community 739]]
@@ -756,7 +757,6 @@
- [[_COMMUNITY_Community 763|Community 763]]
- [[_COMMUNITY_Community 764|Community 764]]
- [[_COMMUNITY_Community 766|Community 766]]
- [[_COMMUNITY_Community 767|Community 767]]
- [[_COMMUNITY_Community 768|Community 768]]
- [[_COMMUNITY_Community 769|Community 769]]
- [[_COMMUNITY_Community 770|Community 770]]
@@ -765,7 +765,7 @@
## God Nodes (most connected - your core abstractions)
1. `BaseController` - 86 edges
2. `ApiTestCase` - 80 edges
3. `Doctor` - 59 edges
3. `Doctor` - 60 edges
4. `api` - 56 edges
5. `UserProfile` - 52 edges
6. `Clinic` - 50 edges
@@ -781,19 +781,19 @@
assets/admin/components/ui/Pagination.tsx → assets/admin/lib/utils.ts
- `MyFinancialPage()` --calls--> `formatRial()` [EXTRACTED]
assets/admin/pages/MyFinancialPage.tsx → assets/admin/lib/utils.ts
- `SettlementsPage()` --calls--> `formatRial()` [EXTRACTED]
assets/admin/pages/SettlementsPage.tsx → assets/admin/lib/utils.ts
- `RepresentationSettlementPage()` --calls--> `formatRial()` [EXTRACTED]
assets/admin/pages/RepresentationSettlementPage.tsx → assets/admin/lib/utils.ts
- `LogsPage()` --calls--> `formatDateTime()` [EXTRACTED]
assets/admin/pages/LogsPage.tsx → assets/admin/lib/utils.ts
## Import Cycles
- None detected.
## Communities (762 total, 160 thin omitted)
## Communities (762 total, 156 thin omitted)
### Community 0 - "Community 0"
Cohesion: 0.05
Nodes (39): ALLOWED_ROLES, PrivateRoute(), PublicRoute(), RoleRoute(), queryClient, toastStyle, DEGREE_OPTIONS, DoctorFormPage() (+31 more)
Nodes (39): ALLOWED_ROLES, PrivateRoute(), PublicRoute(), RoleRoute(), queryClient, toastStyle, AddForm, addSchema (+31 more)
### Community 1 - "Community 1"
Cohesion: 0.03
@@ -808,24 +808,24 @@ Cohesion: 0.10
Nodes (20): `RepresentationActionController` — welcome به‌صورت inline (بدون تمپلت), `SmsMessageTemplate::DEFAULTS` (فاقد نام تمپلت و نگاشت token), `SmsService::sendNow` — انتخاب بین lookup و متن‌آزاد, الگوی فعلی همه‌ی call-siteها (به‌جز OTP) — متن‌آزاد، بدون `templateCode`, تبدیل همه‌ی پیامک‌های سیستمی به VerifyLookup کاوه‌نگار (تمپلت نام‌دار), تنها جای درست (OTP) — که باید الگوی بقیه شود, زمینه, فایل‌های مرتبط (+12 more)
### Community 4 - "Community 4"
Cohesion: 0.07
Nodes (5): Doctor, Collection, self, User, WeeklySchedule
Cohesion: 0.06
Nodes (8): DoctorService, Doctor, DoctorServiceRepository, Collection, self, User, WeeklySchedule, ManagerRegistry
### Community 5 - "Community 5"
Cohesion: 0.07
Nodes (3): UserProfile, self, User
### Community 6 - "Community 6"
Cohesion: 0.09
Nodes (15): SettlementController, SettlementRepository, WalletTransactionRepository, CommissionService, Settlement, JsonResponse, Request, User (+7 more)
Cohesion: 0.12
Nodes (12): SettlementController, SettlementRepository, WalletTransactionRepository, Settlement, JsonResponse, Request, User, ManagerRegistry (+4 more)
### Community 7 - "Community 7"
Cohesion: 0.05
Nodes (11): DoctorServiceController, DoctorService, Clinic, DoctorServiceRepository, Collection, Doctor, self, User (+3 more)
Cohesion: 0.07
Nodes (5): Clinic, Collection, Doctor, self, User
### Community 8 - "Community 8"
Cohesion: 0.08
Nodes (27): useSubscription(), AdminLayout(), avatarBg(), buildSections(), HUES, Props, ROLE_LABELS, Section (+19 more)
Cohesion: 0.13
Nodes (18): useSubscription(), AdminLayout(), avatarBg(), buildSections(), HUES, Props, ROLE_LABELS, Section (+10 more)
### Community 9 - "Community 9"
Cohesion: 0.04
@@ -840,24 +840,24 @@ Cohesion: 0.50
Nodes (4): UserActiveContextRepository, ManagerRegistry, User, UserActiveContext
### Community 12 - "Community 12"
Cohesion: 0.05
Nodes (42): Clinic Doctor Invitation API, DELETE `/api/v1/admin/clinic/invitation/{invUuid}`, Errors, Errors, Errors, Errors, Errors, Errors (+34 more)
Cohesion: 0.04
Nodes (47): Clinic Doctor Invitation API, DELETE `/api/v1/admin/clinic/invitation/{invUuid}`, Errors, Errors, Errors, Errors, Errors, Errors (+39 more)
### Community 13 - "Community 13"
Cohesion: 0.05
Nodes (35): get, PaymentConfig, PaymentGatewayInfo, api, ApiError, ApiResponse, downloadFile(), getToken() (+27 more)
Nodes (39): get, PaymentConfig, PaymentGatewayInfo, api, ApiError, ApiResponse, downloadFile(), getToken() (+31 more)
### Community 14 - "Community 14"
Cohesion: 0.15
Nodes (8): AppointmentSettingsController, Holiday, HolidayRepository, JsonResponse, Request, User, Doctor, ManagerRegistry
Cohesion: 0.10
Nodes (12): AppointmentSettingsController, DateOverride, Holiday, DateOverrideRepository, HolidayRepository, JsonResponse, Request, User (+4 more)
### Community 15 - "Community 15"
Cohesion: 0.25
Nodes (7): PaymentController, Appointment, JsonResponse, Payment, Request, Response, User
### Community 16 - "Community 16"
Cohesion: 0.07
Nodes (7): PatientSession, SmsWallet, Appointment, Collection, PatientRecord, self, SessionService
Cohesion: 0.06
Nodes (8): PatientSession, SmsWallet, AppLog, Appointment, Collection, PatientRecord, self, SessionService
### Community 17 - "Community 17"
Cohesion: 0.05
@@ -868,20 +868,20 @@ Cohesion: 0.05
Nodes (38): API, API, API, API, API, Route, Route, Route (+30 more)
### Community 19 - "Community 19"
Cohesion: 0.03
Nodes (57): usePaymentConfig(), CityForm, citySchema, ImportError, InsuranceForm, insuranceSchema, LogoUploadField(), ProvinceForm (+49 more)
Cohesion: 0.06
Nodes (22): CityForm, citySchema, ImportError, InsuranceForm, insuranceSchema, LogoUploadField(), ProvinceForm, provinceSchema (+14 more)
### Community 20 - "Community 20"
Cohesion: 0.13
Nodes (4): AdminApiController, JsonResponse, Request, StreamedResponse
### Community 21 - "Community 21"
Cohesion: 0.03
Nodes (48): formatNumber(), ClinicAddress, ClinicDetailPage(), ClinicDoctorItem, ClinicInvitation, EditForm, editSchema, HUES_LIST (+40 more)
Cohesion: 0.04
Nodes (58): usePaymentConfig(), formatNumber(), formatRial(), emptyFeatures(), FEATURE_KEYS, FEATURE_LABELS, PeriodForm, periodSchema (+50 more)
### Community 22 - "Community 22"
Cohesion: 0.29
Nodes (4): RatingController, JsonResponse, Request, User
Cohesion: 0.12
Nodes (10): RatingController, Like, CommentListNPlusOneTest, LikeRepository, JsonResponse, Request, User, Comment (+2 more)
### Community 23 - "Community 23"
Cohesion: 0.05
@@ -900,8 +900,8 @@ Cohesion: 0.24
Nodes (4): InsuranceController, JsonResponse, Request, User
### Community 27 - "Community 27"
Cohesion: 0.05
Nodes (40): 55. 🟢 `GET` all tag, 56. 🟢 `GET` supplementary_insurance, 57. 🟢 `GET` categories list, 58. 🟢 `GET` all state, 59. 🟢 `GET` all city, 60. 🟢 `GET` all specially doctor, 61. 🔵 `POST` post, 62. 🟡 `PATCH` patch (+32 more)
Cohesion: 0.06
Nodes (35): 55. 🟢 `GET` all tag, 56. 🟢 `GET` supplementary_insurance, 57. 🟢 `GET` categories list, 58. 🟢 `GET` all state, 59. 🟢 `GET` all city, 60. 🟢 `GET` all specially doctor, 62. 🟡 `PATCH` patch, 63. 🔴 `DELETE` DELETE (+27 more)
### Community 28 - "Community 28"
Cohesion: 0.08
@@ -911,6 +911,10 @@ Nodes (4): Appointment, Doctor, self, User
Cohesion: 0.06
Nodes (35): Bulk import / export, DELETE `/api/v1/admin/city/{id}`, DELETE `/api/v1/admin/province/{id}`, Errors, Errors, Errors, Errors, GET `/api/v1/admin/cities` (+27 more)
### Community 30 - "Community 30"
Cohesion: 0.06
Nodes (22): ClinicAddress, ClinicDoctorItem, ClinicInvitation, EditForm, editSchema, HUES_LIST, INV_STATUS_MAP, IRAN_CENTER (+14 more)
### Community 31 - "Community 31"
Cohesion: 0.06
Nodes (33): `AppointmentStatusDropdown.tsx`, Doctor Tabs در داشبورد کلینیک, Pagination, `PersianCalendar.tsx`, Stats Bar, Status Badge (inline قابل کلیک), Status Dropdown (کلیک روی badge), Toolbar (+25 more)
@@ -920,8 +924,8 @@ Cohesion: 0.06
Nodes (32): 10. Modal / Dialog, 11. Toast Notifications, 12. Empty States & Loading, 13. Page Header (هر صفحه), 14. تکنولوژی Stack, 15. Responsive Breakpoints, 16. Dark Mode (اختیاری — فاز دوم), 17. نمونه رنگ‌بندی صفحه داشبورد (+24 more)
### Community 33 - "Community 33"
Cohesion: 0.07
Nodes (22): CoverageRow, Draft, KIND, TenantInsurance, ServiceTariffModal(), TariffResponse, TariffRow, Contract (+14 more)
Cohesion: 0.09
Nodes (17): CoverageRow, Draft, KIND, TenantInsurance, ServiceTariffModal(), TariffResponse, TariffRow, EMPTY_ITEMS (+9 more)
### Community 34 - "Community 34"
Cohesion: 0.06
@@ -984,8 +988,8 @@ Cohesion: 0.11
Nodes (4): Payment, Appointment, self, User
### Community 49 - "Community 49"
Cohesion: 0.08
Nodes (19): AppointmentsPage(), BookingSlot, CancelledBadge(), DateNavigator(), EMPTY_ARR, getPersianWeekDay(), navBtnSx, NewAppointmentModal() (+11 more)
Cohesion: 0.09
Nodes (18): AppointmentsPage(), BookingSlot, CancelledBadge(), DateNavigator(), EMPTY_ARR, getPersianWeekDay(), navBtnSx, NewAppointmentModal() (+10 more)
### Community 50 - "Community 50"
Cohesion: 0.07
@@ -1000,8 +1004,8 @@ Cohesion: 0.07
Nodes (26): الزامات UI, باگ‌فیکس صفحه نوبت‌ها, باگ ۱ — کرش تقویم, باگ ۲ — روز هفته در DateNavigator, باگ ۳ — پیام «slot نیست», باگ ۴ — نوبت جدید: نام اجباری + find-or-create patient, باگ ۵ — patient_mobile نشان می‌دهد موبایل پزشک, باگ ۶ — نوبت‌های رزرو شده در نمایش زمانبندی (+18 more)
### Community 53 - "Community 53"
Cohesion: 0.09
Nodes (15): AppLogRepository, ClaimItemRepository, DoctorClaimRequestRepository, DoctorInsuranceRepository, InvoiceRepository, PreRegistrationRepository, ServiceEntityRepository, ManagerRegistry (+7 more)
Cohesion: 0.08
Nodes (15): AppLogRepository, ClaimItemRepository, DoctorClaimRequestRepository, PreRegistrationRepository, ProvinceRepository, SmsSettingsRepository, ServiceEntityRepository, SmsSettings (+7 more)
### Community 54 - "Community 54"
Cohesion: 0.10
@@ -1040,12 +1044,12 @@ Cohesion: 0.08
Nodes (25): Bulk import / export, DELETE `/api/v1/admin/specialty/{id}`, Errors, Errors, Errors, Errors, GET `/api/v1/admin/specialties`, GET `/api/v1/specialties` (+17 more)
### Community 63 - "Community 63"
Cohesion: 0.05
Nodes (50): FreeVisitPrice(), Pricing, cn(), formatDate(), formatDateTime(), formatRial(), iranMobileOptionalSchema, iranMobileSchema (+42 more)
Cohesion: 0.09
Nodes (28): FreeVisitPrice(), Pricing, cn(), formatDateTime(), iranMobileOptionalSchema, iranMobileSchema, isValidIranMobile(), maskMobile() (+20 more)
### Community 64 - "Community 64"
Cohesion: 0.19
Nodes (7): SmsWalletController, SmsSettingsRepository, SmsSettings, JsonResponse, Request, User, ManagerRegistry
Cohesion: 0.29
Nodes (4): SmsWalletController, JsonResponse, Request, User
### Community 65 - "Community 65"
Cohesion: 0.08
@@ -1117,7 +1121,7 @@ Nodes (30): devDependencies, @babel/core, @babel/preset-env, @babel/preset-react
### Community 86 - "Community 86"
Cohesion: 0.06
Nodes (16): AppointmentExpiryServiceTest, LowTierFixesTest, SendCodeMobileRateLimitTest, ClaimsListPaginationTest, CaptchaFlowTest, ServiceItemStaffOwnershipTest, EntityManagerInterface, KernelBrowser (+8 more)
Nodes (15): AppointmentExpiryServiceTest, DateOverrideOwnershipTest, LowTierFixesTest, SendCodeMobileRateLimitTest, ClaimsListPaginationTest, CaptchaFlowTest, ServiceItemStaffOwnershipTest, EntityManagerInterface (+7 more)
### Community 87 - "Community 87"
Cohesion: 0.10
@@ -1140,7 +1144,7 @@ Cohesion: 0.10
Nodes (20): DELETE `/api/v1/admin/users/{uuid}`, Errors, Errors, GET `/api/v1/admin/users`, GET `/api/v1/admin/users/stats`, GET `/api/v1/admin/users/{uuid}`, POST `/api/v1/admin/users/{uuid}/status`, PUT `/api/v1/admin/users/{uuid}` (+12 more)
### Community 92 - "Community 92"
Cohesion: 0.09
Cohesion: 0.10
Nodes (21): Bulk import / export, DELETE `/api/v1/admin/doctor-service/{id}`, Doctor Service API, Errors, Errors, Errors, Errors, GET `/api/v1/admin/doctor-services` (+13 more)
### Community 93 - "Community 93"
@@ -1188,8 +1192,8 @@ Cohesion: 0.11
Nodes (18): `AdminApiController::paymentDetail` — الان فقط GET, `MellatGateway.php` — الگوی موجود REST/SOAP (پس از کار sandbox), `PaymentGatewayInterface.php`, `PaymentManager.php` — الگوی log و transaction, برگشت/استرداد وجه ملت از پنل ادمین (bpReversalRequest / bpRefundRequest), زمینه, فایل‌های مرتبط, نکات مهم (+10 more)
### Community 104 - "Community 104"
Cohesion: 0.18
Nodes (6): TagController, TagRepository, JsonResponse, Request, ManagerRegistry, Tag
Cohesion: 0.35
Nodes (3): TagController, JsonResponse, Request
### Community 105 - "Community 105"
Cohesion: 0.11
@@ -1436,8 +1440,8 @@ Cohesion: 0.10
Nodes (20): api.ir (استعلام هویت — Shahkar / IbanMatch), اتصال به دیتابیس‌های مستقل (الزامی), اسرار (الزامی — قبل از اولین دیپلوی), امنیت و منابع, بررسی سلامت, دامنه‌ها و CORS, دیپلوی‌های بعدی, راهنمای دیپلوی ClinicPro (Coolify + Docker Compose) (+12 more)
### Community 169 - "Community 169"
Cohesion: 0.15
Nodes (5): EntityInsurancePricing, TenantInsuranceCleanupTest, EntityInsurancePricingRepository, TenantInsuranceCleanupService, ManagerRegistry
Cohesion: 0.22
Nodes (4): EntityInsurancePricing, TenantInsuranceCleanupTest, EntityInsurancePricingRepository, ManagerRegistry
### Community 170 - "Community 170"
Cohesion: 0.13
@@ -1636,8 +1640,8 @@ Cohesion: 0.23
Nodes (5): PaymentRepository, Appointment, ManagerRegistry, Payment, User
### Community 225 - "Community 225"
Cohesion: 0.13
Nodes (12): AdminUserDetail, AVATAR_COLORS, EditForm, editSchema, GENDER_LABELS, getPrimaryRole(), MARITAL_LABELS, MEDICAL_SECTIONS (+4 more)
Cohesion: 0.05
Nodes (32): formatDate(), Claim, ClaimItem, DebtRow, InsuranceOption, KIND_LABEL, STATUS_FILTERS, STATUS_META (+24 more)
### Community 226 - "Community 226"
Cohesion: 0.15
@@ -1648,8 +1652,8 @@ Cohesion: 0.17
Nodes (11): تشخیص عمیق down شدن سرور بعد از ~۱۰ سیکل + وریفای و تکمیل فیکس‌های پایداری, زمینه, فایل‌های مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی, وظایف, ۱. وریفای فیکس‌های repo (idempotent) (+3 more)
### Community 228 - "Community 228"
Cohesion: 0.20
Nodes (10): Bulk import / export, DELETE `/api/v1/admin/insurance/{id}`, DELETE `/api/v1/insurance/{id}`, EntityInsurancePricing — قیمت‌گذاری ویزیت بر اساس بیمه, GET `/api/v1/insurance/{id}`, Insurance API, Response `200`, Response `200` (+2 more)
Cohesion: 0.04
Nodes (47): Bulk import / export, DELETE `/api/v1/admin/insurance/{id}`, DELETE `/api/v1/billing/tenant-insurances/{uuid}`, DELETE `/api/v1/insurance/{id}`, EntityInsurancePricing — قیمت‌گذاری ویزیت بر اساس بیمه, Errors, Errors, Errors (+39 more)
### Community 229 - "Community 229"
Cohesion: 0.14
@@ -1712,8 +1716,8 @@ Cohesion: 0.28
Nodes (4): SubscriptionService, ClinicSubscription, Payment, SubscriptionPlan
### Community 245 - "Community 245"
Cohesion: 0.15
Nodes (11): emptyFeatures(), FEATURE_KEYS, FEATURE_LABELS, PeriodForm, periodSchema, PLAN_DISPLAY, PlanForm, planSchema (+3 more)
Cohesion: 0.14
Nodes (10): ChargeForm, chargeSchema, EMPTY_LOGS, POST_VISIT_VARS, REMINDER_HOUR_OPTIONS, SmsSettings, SmsWalletBalance, SmsWalletLog (+2 more)
### Community 246 - "Community 246"
Cohesion: 0.17
@@ -1756,8 +1760,8 @@ Cohesion: 0.18
Nodes (11): GET /api/v1/doctors/{id}, GET /api/v1/doctors/{id}/insurances, GET /api/v1/representations/{id}, GET /oauth/userinfo — اطلاعات کاربر (سازگار با دروپال), POST /api/v1/representations/{id}/bank-accounts, POST /oauth/token — تجدید توکن (Refresh), POST /oauth/token — ورود به سیستم, Task-02: احراز هویت (Authentication) (+3 more)
### Community 256 - "Community 256"
Cohesion: 0.12
Nodes (16): `200 OK` (به‌روزرسانی شد), `200 OK` (رد به‌دلیل تصاحب‌شده), `201 Created` (ساخته شد), `422` (اعتبارسنجی), backfill نقش جانشین‌های قدیمی, Doctor Import (IRIMC) API, idempotency, Request (+8 more)
Cohesion: 0.11
Nodes (18): `200 OK` (به‌روزرسانی شد), `200 OK` (رد به‌دلیل تصاحب‌شده), `200 OK` (رد به‌دلیل کد نظام پزشکی تکراری با منبع دیگر), `201 Created` (ساخته شد), `422` (اعتبارسنجی), backfill نقش جانشین‌های قدیمی, Doctor Import (IRIMC) API, idempotency (+10 more)
### Community 258 - "Community 258"
Cohesion: 0.15
@@ -1788,8 +1792,8 @@ Cohesion: 0.30
Nodes (4): RepresentationRepository, ManagerRegistry, Representation, User
### Community 265 - "Community 265"
Cohesion: 0.15
Nodes (17): calcFinalPrice(), EMPTY_RECORDS, EMPTY_SESSIONS, fileNumber(), getPatientName(), getPatientPhone(), InsurancePricing, MyPatientsPageInner() (+9 more)
Cohesion: 0.08
Nodes (27): calcFinalPrice(), EMPTY_RECORDS, EMPTY_SESSIONS, fileNumber(), getPatientName(), getPatientPhone(), InsurancePricing, MyPatientsPageInner() (+19 more)
### Community 266 - "Community 266"
Cohesion: 0.33
@@ -1824,12 +1828,12 @@ Cohesion: 0.18
Nodes (10): Endpoint های موجود که تغییر می‌کنند, GET /api/v1/admin/dashboard/charts?from=UNIX&to=UNIX, GET /api/v1/dashboard/clinic, GET /api/v1/dashboard/doctor, تسک ۱۶: داشبورد هوشمند — چارت + فیلتر زمانی, توضیح, زمان تخمینی, فیلتر بازه زمانی (+2 more)
### Community 274 - "Community 274"
Cohesion: 0.17
Cohesion: 0.16
Nodes (5): Authentication, ClinicPro — API Documentation Index, Error Code Reference, Modules, Standard Response Envelope
### Community 275 - "Community 275"
Cohesion: 0.17
Nodes (6): MellatGateway, MellatGatewayTest, ErrorCodesTest, KavehNegarProviderTest, TestCase, KavehNegarProvider
Cohesion: 0.11
Nodes (6): BillingCalculatorTest, BillingCalculator, ErrorCodesTest, KavehNegarProviderTest, TestCase, KavehNegarProvider
### Community 276 - "Community 276"
Cohesion: 0.20
@@ -1928,8 +1932,8 @@ Cohesion: 0.42
Nodes (3): PreRegistrationController, JsonResponse, Request
### Community 301 - "Community 301"
Cohesion: 0.04
Nodes (47): PaginatedResponse, STATUS_FILTERS, AddForm, addSchema, ClinicsPage(), HUES_LIST, FILTERS, Breakdown (+39 more)
Cohesion: 0.08
Nodes (21): Contract, InsuranceOption, KIND_LABEL, AdminDoctor, DEGREE_BADGE, DEGREE_LABEL, DoctorsPage(), DoctorStats (+13 more)
### Community 302 - "Community 302"
Cohesion: 0.12
@@ -1940,8 +1944,8 @@ Cohesion: 0.12
Nodes (16): آماده‌سازی پروژه ClinicPro برای دیپلوی روی Coolify با Docker Compose, زمینه, فایل‌های مرتبط, نکات مهم (محدودیت‌ها و edge caseها), هدف, وظایف, ۱. ساخت `Dockerfile` چندمرحله‌ای, ۱۰. ساخت راهنمای `docs/deploy/coolify.md` (+8 more)
### Community 304 - "Community 304"
Cohesion: 0.05
Nodes (42): 29. 🟢 `GET` clinic list 🆕, 30. 🟢 `GET` get 🆕, 33. 🔵 `POST` image_clinic, 34. 🔵 `POST` image logo, 36. 🟢 `GET` get my rate, 37. 🔵 `POST` post, 39. 🟡 `PATCH` Comment confirmation, 40. 🔵 `POST` post (+34 more)
Cohesion: 0.22
Nodes (9): 29. 🟢 `GET` clinic list 🆕, 30. 🟢 `GET` get 🆕, 36. 🟢 `GET` get my rate, 6. کلینیک (Clinic), هدرهای اضافی, پارامترهای Query, پاسخ‌ها, پاسخ‌ها (+1 more)
### Community 306 - "Community 306"
Cohesion: 0.07
@@ -2064,8 +2068,8 @@ Cohesion: 0.39
Nodes (5): JsonContains, FunctionNode, Node, Parser, SqlWalker
### Community 340 - "Community 340"
Cohesion: 0.04
Nodes (38): Claim, ClaimItem, DebtRow, InsuranceOption, KIND_LABEL, STATUS_FILTERS, STATUS_META, DoctorClaim (+30 more)
Cohesion: 0.03
Nodes (85): PaginatedResponse, ALL_STATUSES, FILTERS, DoctorClaim, FILTERS, METHOD_LABEL, STATUS_BADGE, LEVEL_FILTER_OPTIONS (+77 more)
### Community 341 - "Community 341"
Cohesion: 0.12
@@ -2184,8 +2188,8 @@ Cohesion: 0.29
Nodes (7): Authentication, Authorization, Input Validation, Logging Security, Rate Limiting, Secrets Management, ۷. تحلیل امنیت
### Community 371 - "Community 371"
Cohesion: 0.13
Nodes (6): DateOverrideOwnershipTest, UniqueConstraintsTest, DateOverride, DateOverrideRepository, Doctor, ManagerRegistry
Cohesion: 0.17
Nodes (11): زمینه, فایل‌های مرتبط, مشکل / هدف, نکات مهم, وضعیت فعلی, وظایف, پروفایل unclaimed پزشک — حذف امتیاز پیش‌فرض جعلی از پاسخ API, پروژه (+3 more)
### Community 372 - "Community 372"
Cohesion: 0.11
@@ -2444,8 +2448,8 @@ Cohesion: 0.43
Nodes (5): BeforeInstallPromptEvent, usePwaInstall(), PwaInstallBanner(), detectIOS(), PwaLoginCard()
### Community 483 - "Community 483"
Cohesion: 0.33
Nodes (5): Like, LikeRepository, Comment, ManagerRegistry, User
Cohesion: 0.36
Nodes (3): DoctorServiceController, JsonResponse, Request
### Community 487 - "Community 487"
Cohesion: 0.40
@@ -2479,6 +2483,10 @@ Nodes (3): InvoiceItemRepository, InvoiceItem, ManagerRegistry
Cohesion: 0.12
Nodes (15): CORS — `config/packages/nelmio_cors.yaml`, MellatGateway — تشخیص فعال‌بودن, payment/config — `PaymentController::config()` (خط ۵۴۶), resolveGateway + callback (کد واقعی), رفع باگ‌های پروداکشن: CORS + payment/config 500 + درگاه‌های فعال و callback ملت, زمینه, فایل‌های مرتبط, فرانت — `SubscriptionPage.tsx` (+7 more)
### Community 496 - "Community 496"
Cohesion: 0.23
Nodes (4): GatewayFactory, MellatGateway, MellatGatewayTest, SepGateway
### Community 497 - "Community 497"
Cohesion: 0.53
Nodes (3): SlotUniquenessTest, Appointment, Doctor
@@ -2584,8 +2592,8 @@ Cohesion: 0.13
Nodes (14): Doctor Profile Claim API (تصاحب پروفایل پزشک ایمپورت‌شده), env های مرتبط, Errors, GET `/api/v1/admin/doctor-claims`, GET `/api/v1/doctor/{uuid}/claim-info`, POST `/api/v1/admin/doctors/{uuid}/transfer`, POST `/api/v1/doctor/{uuid}/claim`, Request (+6 more)
### Community 528 - "Community 528"
Cohesion: 0.17
Nodes (12): buildKavenegarPattern(), KavenegarGuide(), SmsPage(), STATUS_LOG_META, Tab, TAG_FILTER_OPTIONS, TAG_LABELS, TemplateFormData (+4 more)
Cohesion: 0.47
Nodes (3): CommissionService, Payment, Representation
### Community 529 - "Community 529"
Cohesion: 0.50
@@ -2600,8 +2608,8 @@ Cohesion: 0.33
Nodes (4): PatientService, Appointment, PatientRecord, PatientSession
### Community 533 - "Community 533"
Cohesion: 0.19
Nodes (6): BaseKernel, Closure, CorsRegexEnvProcessor, EnvVarProcessorInterface, MicroKernelTrait, Kernel
Cohesion: 0.31
Nodes (4): BaseKernel, Closure, MicroKernelTrait, Kernel
### Community 534 - "Community 534"
Cohesion: 0.30
@@ -2656,8 +2664,8 @@ Cohesion: 0.50
Nodes (4): Errors, GET `/api/v1/representation/appointments`, Query Parameters, Response `200`
### Community 552 - "Community 552"
Cohesion: 0.39
Nodes (3): ProvinceRepository, ManagerRegistry, Province
Cohesion: 0.43
Nodes (3): InvoiceRepository, Invoice, ManagerRegistry
### Community 553 - "Community 553"
Cohesion: 0.50
@@ -2691,6 +2699,10 @@ Nodes (4): SmsMessageTemplateRepository, SmsTextResolver, SmsMessageTemplate, Ma
Cohesion: 0.50
Nodes (4): GET /api/v1/sms/wallet/balance, GET /api/v1/sms/wallet/logs, POST /api/v1/sms/wallet/charge, SMS Wallet
### Community 561 - "Community 561"
Cohesion: 0.29
Nodes (3): CorsRegexEnvProcessor, EnvVarProcessorInterface, CorsRegexEnvProcessorTest
### Community 563 - "Community 563"
Cohesion: 0.67
Nodes (3): submit(), Claim, ClaimSubmissionResult
@@ -2812,8 +2824,8 @@ Cohesion: 0.67
Nodes (3): بک‌اند, فرانت‌اند, وضعیت فعلی کد (مهم — قبل از تغییر بخوان)
### Community 618 - "Community 618"
Cohesion: 0.16
Nodes (5): ServiceItemDeleteCleanupTest, ServiceCoverageNPlusOneTest, TenantServiceCoverageRepository, ManagerRegistry, TenantServiceCoverage
Cohesion: 0.12
Nodes (6): ServiceItemDeleteCleanupTest, ServiceCoverageNPlusOneTest, TenantServiceCoverageRepository, TenantInsuranceCleanupService, ManagerRegistry, TenantServiceCoverage
### Community 625 - "Community 625"
Cohesion: 0.40
@@ -2824,12 +2836,12 @@ Cohesion: 0.23
Nodes (7): Money, BillingCalculator, InvoiceService, CoverageRule, ShareBreakdown, Invoice, PatientSession
### Community 631 - "Community 631"
Cohesion: 0.39
Nodes (4): FinancialBreakdown, FinancialBreakdownRepository, ManagerRegistry, Payment
Cohesion: 0.15
Nodes (6): UniqueConstraintsTest, FinancialBreakdown, FinancialBreakdownRepository, FinancialBreakdownIntegrityTest, ManagerRegistry, Payment
### Community 632 - "Community 632"
Cohesion: 0.40
Nodes (5): DELETE `/api/v1/billing/tenant-insurances/{uuid}`, GET `/api/v1/billing/tenant-insurances`, PATCH `/api/v1/billing/tenant-insurances/{uuid}`, POST `/api/v1/billing/tenant-insurances`, TenantInsurance — قراردادهای بیمه‌ی tenant (فاز ۱ سیستم صورتحساب)
Cohesion: 0.39
Nodes (3): TagRepository, ManagerRegistry, Tag
### Community 633 - "Community 633"
Cohesion: 0.40
@@ -2984,8 +2996,8 @@ Cohesion: 0.50
Nodes (4): Errors, POST `/api/v1/user/send-code`, Request Body, Response `200`
### Community 706 - "Community 706"
Cohesion: 0.40
Nodes (5): Errors, GET `/api/v1/admin/clinic/{uuid}/invitations`, Path Parameters, Query Parameters, Response `200`
Cohesion: 0.48
Nodes (3): DoctorInsuranceRepository, DoctorInsurance, ManagerRegistry
### Community 707 - "Community 707"
Cohesion: 0.50
@@ -2999,6 +3011,14 @@ Nodes (4): Errors, POST `/api/v1/user/login`, Request Body, Response `200`
Cohesion: 0.50
Nodes (4): Errors, POST `/oauth/token`, Request Body, Response `200`
### Community 712 - "Community 712"
Cohesion: 0.40
Nodes (5): 37. 🔵 `POST` post, Request Body, مثال Request, هدرهای اضافی, پاسخ‌ها
### Community 714 - "Community 714"
Cohesion: 0.40
Nodes (5): 61. 🔵 `POST` post, Request Body, مثال Request, هدرهای اضافی, پاسخ‌ها
### Community 716 - "Community 716"
Cohesion: 0.50
Nodes (4): Errors, GET `/oauth/userinfo`, Headers, Response `200`
@@ -3017,23 +3037,19 @@ Nodes (4): Errors, GET `/api/v1/admin/insurances`, Query Parameters, Response `2
### Community 720 - "Community 720"
Cohesion: 0.50
Nodes (4): Errors, POST `/api/v1/admin/insurance`, Request Body (`application/json`), Response `201`
Nodes (4): 39. 🟡 `PATCH` Comment confirmation, مثال Request, هدرهای اضافی, پاسخ‌ها
### Community 721 - "Community 721"
Cohesion: 0.50
Nodes (4): Errors, PATCH `/api/v1/admin/insurance/{id}`, Path Parameters, Response `200`
Nodes (4): 40. 🔵 `POST` post, مثال Request, هدرهای اضافی, پاسخ‌ها
### Community 723 - "Community 723"
Cohesion: 0.50
Nodes (4): Errors, POST `/api/v1/insurance/`, Request Body (`application/json`), Response `201`
Nodes (4): 44. 🟢 `GET` list comment, هدرهای اضافی, پارامترهای Query, پاسخ‌ها
### Community 724 - "Community 724"
Cohesion: 0.50
Nodes (4): Errors, PATCH `/api/v1/insurance/{id}`, Request Body, Response `200`
### Community 725 - "Community 725"
Cohesion: 0.50
Nodes (4): PUT `/api/v1/insurance-pricing`, Request Body, Response `200`, خطاها
Nodes (4): 45. 🔵 `POST` post, مثال Request, هدرهای اضافی, پاسخ‌ها
### Community 726 - "Community 726"
Cohesion: 0.50
@@ -3043,6 +3059,14 @@ Nodes (4): Errors, GET `/api/v1/representation/doctors`, Query Parameters, Respo
Cohesion: 0.50
Nodes (4): 38. 🟢 `GET` Unapproved comments, هدرهای اضافی, پارامترهای Query, پاسخ‌ها
### Community 728 - "Community 728"
Cohesion: 0.67
Nodes (3): 33. 🔵 `POST` image_clinic, هدرهای اضافی, پاسخ‌ها
### Community 729 - "Community 729"
Cohesion: 0.67
Nodes (3): 34. 🔵 `POST` image logo, هدرهای اضافی, پاسخ‌ها
### Community 730 - "Community 730"
Cohesion: 0.50
Nodes (4): 46. 🟡 `PATCH` patch, مثال Request, هدرهای اضافی, پاسخ‌ها
@@ -3053,19 +3077,11 @@ Nodes (3): Errors, GET `/api/v1/notification-mobile/{target}`, Response `200`
### Community 732 - "Community 732"
Cohesion: 0.67
Nodes (3): GET `/api/v1/billing/tenant-insurances/{uuid}/service-coverage`, PUT `/api/v1/billing/tenant-insurances/{uuid}/service-coverage`, TenantServiceCoverage — پوشش خدمت تحت یک قرارداد بیمه (فاز ۲)
Nodes (3): 42. 🔴 `DELETE` delete, هدرهای اضافی, پاسخ‌ها
### Community 733 - "Community 733"
Cohesion: 0.67
Nodes (3): GET `/api/v1/insurance-pricing`, Response `200`, خطاها
### Community 734 - "Community 734"
Cohesion: 0.67
Nodes (3): GET `/api/v1/insurances`, Query Parameters, Response `200`
### Community 735 - "Community 735"
Cohesion: 0.67
Nodes (3): POST `/api/v1/admin/insurance/{id}/upload-logo`, Request, Response `200`
Nodes (3): 43. 🟢 `GET` get, هدرهای اضافی, پاسخ‌ها
### Community 736 - "Community 736"
Cohesion: 0.67
@@ -3080,8 +3096,8 @@ Cohesion: 0.38
Nodes (4): DoctorClaimController, JsonResponse, Request, User
### Community 744 - "Community 744"
Cohesion: 0.36
Nodes (4): DoctorImportResult, DoctorImportService, Collection, User
Cohesion: 0.33
Nodes (5): DoctorImportResult, DoctorImportService, Collection, Doctor, User
### Community 748 - "Community 748"
Cohesion: 0.38
@@ -3136,23 +3152,23 @@ Cohesion: 0.67
Nodes (3): POST `/api/v1/admin/sms/template/{uuid}/approve`, Request Body (`application/json`), Response `200`
## Knowledge Gaps
- **4157 isolated node(s):** `ALLOWED_ROLES`, `Pricing`, `ImageCropModalProps`, `TenantInsurance`, `CoverageRow` (+4152 more)
- **4168 isolated node(s):** `ALLOWED_ROLES`, `Pricing`, `ImageCropModalProps`, `TenantInsurance`, `CoverageRow` (+4163 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **160 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
- **156 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `Altcha` connect `Community 367` to `Community 0`, `Community 485`?**
_High betweenness centrality (0.065) - this node is a cross-community bridge._
- **Why does `BaseController` connect `Community 108` to `Community 6`, `Community 7`, `Community 138`, `Community 139`, `Community 14`, `Community 654`, `Community 655`, `Community 15`, `Community 20`, `Community 22`, `Community 26`, `Community 164`, `Community 295`, `Community 424`, `Community 300`, `Community 433`, `Community 690`, `Community 308`, `Community 58`, `Community 59`, `Community 318`, `Community 64`, `Community 577`, `Community 75`, `Community 77`, `Community 607`, `Community 480`, `Community 739`, `Community 230`, `Community 104`, `Community 107`, `Community 109`, `Community 499`, `Community 252`, `Community 121`, `Community 122`, `Community 380`?**
_High betweenness centrality (0.038) - this node is a cross-community bridge._
_High betweenness centrality (0.067) - this node is a cross-community bridge._
- **Why does `BaseController` connect `Community 108` to `Community 6`, `Community 138`, `Community 139`, `Community 14`, `Community 654`, `Community 655`, `Community 15`, `Community 20`, `Community 22`, `Community 26`, `Community 164`, `Community 295`, `Community 424`, `Community 300`, `Community 433`, `Community 690`, `Community 308`, `Community 58`, `Community 59`, `Community 318`, `Community 64`, `Community 577`, `Community 75`, `Community 77`, `Community 607`, `Community 480`, `Community 739`, `Community 483`, `Community 230`, `Community 104`, `Community 107`, `Community 109`, `Community 499`, `Community 252`, `Community 121`, `Community 122`, `Community 380`?**
_High betweenness centrality (0.039) - this node is a cross-community bridge._
- **Why does `Version20260705070546` connect `Community 646` to `Community 399`?**
_High betweenness centrality (0.024) - this node is a cross-community bridge._
- **What connects `ALLOWED_ROLES`, `Pricing`, `ImageCropModalProps` to the rest of the system?**
_4157 weakly-connected nodes found - possible documentation gaps or missing edges._
_4168 weakly-connected nodes found - possible documentation gaps or missing edges._
- **Should `Community 0` be split into smaller, more focused modules?**
_Cohesion score 0.05075187969924812 - nodes in this community are weakly interconnected._
_Cohesion score 0.0514216575922565 - nodes in this community are weakly interconnected._
- **Should `Community 1` be split into smaller, more focused modules?**
_Cohesion score 0.028985507246376812 - nodes in this community are weakly interconnected._
- **Should `Community 2` be split into smaller, more focused modules?**
@@ -0,0 +1 @@
{"nodes": [{"id": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "label": "manifest.json", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L1"}, {"id": "public_manifest_name", "label": "name", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L2"}, {"id": "public_manifest_short_name", "label": "short_name", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L3"}, {"id": "public_manifest_description", "label": "description", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L4"}, {"id": "public_manifest_start_url", "label": "start_url", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L5"}, {"id": "public_manifest_scope", "label": "scope", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L6"}, {"id": "public_manifest_display", "label": "display", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L7"}, {"id": "public_manifest_orientation", "label": "orientation", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L8"}, {"id": "public_manifest_theme_color", "label": "theme_color", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L9"}, {"id": "public_manifest_background_color", "label": "background_color", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L10"}, {"id": "public_manifest_lang", "label": "lang", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L11"}, {"id": "public_manifest_dir", "label": "dir", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L12"}, {"id": "public_manifest_icons", "label": "icons", "file_type": "code", "source_file": "public/manifest.json", "source_location": "L13"}], "edges": [{"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_name", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L2", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_short_name", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L3", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_description", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L4", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_start_url", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L5", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_scope", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L6", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_display", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L7", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_orientation", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L8", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_theme_color", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L9", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_background_color", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L10", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_lang", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L11", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_dir", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L12", "weight": 1.0}, {"source": "users_hamed_pj_my_pj_clinic_pro_clinicpro_public_manifest_json", "target": "public_manifest_icons", "relation": "contains", "confidence": "EXTRACTED", "source_file": "public/manifest.json", "source_location": "L13", "weight": 1.0}]}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
{"nodes": [], "edges": [], "skipped": "data json (non-object root)"}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1310 -728
View File
File diff suppressed because it is too large Load Diff
+56 -56
View File
@@ -1,6 +1,6 @@
{
"assets/admin/App.tsx": {
"mtime": 1783757885.6255667,
"mtime": 1783788126.7963216,
"ast_hash": "69fd74865eefe0cb7c1bfc78a71a0a1e",
"semantic_hash": ""
},
@@ -30,7 +30,7 @@
"semantic_hash": ""
},
"assets/admin/components/layout/Sidebar.tsx": {
"mtime": 1783757885.626085,
"mtime": 1783788126.7966304,
"ast_hash": "2f0f7e9608d40b9cda0a0b9412782cca",
"semantic_hash": ""
},
@@ -230,7 +230,7 @@
"semantic_hash": ""
},
"assets/admin/pages/DoctorDetailPage.tsx": {
"mtime": 1783768892.4257572,
"mtime": 1783788126.7986403,
"ast_hash": "9e14c9cc70e4707bddaab0a5267e54c0",
"semantic_hash": ""
},
@@ -245,7 +245,7 @@
"semantic_hash": ""
},
"assets/admin/pages/DoctorsPage.tsx": {
"mtime": 1783757825.0106773,
"mtime": 1783788126.800466,
"ast_hash": "d2092c284b360169efff2f5405469893",
"semantic_hash": ""
},
@@ -320,8 +320,8 @@
"semantic_hash": ""
},
"assets/admin/pages/RepresentationProfilePage.tsx": {
"mtime": 1783014651.021187,
"ast_hash": "d934c8007e2f9ad68fd8de59192331c4",
"mtime": 1783788126.8012002,
"ast_hash": "032cc7fc57ba67d3fc2d8dd03e2fddbf",
"semantic_hash": ""
},
"assets/admin/pages/RepresentationSettlementPage.tsx": {
@@ -795,8 +795,8 @@
"semantic_hash": ""
},
"public/manifest.json": {
"mtime": 1783067213.2312572,
"ast_hash": "6d4b402f211a53ccfd25050b17542cc1",
"mtime": 1783834695.9968214,
"ast_hash": "b20fbd74a5c3c7d4d52207a0d9715d1a",
"semantic_hash": ""
},
"public/sw.js": {
@@ -810,7 +810,7 @@
"semantic_hash": ""
},
"src/Admin/Controller/AdminApiController.php": {
"mtime": 1783757803.148958,
"mtime": 1783788126.859703,
"ast_hash": "73acc68912b526d1c608c10b92fac3f0",
"semantic_hash": ""
},
@@ -930,7 +930,7 @@
"semantic_hash": ""
},
"src/Auth/Entity/User.php": {
"mtime": 1783757329.0757134,
"mtime": 1783788126.8620605,
"ast_hash": "85cd7c4923a991aab2f1003d8996fc32",
"semantic_hash": ""
},
@@ -955,7 +955,7 @@
"semantic_hash": ""
},
"src/Auth/Security/PasswordAuthenticator.php": {
"mtime": 1783757329.0759397,
"mtime": 1783788126.86268,
"ast_hash": "1c385c3916608095ea2512ac434aca19",
"semantic_hash": ""
},
@@ -1180,13 +1180,13 @@
"semantic_hash": ""
},
"src/Doctor/Controller/DoctorController.php": {
"mtime": 1783769018.613043,
"mtime": 1783788126.8683126,
"ast_hash": "57c2d4ba148aa5084683dbfd08f8e2b0",
"semantic_hash": ""
},
"src/Doctor/Entity/Doctor.php": {
"mtime": 1783757329.076088,
"ast_hash": "e2334ea52505d1b8cc2b69b838fe17ca",
"mtime": 1783837440.3242722,
"ast_hash": "afcadef490bdd4fdea4e3059e25cf2a8",
"semantic_hash": ""
},
"src/Doctor/Entity/DoctorAddress.php": {
@@ -1580,7 +1580,7 @@
"semantic_hash": ""
},
"src/Shared/Service/ApiIrService.php": {
"mtime": 1783757329.076324,
"mtime": 1783788126.8722553,
"ast_hash": "7ee2ccaad6b77b3845258440accf99ee",
"semantic_hash": ""
},
@@ -2250,7 +2250,7 @@
"semantic_hash": ""
},
"config/packages/rate_limiter.yaml": {
"mtime": 1783757329.0740077,
"mtime": 1783788126.8017821,
"ast_hash": "625dc1a0d852d36afd05b4ac60abd6d9",
"semantic_hash": ""
},
@@ -2260,7 +2260,7 @@
"semantic_hash": ""
},
"config/packages/security.yaml": {
"mtime": 1783757329.074222,
"mtime": 1783788126.802166,
"ast_hash": "d6adafd1b3cf1b7ec18d3c729b70dcb8",
"semantic_hash": ""
},
@@ -2300,7 +2300,7 @@
"semantic_hash": ""
},
"config/services.yaml": {
"mtime": 1783757329.0744464,
"mtime": 1783788126.8029823,
"ast_hash": "feb62c479381915746246b38817892e3",
"semantic_hash": ""
},
@@ -2340,7 +2340,7 @@
"semantic_hash": ""
},
"docs/api/admin.md": {
"mtime": 1783757329.0746298,
"mtime": 1783788126.8033333,
"ast_hash": "1fe7f1b55de999bb218ab72f44360021",
"semantic_hash": ""
},
@@ -2395,8 +2395,8 @@
"semantic_hash": ""
},
"docs/api/doctor.md": {
"mtime": 1783769157.105152,
"ast_hash": "572576e30db5b049cb62ba8d54bdf8a5",
"mtime": 1783837299.5845804,
"ast_hash": "e005659040d9c17548dd409ac5582a55",
"semantic_hash": ""
},
"docs/api/insurance.md": {
@@ -2970,8 +2970,8 @@
"semantic_hash": ""
},
"public/favicon.png": {
"mtime": 1781169063.731778,
"ast_hash": "87dbf205c76c12d306031d2249a2cbd8",
"mtime": 1783067149.6695104,
"ast_hash": "b40afe9488167fab007741810396705e",
"semantic_hash": ""
},
"public/icons/icon-192.png": {
@@ -3430,8 +3430,8 @@
"semantic_hash": ""
},
"data/seed/cities.json": {
"mtime": 1783500944.1575975,
"ast_hash": "e55b9115a16a75a1b76f1cd57ea3f3c6",
"mtime": 1783788126.5797431,
"ast_hash": "712cdcd70a3de11d2b443c329501e6cf",
"semantic_hash": ""
},
"data/seed/doctor_services.json": {
@@ -3694,11 +3694,6 @@
"ast_hash": "e47a20da3454186f7be441441f231bf3",
"semantic_hash": ""
},
"public/favicon-32.png": {
"mtime": 1783067149.6695104,
"ast_hash": "b40afe9488167fab007741810396705e",
"semantic_hash": ""
},
"public/logo.svg": {
"mtime": 1783066913.0879276,
"ast_hash": "074cb84109dd212089ba2b5397e9b3ed",
@@ -3850,7 +3845,7 @@
"semantic_hash": ""
},
"src/Auth/Command/SystemOwnerCommand.php": {
"mtime": 1783757329.0755038,
"mtime": 1783788126.860887,
"ast_hash": "e26afd83ac2085644152496ebc79fbd3",
"semantic_hash": ""
},
@@ -3875,92 +3870,92 @@
"semantic_hash": ""
},
"docs/api/doctor-import.md": {
"mtime": 1783766160.064325,
"ast_hash": "28bb80aa78e7650d0b3e7be75bfc12d0",
"mtime": 1783788126.8039813,
"ast_hash": "192ff31aebfaf64240278293e30b2586",
"semantic_hash": ""
},
"assets/admin/pages/DoctorClaimsPage.tsx": {
"mtime": 1783757859.3423393,
"mtime": 1783788126.7969797,
"ast_hash": "bf42d9bcc670c4632bb7078fba919b41",
"semantic_hash": ""
},
"migrations/Version20260711150000.php": {
"mtime": 1783757329.0904677,
"mtime": 1783788126.856291,
"ast_hash": "a4735e00ad698d7b1908c1565f56101b",
"semantic_hash": ""
},
"migrations/Version20260711151000.php": {
"mtime": 1783757329.0905693,
"mtime": 1783788126.8574378,
"ast_hash": "4f19e830c75d8958e6ccac6fa0212d57",
"semantic_hash": ""
},
"src/Doctor/Command/BackfillSurrogateRoleCommand.php": {
"mtime": 1783757329.0907202,
"mtime": 1783788126.8628495,
"ast_hash": "795960477fc1d7bc59527e74777066d8",
"semantic_hash": ""
},
"src/Doctor/Controller/DoctorClaimController.php": {
"mtime": 1783768981.0086484,
"mtime": 1783788126.8670342,
"ast_hash": "997576824b9039e977fd58efb417cf70",
"semantic_hash": ""
},
"src/Doctor/Controller/DoctorImportController.php": {
"mtime": 1783757329.0911074,
"mtime": 1783788126.8695548,
"ast_hash": "78db47cbe57f35d5c5baf17bcc3e3cca",
"semantic_hash": ""
},
"src/Doctor/Entity/DoctorClaimRequest.php": {
"mtime": 1783757329.0913296,
"mtime": 1783788126.8709245,
"ast_hash": "26c3d96b19594bb127aebb1e74df876e",
"semantic_hash": ""
},
"src/Doctor/Repository/DoctorClaimRequestRepository.php": {
"mtime": 1783757329.0914319,
"mtime": 1783788126.8710644,
"ast_hash": "9321165d5ce64d77ea1c20da6f08dc2e",
"semantic_hash": ""
},
"src/Doctor/Service/DoctorClaimService.php": {
"mtime": 1783757329.0916033,
"mtime": 1783788126.8712468,
"ast_hash": "577da8fd4de111aa71e0bdc1c98952ec",
"semantic_hash": ""
},
"src/Doctor/Service/DoctorImportResult.php": {
"mtime": 1783757329.0917,
"mtime": 1783788126.871383,
"ast_hash": "4300a0647f76835d6913a031faa0e9f2",
"semantic_hash": ""
},
"src/Doctor/Service/DoctorImportService.php": {
"mtime": 1783766986.8738186,
"ast_hash": "a675ebe7e1acac7da14cc8de3364757e",
"mtime": 1783788126.872058,
"ast_hash": "3c935b1f2951961b1b25e40a4aff3c2a",
"semantic_hash": ""
},
"src/Shared/Util/PersianText.php": {
"mtime": 1783765891.9874525,
"mtime": 1783788126.8732378,
"ast_hash": "477051e58ba2a5a5e9cbf25f3a6992d6",
"semantic_hash": ""
},
"tests/Doctor/DoctorClaimTest.php": {
"mtime": 1783769087.937134,
"mtime": 1783788126.874468,
"ast_hash": "50ea89c2d246faf98dc843152d51a0c5",
"semantic_hash": ""
},
"tests/Doctor/DoctorImportTest.php": {
"mtime": 1783766996.494613,
"ast_hash": "997b8d698c8eb4bbf69652bdcead514d",
"mtime": 1783788126.8757632,
"ast_hash": "4036118673c9a9fd60ce2f5ccd78d99e",
"semantic_hash": ""
},
"tests/Shared/PersianTextTest.php": {
"mtime": 1783765905.1030002,
"mtime": 1783788126.8758962,
"ast_hash": "c852d71e5f7ab87a0dc9250f9e848bd6",
"semantic_hash": ""
},
".claude/prompt/irimc-import-complete.md": {
"mtime": 1783757329.0736878,
"mtime": 1783788126.7949958,
"ast_hash": "2d5029751c9bd813a0410e46aebe5eba",
"semantic_hash": ""
},
"docs/api/doctor-claim.md": {
"mtime": 1783769130.2951994,
"mtime": 1783788126.803615,
"ast_hash": "2f4e095e4e0cac673062cc48b0577d5d",
"semantic_hash": ""
},
@@ -3980,23 +3975,28 @@
"semantic_hash": ""
},
"src/Doctor/Command/FixIrimcNamesCommand.php": {
"mtime": 1783766017.2526865,
"mtime": 1783788126.863795,
"ast_hash": "fb0cad757bf1405c6919159a374e9154",
"semantic_hash": ""
},
"src/Doctor/Command/PurgeDoctorsCommand.php": {
"mtime": 1783766065.697639,
"mtime": 1783788126.8650098,
"ast_hash": "8ba5c9742c92bbf2a0d01d97ee903dd3",
"semantic_hash": ""
},
".claude/prompt/fix-doctor-name-and-purge.md": {
"mtime": 1783765695.1482882,
"mtime": 1783788126.7941496,
"ast_hash": "b03ab1640dc46aa51114fbc3eba51870",
"semantic_hash": ""
},
".claude/prompt/doctor-map-claim-captcha-delete.md": {
"mtime": 1783768547.5967684,
"mtime": 1783788126.793653,
"ast_hash": "d4531629fe5bf2befc994f1a3f2a34ff",
"semantic_hash": ""
},
".claude/prompt/unclaimed-doctor-null-rating.md": {
"mtime": 1783837029.9093144,
"ast_hash": "28d51dff4de504fcbee2d44877dc2498",
"semantic_hash": ""
}
}
+10 -4
View File
@@ -399,6 +399,12 @@ class Doctor
return $this;
}
/** امتیاز فقط برای پروفایل claimed واقعی است؛ unclaimed/pending_transfer مقدار پیش‌فرض جعلی دارد. */
public function hasPublicRating(): bool
{
return $this->ownerStatus === 'claimed';
}
private function touch(): void
{
$this->updatedAt = time();
@@ -518,8 +524,8 @@ class Doctor
'id' => (string) $s->getId(),
'name' => $s->getName(),
], $this->specialties->toArray()),
'satisfaction' => (string) $this->doctorRatePercentage,
'point' => (string) $this->doctorRate,
'satisfaction' => $this->hasPublicRating() ? (string) $this->doctorRatePercentage : null,
'point' => $this->hasPublicRating() ? (string) $this->doctorRate : null,
'free_turn' => $sf['free_turn'],
'hours_of_work' => $sf['hours_of_work'],
'active' => $this->activeDoctorAppointment && $sf['has_schedule'],
@@ -554,8 +560,8 @@ class Doctor
'id' => (string) $ds->getId(),
'name' => $ds->getName(),
], $this->services->toArray()),
'satisfaction' => (string) $this->doctorRatePercentage,
'point' => (string) $this->doctorRate,
'satisfaction' => $this->hasPublicRating() ? (string) $this->doctorRatePercentage : null,
'point' => $this->hasPublicRating() ? (string) $this->doctorRate : null,
'owner_status' => $this->ownerStatus,
'free_turn' => $sf['free_turn'],
'hours_of_work' => $sf['hours_of_work'],