> For the complete documentation index, see [llms.txt](https://docs.einmind.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.einmind.com/getting-started.md).

# Getting started

### Introduction

**einmind** is a Python client library that interfaces with the EinMind servers, where the actual processing of mapping free-text medical terms to ICD-10-CM and SNOMED CT codes occurs. The library facilitates this mapping through its client APIs, which connect to the publicly available Einmind servers. These public APIs are suitable for applications with limited coding needs.

For users with higher processing demands, it is recommended to deploy the Einmind API in their own cloud environments. The Einmind API is available for deployment through the Azure Marketplace, allowing users to manage larger loads and maintain control over their data processing and storage.

### Supported Python versions

Python 3.7 and higher

### Installation

```sh
pip install einmind
```

### ICD-10-CM Term Mapping

```python
from einmind import ICD10CMClient
icd10cm_client = ICD10CMClient()
result = icd10cm_client.code_term(term='headache')
print(result)
```

### SNOMED CT Term Mapping

```python
from einmind import SNOMEDCTClient

# Initialize the SNOMED CT Client
snomed_client = SNOMEDCTClient()

# Code a disease term
result = snomed_client.code_term(term='headache', term_category="PROBLEM")

# Code a procedure term
result = snomed_client.code_term(term='colonoscopy', term_category="PROCEDURE")
```

### Connecting to private instance

```python
from einmind import ICD10CMClient
from einmind import SNOMEDCTClient


# Initialize the ICD10CM Client
icd10cm_client = ICD10CMClient(
    base_url="<base_url>:<port_number>",
    api_key="<api key>",
)

# Initialize the SNOMED CT Client
snomed_client = SNOMEDCTClient(
    base_url="<base_url>:<port_number>",
    api_key="<api key>",
)
```

<br>


---

# 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.einmind.com/getting-started.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.
