> ## 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.

# Tedaviler

> Tedavi tanımları, doktor ataması ve seans yönetimi.

Tedavi (`Treatment`), firmanın sunduğu hizmettir. Doktorlara atanır, satışta kalem olur ve isteğe bağlı seans yapısına sahiptir.

## Yapı

| Alan           | Açıklama                               |
| -------------- | -------------------------------------- |
| `group_id`     | Tedavi grubu (`TreatmentGroup`)        |
| `name`         | Adı                                    |
| `keywords[]`   | Anahtar kelimeler (AI eşleştirme için) |
| `price`        | Fiyat                                  |
| `tax_rate`     | KDV oranı                              |
| `description`  | Açıklama                               |
| `session`      | Seans sayısı                           |
| `extra_info[]` | Serbest JSON ek bilgi                  |
| `is_active`    | Aktif/pasif                            |

## Doktor ataması

Tedavi ↔ Doktor ilişkisi `BelongsToMany` (`treatment_user` pivot):

```mermaid theme={null}
flowchart LR
    T[Tedavi] -->|treatment_user| D[Doktor]
    T --> P[Ürün<br/>min_quantity]
```

Bir doktora atanmayan tedavi, o doktor için randevu oluştururken seçilemez.

## Seanslar (`TreatmentSession`)

Çok seanslı tedaviler (örn. "Diş beyazlatma — 3 seans") için her seans ayrı kayıttır; sıralı tamamlanır.

## Ürün ilişkisi

Tedavide kullanılan sarf malzemesi `Product` olarak tanımlanır ve pivot'taki `min_quantity` üzerinden tedaviye atanır — tedavi tamamlanınca otomatik stok düşer.

## Sonraki adımlar

<CardGroup cols={2}>
  <Card title="Doktorlar" icon="user-doctor" href="/documentation/clinic/doctors">
    Tedavilere atama.
  </Card>

  <Card title="Ürünler" icon="box" href="/documentation/finance/products">
    Sarf malzemeleri.
  </Card>
</CardGroup>
