> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.taigabilling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.taigabilling.com/_mcp/server.

# Update diagnosis

PATCH https://api.taigabilling.com/api/diagnoses/v2/{diagnosis_id}
Content-Type: application/json

Updates the diagnosis record matching the provided `diagnosis_id`

Reference: https://docs.taigabilling.com/api-reference/diagnoses/update

## Authentication

- `Authorization` header (bearer token, required) — Send your Taiga API key as a Bearer token. Create and manage keys in the Taiga developer portal.

## Servers

- `https://api.taigabilling.com` (Production, default)
- `https://api-staging.taigabilling.com` (Staging)

## Request

### Path parameters

- `diagnosis_id` (string, required)

### Body (application/json)

This endpoint expects an object.

- `name` (string, optional, nullable) — Empty string not allowed.
- `code_type` (enum, optional, nullable) — Typically, providers submitting claims to Taiga are using ICD-10 diagnosis codes. If you are using ICD-10 codes, the primary diagnosis code listed on the claim should use the ABK code_type. If more than one diagnosis is being submitted on a claim, please use ABF for the rest of the listed diagnoses. If you are using ICD-9 diagnosis codes, use BK and BF for the principal and following diagnosis code(s) respectively.
  - Allowed values: `ABF`, `ABJ`, `ABK`, `APR`, `BF`, `BJ`, `BK`, `PR`, `DR`, `LOI`
- `code` (string, optional, nullable) — Empty string not allowed. Should be of the appropriate format for the provided `code_type`. Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically: - Letter - Digit - Digit or the letter `A` or `B` - (Optional) Period `.` - Up to 4 (or as few as 0) letters and digits
- `present_on_admission_indicator` (enum, optional, nullable) — For Institutional claims only. A "Y" indicates that the onset occurred prior to admission to the hospital. An "N" indicates that the onset did NOT occur prior to admission to the hospital. A "U" indicates that it is unknown whether the onset occurred prior to admission to the hospital or not.
  - Allowed values: `YES`, `NO`, `UNKNOWN`, `NOT_APPLICABLE`

## Response

### 200

- `code` (string, required) — Empty string not allowed. Should be of the appropriate format for the provided `code_type`. Must obey the ICD-10 format if an ICD-10 code_type is provided, specifically: - Letter - Digit - Digit or the letter `A` or `B` - (Optional) Period `.` - Up to 4 (or as few as 0) letters and digits
- `code_type` (enum, required) — Typically, providers submitting claims to Taiga are using ICD-10 diagnosis codes. If you are using ICD-10 codes, the primary diagnosis code listed on the claim should use the ABK code_type. If more than one diagnosis is being submitted on a claim, please use ABF for the rest of the listed diagnoses. If you are using ICD-9 diagnosis codes, use BK and BF for the principal and following diagnosis code(s) respectively.
  - Allowed values: `ABF`, `ABJ`, `ABK`, `APR`, `BF`, `BJ`, `BK`, `PR`, `DR`, `LOI`
- `created_at` (datetime, required)
- `diagnosis_id` (string, required)
- `encounter_id` (string, required)
- `updated_at` (datetime, required)
- `name` (string, optional, nullable) — Empty string not allowed.
- `present_on_admission_indicator` (enum, optional, nullable) — For Institutional claims only. A "Y" indicates that the onset occurred prior to admission to the hospital. An "N" indicates that the onset did NOT occur prior to admission to the hospital. A "U" indicates that it is unknown whether the onset occurred prior to admission to the hospital or not.
  - Allowed values: `YES`, `NO`, `UNKNOWN`, `NOT_APPLICABLE`

## Errors

### 404 Not Found Error

- `Diagnoses_updateRequestNotFoundError`
  - DiagnosesUpdateRequestNotFoundError0

### 422 Unprocessable Entity Error

- `Diagnoses_updateRequestUnprocessableEntityError`
  - DiagnosesUpdateRequestUnprocessableEntityError0

## Types

### DiagnosesUpdateRequestNotFoundError0

- `errorName` (enum, optional)
  - Allowed values: `DisallowMultiplePrimaryDiagnosisHTTPError`
- `content` (DiagnosisNotFoundError, optional)

### DiagnosesUpdateRequestUnprocessableEntityError0

- `errorName` (enum, optional)
  - Allowed values: `DisallowMultiplePrimaryDiagnosisHTTPError`
- `content` (DisallowMultiplePrimaryDiagnosisError, optional)

### DiagnosisNotFoundError

- `message` (string, required)
- `diagnosis_id` (string, optional, nullable)

### DisallowMultiplePrimaryDiagnosisError

- `existing_primary_diagnosis_id` (string, required)
- `new_primary_diagnosis_id` (string, required)
- `message` (string, required)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "code": "string",
  "code_type": "ABF",
  "created_at": "2023-01-01T00:00:00Z",
  "diagnosis_id": "string",
  "encounter_id": "string",
  "updated_at": "2023-01-01T00:00:00Z",
  "name": "string",
  "present_on_admission_indicator": "YES"
}
```

**SDK Code**

```python
import requests

url = "https://api.taigabilling.com/api/diagnoses/v2/diagnosis_id"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```