# CDT Designer

## Overview

Custom Data Types (also known as CDTs) are user-defined fields and objects used to capture and store patient information within Welkin. CDTs form the foundation of your data model, allowing you to record clinical assessments, outcomes, custom metrics, and any other organization-specific information needed for care management.

CDTs are built and configured within Designer under the **Custom Data** > **Data Types** section, making them available throughout your Welkin environment for use in assessments, data views, automations, charts, and more.

## Key Concepts

* **CDT** – A container that holds related data fields (analogous to a database table)
* **CDTF** – A Custom Data Type Field; an individual field within a CDT (analogous to a table column)
* **Field Type** – The data type of the field (text, integer, float, list, formula, etc.)
* **Naming Convention** – Automatic prefix applied to all CDTs based on your organization's naming conventions (typically "cdt-")

## Creating a Custom Data Type

### Step 1: Start a New CDT

1. Log into Designer
2. Navigate to **Custom Data** > **Data Types** from the left sidebar
3. Click **+ New** in the upper right corner
4. Enter a **Name** for the CDT using:
   * Lowercase letters
   * Numbers
   * Underscores (\_) or hyphens (-)
   * No spaces or special characters

**Example names:**

* `patient-vital-signs`
* `depression-screening`
* `medication-adherence`

**Note:** The system automatically generates a naming convention prefix (e.g., "cdt-") that you can use or remove based on your configuration.

### Step 2: Create Data Fields (CDTFs)

Click **+ Data Field** to add individual fields to your CDT. For each field, configure:

#### Field Configuration

1. **Name** – Field identifier (same naming rules as CDT)
   * Example: `systolic_pressure`, `bmi_score`, `patient_name`
2. **Type** – Select the data type:
   * **Text** – Free-form text input
   * **Long Text** – Extended text areas
   * **Integer** – Whole numbers
   * **Float** – Decimal numbers
   * **Boolean** – True/False or Yes/No values
   * **Date** – Date selector
   * **DateTime** – Date and time combination
   * **List** – Single-select dropdown options
   * **Multi-Select List** – Multiple-select options
   * **Formula** – Calculated field based on other fields
   * **Dictionary** – Reference to shared terminology/definitions
   * **Profile** – Reference to patient or contact profiles
   * **Attachment** – File uploads
   * **Custom Type** – Reference to another CDT
3. **Options** (for List/Multi-Select types):
   * Enter each option as a separate line
   * Optionally assign numeric values (useful for scoring)
   * Set colors for visual differentiation if desired
4. **Required** – Check if this field must be completed
5. **PHI (Protected Health Information)** – Check if field contains sensitive health data

### Step 3: Add Additional Fields

Continue clicking **+ Data Field** to add more fields as needed. Common patterns:

**Vital Signs CDT might include:**

* systolic\_pressure (Integer)
* diastolic\_pressure (Integer)
* heart\_rate (Integer)
* temperature (Float)
* measurement\_date (Date)

**Assessment CDT might include:**

* question\_response (List)
* explanation\_text (Long Text)
* score (Integer)
* assessment\_date (Date)

### Step 4: Configure Field Relationships (Optional)

For more advanced configurations:

1. **Link to Custom Field Types** – If you've created reusable field templates, select them here to maintain consistency across CDTs
2. **Set PHI Status** – Mark fields containing personally identifiable or sensitive health information
3. **Add Descriptions** – Document field purpose for your team

### Step 5: Save and Publish

1. Click **Save** to save your CDT in draft form
2. Click **Publish** to make the CDT and its fields available for use throughout Welkin:
   * In Assessments and Forms
   * In Data Views
   * In Charts and Graphs
   * In Automations and Workflows
   * In Patient Profiles

## Using CDTs in Your Configuration

Once published, CDTs can be:

### In Assessments

* Add CDTF questions to assessment templates
* Reference fields in conditional logic
* Display calculated scores

### In Data Views

* Show key patient metrics in profile summaries
* Display historical data trends
* Group related information by CDT

### In Charts & Graphs

* Visualize numeric data over time
* Create line graphs, bar charts, or pie charts
* Track patient progress on key metrics

### In Automations

* Trigger actions when CDT fields are updated
* Use field values in conditional logic
* Reference field data in message templates

### In Security Policies

* Control CRUD (Create, Read, Update, Delete) access per role
* Restrict sensitive fields based on user permissions

## Best Practices

1. **Plan Your Structure** – Design CDTs to group logically related fields
2. **Use Naming Conventions** – Apply consistent naming for fields and CDTs across your environment
3. **Document Purpose** – Include descriptions noting what each CDT and field represents
4. **Minimize Redundancy** – Avoid creating duplicate fields in multiple CDTs when one shared CDT would work
5. **Consider Reusability** – Create Custom Field Types for fields you'll use in multiple CDTs
6. **Test Before Publishing** – Create test assessments using your CDTs to verify data capture
7. **Review Security** – Ensure appropriate security policies control access to sensitive health data

## CDT Naming Conventions

Welkin supports flexible naming through the **Naming Conventions** configuration in Designer. Common patterns:

* **Prefix-based:** `cdt-vital-signs`, `cdt-depression-screening`
* **Abbreviation-based:** `vs-systolic`, `ds-score`
* **No prefix:** Direct names like `vital-signs`, `depression-screening`

Configure your organization's preferred pattern in the Designer settings.

## Related Topics

* [Designer: Feature Overview – Custom Data Types](/designer/custom-data-types/custom-data-types.md) – Overview of CDT capabilities
* [Create Formulaic Custom Data Type Fields](/designer/custom-data-types/create-formulaic-custom-data-type-fields.md) – Building calculated fields
* [Custom Field Types](/designer/custom-data-types/custom-field-types.md) – Creating reusable field templates
* [How to Create an Assessment or Form Template](/designer/documents-and-assessments/how-to-create-an-assessment-or-form-template.md) – Using CDTs in forms
* [Welkin Naming Conventions Dictionary](/designer/terminology-and-help/welkin-naming-conventions-dictionary.md) – Naming standards
* [Configuring Security Policies](/designer/security/configuring-security-policies.md) – Controlling CDT access


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/designer/custom-data-types/custom-data-types-cdt-designer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
