Once you have created a syntactic mapping, you can apply one or more transformations to it. Transformations are essential for cleaning, organizing, and standardizing source data so that its information is preserved and accurately represented in the target vocabulary or coding system.
For example, imagine that you have a field called ethnic_background
in your source dataset and you need to map it to a target field named race_concept_id
. You could use the "Custom Mapping" type of transformation to do this. Here is an example of what that could look like.
Source (ethnic_background) | Target (OMOP)(race_concept_id) |
1 | 8527 |
2 | 4212311 |
3 | 8515 |
4 | 38003598 |
5 | 38003579 |
When the transformation is run, the value in the source is mapped to the target value. Using the table above, "1" would be mapped to "8527."
Parts of a Transformation
Creating transformations is straightforward with Rhino FCP. Here is an illustration of the parts of a transformation. Note that not all transformations will have all of these parts.
-
Transformation Type: This specifies the kind of transformation you're using. Transformation types include: Convert Date, Custom Mapping, Semantic Mapping, Set Value, Stable UUID, Row Level Code, Table Level Code, and VLookup.
-
Transformation Inputs and Outputs: Lists the names of source fields and their corresponding target outputs.
-
Description: Offers a concise explanation of the transformation type.
-
Error Message: Shows any error messages related to the transformation.
-
Transformation Configuration: Displays any configuration/code for the transformation.
-
Error Handling: Specifies actions to take if there's a failure, like a missing source value or code error, and sets a default value in such cases.
Transformation Types and Descriptions
The following table lists the transformation types and descriptions.
Transformation Type |
Description |
Custom Mapping | Maps values from the source to corresponding values in the target dataset, like mapping a number to the day of the week. |
Applies a semantic mapping to transform values, like mapping an input text to an OMOP concept ID. |
|
Assigns a specific value to all rows in the field, like setting all values to the number 1. |
|
Changes the date to a different format. For example, you can use this to convert a date from MM/DD/YY format to YYYY-MM-DD. |
|
Generates an encrypted unique identifier based on the input. The same input will always generate the same unique identifier. |
|
Applies python code to each row of input in order to generate the output field value. The input row is available in the "row" dictionary, and the code is expected to generate an "output" variable with the output. For example, this can be used to transform the output of a specific source field to uppercase characters. |
|
Applies Python code to generate an entire column with the output field values. Has access to all input tables and fields, and can utilize Python code to generate the output column. |
|
Looks up each source value in the lookup table, matches a row in the lookup table based on the lookup key field, and returns the value from the matching row in the lookup value field. |
Next Steps
To create or edit a transformation, select one of the articles below.
- Creating and Editing a Custom Mapping Transformation
- Creating and Editing a Semantic Mapping Transformation
- Creating and Editing a Set Value Transformation
- Creating and Editing a Convert Date Transformation
- Creating and Editing a Stable UUID Transformation
- Creating and Editing a Row Level Code Transformation
- Creating and Editing a Table Level Code Transformation
- Creating and Editing a VLookup Transformation