> For the complete documentation index, see [llms.txt](https://docs.medable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.medable.com/getting-started/cortex-user-guide/data-model-setup/add-custom-properties.md).

# Add custom properties

## Create custom properties

Custom properties can be added to standard objects (such as the Account object) and to custom objects like the Prescription object.

You can add a custom property from an object's detail view:

1. Select **Settings** > **Objects** on the left-hand menu.
2. Select the label of an object you'd like to view.
3. Scroll down to the Custom Properties pane and click **New Property**.
4. On the Create Property screen, you can fill out:
   * **Property Label:** Enter the label for your property that will be displayed in the UI.
   * **Property Name:** Enter the API name for your property.
   * **Property Type:** Select the type of property to create. For more information on property types, see primitive types in the API documentation.
   * **Property Access:** Select the access levels that users and roles have to this property.
5. Click **Create Property**. The Create Property screen is displayed.

![Create Patient Property](/files/-Mj66O6DsfHlhGXQ-6aJ)

Since we're creating a Prescription object, we'll need to create a number of properties to represent a patient's prescription. The following table shows a few properties that we'll need to create:

| Label    | Name         | Type      | Description                       |
| -------- | ------------ | --------- | --------------------------------- |
| Date     | `c_date`     | Date      | Date of the prescription          |
| Dispense | `c_dispense` | Number    | Amount to dispense per refill     |
| Patient  | `c_patient`  | Reference | Reference to the patient account  |
| Provider | `c_provider` | Reference | Reference to the provider account |
| Refills  | `c_refills`  | Number    | Number of refills                 |
| Rx       | `c_rx`       | String    | Prescription details              |

### Create a Patient property

First, we'll create the Patient property.

1. On the Create Property screen, select **Reference** from the Property Type list. More options particular to the reference property type will be displayed.
2. For Source Object, select **Account**. We want to relate the prescription to the patient's account record.&#x20;
3. For Required Access, select **Connected**. This means that whoever is creating the prescription will need to have at least that level of access to the patient's account record.&#x20;
4. For Expandable, leave it as selected.&#x20;
5. For Grant Access, select **Read**.
6. Check **Indexed**. This will allow us to query prescriptions by `patient account \_id`.
7. Click **Create Property** once the property has been configured.

After creating the Patient property, you will see it listed under Custom Properties of the object's detail view.

![Reference Property](/files/-Mj66O6EsHvfyyF5OWdJ)

### Create a Date property

Next, we'll create the Date property.

1. On the Create Property screen, select **Date** as the property type.&#x20;
2. Check **Date Only**, as this does not need to be a date-time property.&#x20;
3. Check **Indexed** so that we can query prescriptions by date.
4. Click **Create Property** once the date property has been configured.

![](/files/-Mj66O6Fs-A7z9nHxpaJ)

### Create an Rx property

Next, we'll create the Rx property. This time we will:

1. On the Create Property screen, select **String** as the property type.&#x20;
2. Check **Indexed**.
3. Enter a value in the Max Length field that is appropriate.
4. Click **Create Property** once the property has been configured.

![](/files/-Mj66O6GO_1S6ysttrjd)

### Create additional properties

Finally, create a few more properties to complete the object.

![](/files/-Mj66O6HHHVE1XLJLqNm)
