---
title: "Condition data model"
url: "https://docs.unified.to/healthcare/condition/model"
description: "The Condition data model object in Unified's Condition API: 15 fields, including created_at, updated_at and patient_id, with types and enum values."
---
# Condition data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/healthcare/integrations.md) page. 

| Field                    | Type                                                                                               | Required | Description                                                                                                |
| ------------------------ | -------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| id                       | string                                                                                             | No       | Unique identifier for the condition                                                                        |
| created\_at              | string (date-time)                                                                                 | No       | When the condition record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                             |
| updated\_at              | string (date-time)                                                                                 | No       | When the condition record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                        |
| patient\_id              | string                                                                                             | No       | The patient who has the condition                                                                          |
| encounter\_id            | string                                                                                             | No       | The encounter in which the condition was recorded                                                          |
| practitioner\_id         | string                                                                                             | No       | The practitioner who recorded or asserted the condition                                                    |
| name                     | string                                                                                             | No       | Human-readable name of the condition                                                                       |
| codes                    | [HealthcareCode](https://docs.unified.to/healthcare/condition/model.md#HealthcareCode)\[\]         | No       | Codings for the condition (e.g. ICD-10, SNOMED CT)                                                         |
| codes\[\].system         | string                                                                                             | No       | The code system URI (e.g. http://loinc.org, http://snomed.info/sct)                                        |
| codes\[\].code           | string                                                                                             | No       | The code within the system                                                                                 |
| codes\[\].display        | string                                                                                             | No       | Human-readable display text for the code                                                                   |
| status                   | enum                                                                                               | No       | Clinical status of the condition Values: ACTIVE, RECURRENCE, RELAPSE, INACTIVE, REMISSION, RESOLVED, OTHER |
| type                     | enum                                                                                               | No       | Category of the condition Values: PROBLEM, DIAGNOSIS, HEALTH\_CONCERN, OTHER                               |
| onset\_at                | string (date-time)                                                                                 | No       | When the condition began (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                          |
| resolved\_at             | string (date-time)                                                                                 | No       | When the condition resolved (abatement) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                           |
| recorded\_at             | string (date-time)                                                                                 | No       | When the condition was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                                   |
| notes                    | string                                                                                             | No       | Free-text notes about the condition                                                                        |
| metadata                 | [HealthcareMetadata](https://docs.unified.to/healthcare/condition/model.md#HealthcareMetadata)\[\] | No       |                                                                                                            |
| metadata\[\].id          | string                                                                                             | No       |                                                                                                            |
| metadata\[\].value       | object                                                                                             | No       |                                                                                                            |
| metadata\[\].namespace   | string                                                                                             | No       |                                                                                                            |
| metadata\[\].format      | enum                                                                                               | No       | Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                                         |
| metadata\[\].extra\_data | object                                                                                             | No       |                                                                                                            |
| metadata\[\].slug        | string                                                                                             | No       |                                                                                                            |

## TypeScript

```typescript
export type HealthcareCondition = {
	id?: string; // Unique identifier for the condition
	created_at?: string-time; // When the condition record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the condition record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient who has the condition
	encounter_id?: string; // The encounter in which the condition was recorded
	practitioner_id?: string; // The practitioner who recorded or asserted the condition
	name?: string; // Human-readable name of the condition
	codes?: []; // Codings for the condition (e.g. ICD-10, SNOMED CT)
	status?: 'ACTIVE' | 'RECURRENCE' | 'RELAPSE' | 'INACTIVE' | 'REMISSION' | 'RESOLVED' | 'OTHER'; // Clinical status of the condition
	type?: 'PROBLEM' | 'DIAGNOSIS' | 'HEALTH_CONCERN' | 'OTHER'; // Category of the condition
	onset_at?: string-time; // When the condition began (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	resolved_at?: string-time; // When the condition resolved (abatement) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	recorded_at?: string-time; // When the condition was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	notes?: string; // Free-text notes about the condition
	metadata?: [];
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodHealthcareCondition = z.object({
	id: z.string().optional().describe("Unique identifier for the condition"),
	created_at: z.string-time().optional().describe("When the condition record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the condition record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient who has the condition"),
	encounter_id: z.string().optional().describe("The encounter in which the condition was recorded"),
	practitioner_id: z.string().optional().describe("The practitioner who recorded or asserted the condition"),
	name: z.string().optional().describe("Human-readable name of the condition"),
	codes: z.array().optional().describe("Codings for the condition (e.g. ICD-10, SNOMED CT)"),
	status: z.enum("ACTIVE", "RECURRENCE", "RELAPSE", "INACTIVE", "REMISSION", "RESOLVED", "OTHER").optional().describe("Clinical status of the condition"),
	type: z.enum("PROBLEM", "DIAGNOSIS", "HEALTH_CONCERN", "OTHER").optional().describe("Category of the condition"),
	onset_at: z.string-time().optional().describe("When the condition began (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	resolved_at: z.string-time().optional().describe("When the condition resolved (abatement) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	recorded_at: z.string-time().optional().describe("When the condition was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	notes: z.string().optional().describe("Free-text notes about the condition"),
	metadata: z.array().optional(),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class HealthcareConditionStatus(str, Enum):
	ACTIVE = 'ACTIVE'
	RECURRENCE = 'RECURRENCE'
	RELAPSE = 'RELAPSE'
	INACTIVE = 'INACTIVE'
	REMISSION = 'REMISSION'
	RESOLVED = 'RESOLVED'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareConditionType(str, Enum):
	PROBLEM = 'PROBLEM'
	DIAGNOSIS = 'DIAGNOSIS'
	HEALTH_CONCERN = 'HEALTH_CONCERN'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareCondition:
	"""Unique identifier for the condition"""
	id: Optional[str]
	"""When the condition record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the condition record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient who has the condition"""
	patient_id: Optional[str]
	"""The encounter in which the condition was recorded"""
	encounter_id: Optional[str]
	"""The practitioner who recorded or asserted the condition"""
	practitioner_id: Optional[str]
	"""Human-readable name of the condition"""
	name: Optional[str]
	"""Codings for the condition (e.g. ICD-10, SNOMED CT)"""
	codes: Optional[PropertyHealthcareConditionCodes]
	"""Clinical status of the condition"""
	status: Optional[HealthcareConditionStatus]
	"""Category of the condition"""
	type: Optional[HealthcareConditionType]
	"""When the condition began (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	onset_at: Optional[str]
	"""When the condition resolved (abatement) (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	resolved_at: Optional[str]
	"""When the condition was recorded (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	recorded_at: Optional[str]
	"""Free-text notes about the condition"""
	notes: Optional[str]
	metadata: Optional[PropertyHealthcareConditionMetadata]

```
