# Search medical concepts

Operation ID: `graph.searchMedicalConceptsGet`

Faceted search over the unified Medical Concepts index (SNOMED CT, RxNorm, MeSH) via query-string parameters. Backed by Algolia with a Neo4j fallback.

## Public method

`searchMedicalConceptsFaceted`

Signature: `graph.searchMedicalConceptsFaceted(query)`

Return type: `Promise<MedicalConceptSearchResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /medical-concepts/search`

## Path parameters

None.

## Query parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `active` | `boolean` | No |  |  |  | No |  |
| `code` | `string` | No |  |  |  | No |  |
| `limit` | `integer` | No |  |  | `20` | No |  |
| `module_id` | `string` | No |  |  |  | No |  |
| `offset` | `integer` | No |  |  | `0` | No |  |
| `q` | `string` | No |  |  |  | No |  |
| `sctid` | `string` | No |  |  |  | No |  |
| `semantic_tag` | `string` | No |  |  |  | No |  |
| `top_category` | `string` | No |  |  |  | No |  |
| `tty` | `string` | No |  |  |  | No |  |
| `vocabulary` | `string` | No |  | SNOMED, RXNORM, MESH |  | No |  |

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`SearchMedicalConceptsGetResponse`](../models/SearchMedicalConceptsGetResponse.md) | application/json | Successful Response |

## Success response examples

### 200

```json
{
  "concepts": [
    {
      "active": true,
      "code": "99031000119107",
      "definition_status": "primitive",
      "effective_time": "2015-07-31",
      "fsn": "Acute exacerbation of asthma co-occurrent with allergic rhinitis (disorder)",
      "id": "SNOMED:99031000119107",
      "module_id": "900000000000207008",
      "preferred_term": "Acute exacerbation of asthma co-occurrent with allergic rhinitis",
      "score": 0.98,
      "sctid": "99031000119107",
      "semantic_tag": "disorder",
      "synonyms": [],
      "top_category": null,
      "tree_numbers": null,
      "tty": null,
      "vocabulary": "SNOMED"
    }
  ],
  "request": {
    "active": true,
    "code": "195967001",
    "limit": 20,
    "module_id": "900000000000207008",
    "offset": 0,
    "phrase": "asthma",
    "rag": false,
    "sctid": "195967001",
    "semantic_tag": "disorder",
    "top_category": null,
    "tty": null,
    "vocabulary": "SNOMED"
  },
  "total": 20
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `500` | [`graph.ErrorResponse`](../models/graph.ErrorResponse.md) | application/json | Internal server error |

## Error examples

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
```

```ts
const query = {
  "active": true,
  "code": "<CODE>",
  "limit": 20,
  "module_id": "<MODULE_ID>",
  "offset": 0,
  "q": "<Q>",
  "sctid": "<SCTID>",
  "semantic_tag": "<SEMANTIC_TAG>",
  "top_category": "<TOP_CATEGORY>",
  "tty": "<TTY>",
  "vocabulary": "SNOMED"
};

const result = await graph.searchMedicalConceptsFaceted(query);
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-graph.health.cloud/medical-concepts/search?active=true&code=%3CCODE%3E&limit=20&module_id=%3CMODULE_ID%3E&offset=0&q=%3CQ%3E&sctid=%3CSCTID%3E&semantic_tag=%3CSEMANTIC_TAG%3E&top_category=%3CTOP_CATEGORY%3E&tty=%3CTTY%3E&vocabulary=SNOMED'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
