> For the complete documentation index, see [llms.txt](https://docs.rhinofcp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rhinofcp.com/data-harmonization/syntactic-mapping/custom-data-models.md).

# Custom Data Models

### Overview

The RhinoDHE allows you to harmonize data to a **custom data model** rather than a predefined standard such as OMOP. This is useful when your project has a only requires a specific subset or structure of data and performing a full mapping to a standard data model would be unnecessary.

For example, you may want to prepare a dataset for a machine learning model that expects a specific set of fields, create a standardized research dataset containing only the variables needed for an analysis, or transform data into a common ontology agreed upon by multiple collaborators.

### Prerequisites

You must have the "Manage Data Mappings" permission.

**Before you begin**:

* The source data you want to use should already be available in Rhino FCP.
  * The schema for this will be auto-generated if you do not explicitly define it.
* Determine which fields you want to include in your custom data model.
* Determine how you want to transform your fields from source to target.

### Steps

To define the structure of your custom data model, you first create a **Data Schema** specifying the fields, data types, and other properties that the resulting dataset should contain. You then create a **Syntactic Mapping** that defines how data from your source dataset should be transformed to match that schema.

{% stepper %}
{% step %}

#### Select the project

Select the project that contains the syntactic mapping of the data.
{% endstep %}

{% step %}

#### Open Data Schemas

Select **Data Schemas** from the menu on the left.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/pptmtOn65GLJORejsMce/26968416144157)
{% endstep %}

{% step %}

#### Create a new data schema

Select **Create New Data Schema** button in the upper right corner.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/Om3tgRmVQyfq6TPGZMDd/26968416144413)
{% endstep %}

{% step %}

#### Enter schema details

Enter the name and description of the target data schema.
{% endstep %}

{% step %}

#### Choose how to create the schema

Select the **Create Blank Data Schema** or **Upload From File** button.&#x20;

If you want to create your own schema from scratch, select create blank data schema.&#x20;

If you have a CSV file, select Upload from File and select the file from your computer or device.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/DKDuQHxoGIxW5yyxFZpW/26968446357149)
{% endstep %}

{% step %}

#### Create the schema

Select the **Create New Data Schema** button. The schema appears.&#x20;

If you selected the **Create Blank Data Schema** button, a blank schema will appear like the following.&#x20;

If you chose **Upload From File** button, you’ll see the fields from your CSV file.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/plnS0Pz0BOLbwPqsyT50/26968416144925)
{% endstep %}

{% step %}

#### Add fields

For each tabular column, add the Name, Identifier, Description, Role, Type, Type Params, Units, May Contain PHI, and Permissions.

To add additional fields, select the **Add Fields** button.
{% endstep %}

{% step %}

#### Save the schema

When complete, click **Save**.
{% endstep %}

{% step %}

#### Create the syntactic mapping

Create a new Syntactic Mapping by following instructions in [Syntactic Mapping](/data-harmonization/syntactic-mapping.md).&#x20;

Make sure that the target data model is **Custom**.&#x20;

Select the **new schema** **that you created** in the previous steps for the Target field.

![](https://content.gitbook.com/content/ydySyCBmy6F7NnGn4bPa/blobs/ZEFVqSX8tFABYGSJUCj6/26968446357405)
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.rhinofcp.com/data-harmonization/syntactic-mapping/custom-data-models.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
