# Data preparation

To get the best mapping results, it's important to prepare your data prior to beginning the mapping process.

Data in the real world is rarely clean and tidy.

Data may have:

* an underlying data structure and that could be represented with indents
* white space (leading, trailing)
* truncated text
* data types
* headers and footers
* non-text characters (? # / , - + \* @ =)
* misspelling
* abbreviations

Even when data is coded, the data may not be as clean and tidy as expected.

Data could be:

* used out of context (repurposed fields)
* used as proxy – best/easiest closest thing
* underlying coding often organic and uncontrolled:
  * duplicates
  * erroneous synonymy
  * conjugated terms
  * ambiguous
    * different meanings interpreted depending on the context/reader

Other data quality checks include:

* are all the terms uniquely identified?
* are there any duplicates?
* are there any null values?
* is there any meaningful metadata that needs to be accounted for.

All of these things should be considered and rules should be developed and documented on how these things will be handled so that there is consistency through the process and between personnel. Sometimes these decisions require expertise of workflow within the implementation and not just clinical expertise. For example:

| If this is in your data | Possible meaning 1 | Possible meaning 2         | Possible meaning 3            |
| ----------------------- | ------------------ | -------------------------- | ----------------------------- |
| #                       | fracture           | number                     |                               |
| /                       | and                | or                         |                               |
| ?                       | possible           | probable                   | suspected                     |
| ++                      | moderate severity  | getting better             | increased                     |
| Disease 1, Disease 2    | Both (comorbid)    | Disease 1 causes Disease 2 | Disease 2 underlies Disease 1 |

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=Mapping+Guide&#x26;entry.670899847=Data%20preparation" class="button primary">Provide Feedback</a>


---

# 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.snomed.org/snomed-ct-practical-guides/snomed-ct-mapping-guide/map-development/6.1-data-preparation.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.
