# MedicalConceptSearchRequest

Model ID: `SearchMedicalConceptsRequest`

Search the Medical Concepts index by free text + vocabulary-aware facets.

Facets mirror the Algolia `attributesForFaceting` of the `medical_concepts`
index (vocabulary, semantic_tag, tty, top_category, active, module_id, plus
filter-only code/sctid). `id` is not an Algolia facet — filter by
code/sctid/vocabulary instead.

Type: `object`

## Fields

| Field | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `active` | `boolean|null` | No |  |  | `null` | Yes | Filter to active / inactive concepts (SNOMED) |
| `code` | `string|null` | No |  |  | `null` | Yes | Native code (SNOMED sctid / RxNorm rxcui / MeSH UI) |
| `limit` | `integer` | No |  |  | `20` | No | Maximum results returned. |
| `module_id` | `string|null` | No |  |  | `null` | Yes | SNOMED module id |
| `offset` | `integer` | No |  |  | `0` | No | Number of results to skip, for pagination. |
| `phrase` | `string|null` | No |  |  | `null` | Yes | Free-text query across preferred_term / fsn / synonyms |
| `rag` | `boolean` | No |  |  | `false` | No | When true, runs retrieval-augmented generation via Anthropic |
| `sctid` | `string|null` | No |  |  | `null` | Yes | SNOMED concept id (filter-only) |
| `semantic_tag` | `string|null` | No |  |  | `null` | Yes | SNOMED semantic tag (e.g. disorder, procedure, finding) |
| `top_category` | `string|null` | No |  |  | `null` | Yes | MeSH top-level category (e.g. Diseases) |
| `tty` | `string|null` | No |  |  | `null` | Yes | RxNorm term type (e.g. IN, SCD, BN) |
| `vocabulary` | `string|null` | No |  |  | `null` | Yes | SNOMED \| RXNORM \| MESH |

## Example

None declared in canonical OpenAPI.
