# السجل الطبي (نتائج الزيارات)

كل المسارات هنا محمية (`Authorization: Bearer {token}`). Controller:
`App\Http\Controllers\Api\V1\Clinic\MedicalRecordController`. سجل واحد بيتكتب لكل حجز عن
طريق الدكتور (تشخيص/روشتة/تقرير نصي) — القراءة هنا للمريض فقط، وبعد النشر (`published_at`)
فقط؛ مسودة الدكتور غير المنشورة لا تظهر له أبدًا.

## GET v1/medical-records/mine?page=

سجلات المريض المسجّل دخوله المنشورة فقط، الأحدث أولًا (10/صفحة).

```json
{
  "success": true, "code": "OK", "message": "تمت العملية بنجاح",
  "data": [
    {
      "id": 1,
      "diagnosis": "Seasonal flu with mild dehydration.",
      "prescription": "Paracetamol 500mg every 8 hours for 5 days, oral rehydration salts.",
      "report": "Patient presented with fever and fatigue...",
      "attachment_url": null,
      "published_at": "2026-08-25T17:22:26+03:00",
      "last_edited_at": null,
      "doctor": { "id": 1, "name": "Dr. Ahmed Hassan", "specialty": "الباطنة" },
      "booking": { "id": 1, "scheduled_at": "2026-08-25T15:22:26+03:00", "branch": "Wellness Care Clinic" }
    }
  ],
  "meta": { "pagination": { "current_page": 1, "per_page": 10, "total": 1, "last_page": 1 } },
  "errors": null
}
```

## GET v1/medical-records/{record}

نفس شكل العنصر أعلاه. لو السجل مش بتاع المريض ده → `403 FORBIDDEN`. لو السجل لسه مش
منشور (`published_at = null`) → `404 NOT_FOUND` (حتى لو صاحب السجل نفسه).
