> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flextell.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Doktorlar

> Doctor rolündeki kullanıcılar — takvim sahibi ve tedavi atamaları.

Doktor, `doctor` rolüne sahip `User` kaydıdır. Randevuları yöneten ve takvim sahibi olan kullanıcıdır.

## Doktor olmak için gerekenler

```mermaid theme={null}
flowchart LR
    U[Kullanıcı] -->|role: doctor| D[Doktor]
    D --> GC{Google Calendar<br/>entegrasyonu?}
    GC -->|Hayır| X[Randevu listesinde<br/>görünmez]
    GC -->|Evet| L[Listede aktif]
    D --> T[Tedavi ataması]
```

| Önkoşul                      | Açıklama                                              |
| ---------------------------- | ----------------------------------------------------- |
| `RoleName::Doctor`           | Spatie Permission ile atanmış rol                     |
| Google Calendar entegrasyonu | Aktif `calendar` türü `Integration`                   |
| Tedavi atamaları             | `treatment_user` pivot ile en az bir tedaviye atanmış |

<Warning>
  Takvim entegrasyonu **olmayan** doktor, hem panel randevu formunda hem AI booking akışında **doktor listesinde görünmez** — bkz. [Takvim](/documentation/appointments/calendar).
</Warning>

## Profil alanları

`User` modelindeki ek alanlar:

| Alan                  | Açıklama                  |
| --------------------- | ------------------------- |
| `title`               | Unvan (Dr., Op. Dr., vb.) |
| `phone`               | Telefon                   |
| `emergency_contact_*` | Acil durum iletişim       |
| `blood_group`         | Kan grubu                 |
| `avatar_url`          | Profil fotoğrafı          |
| `is_active`           | Aktif/pasif               |

## Tedavi ataması

Doktor ↔ Tedavi `BelongsToMany`:

```php theme={null}
$doctor->treatments()->attach($treatmentId);
```

Atanmayan tedavi o doktor için randevu formunda seçilemez.

## Sonraki adımlar

<CardGroup cols={2}>
  <Card title="Tedaviler" icon="syringe" href="/documentation/clinic/treatments">
    Atanacak hizmetler.
  </Card>

  <Card title="Takvim" icon="calendar" href="/documentation/appointments/calendar">
    Google Calendar entegrasyonu.
  </Card>
</CardGroup>
