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

# Set Dentition Mode

> Switch the chart between adult, mixed and child dentition

Changes the chart's dentition mode. The change is refused with `409` when any
registered finding would become invalid under the new mode (e.g. deciduous-tooth
findings when switching to adult): the mode is a setup decision, and this
endpoint never deletes clinical or billed data — remove the blocking findings
first (the `details.blockingFindings` array lists them). A change that destroys
nothing succeeds with `removedFindings: []`. Entering mixed mode for the first
time seeds the default temporary-tooth positions.

The per-tooth dentition toggle (`PATCH .../odontogram/teeth/{position}/dentition`)
keeps its cascading delete: an exfoliated baby tooth is a real clinical event,
and only that tooth's findings are affected.

Requires the `odontogram` feature flag and EMR write access.

## Path Parameters

<ParamField path="patientId" type="string" required>The patient whose chart to edit.</ParamField>

## Body Parameters

<ParamField body="mode" type="string" required>`adult` | `mixed` | `child`.</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.nevatal.com/api/v1/patients/pat_abc123/odontogram/dentition-mode" \
    -H "Authorization: Bearer nvtl_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{ "mode": "adult" }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "data": {
      "odontogram": {
        "id": "odo_001",
        "dentitionMode": "adult",
        "temporaryTeeth": [],
        "findings": [],
        "estimate": { "findingCount": 0, "total": 0, "paid": 0, "due": 0 },
        "version": 8
      },
      "removedFindings": []
    },
    "message": "Modo de dentición actualizado"
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "No se puede cambiar el modo de dentición porque se eliminarían hallazgos registrados. Elimine primero esos hallazgos.",
    "code": "CONFLICT_ERROR",
    "details": {
      "blockingFindings": [
        { "id": "fnd_temp", "toothFdi": 53, "evolution": "paid" }
      ]
    }
  }
  ```
</ResponseExample>
