> For the complete documentation index, see [llms.txt](https://docs.snomed.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.snomed.org/snomed-ct-practical-guides/snomed-ct-mapping-guide/map-development/6.1-data-preparation.md).

# 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 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 is 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 for how they will be handled to ensure consistency throughout the process and among personnel. Sometimes these decisions require expertise in 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
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.snomed.org/snomed-ct-practical-guides/snomed-ct-mapping-guide/map-development/6.1-data-preparation.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.
