Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sagar-grv/ayush-synapse/llms.txt

Use this file to discover all available pages before exploring further.

The ICD-11 endpoints expose codes from two chapters of the International Classification of Diseases, 11th Revision: Traditional Medicine Module 2 (TM2, codes prefixed TM2-) and Biomedicine (codes prefixed BM-). In the current MVP, six sample codes per chapter are returned by the WhoApiService. Production deployments can integrate directly with the WHO ICD-11 API by supplying a valid WHO_API_KEY environment variable.

GET /icd11 — List All ICD-11 Codes

Returns the combined set of TM2 and Biomedicine codes in a single array. Method: GET
Path: /icd11
Auth: None required (open in demo mode)

Response

Returns a JSON array containing TM2 objects followed by Biomedicine objects.
code
string
Unique ICD-11 code identifier, e.g. TM2-001 or BM-001.
display
string
Human-readable code name, e.g. Common Cold.
definition
string
Clinical definition text, e.g. Acute viral rhinitis.
chapter
string
ICD-11 chapter this code belongs to. Either TM2 or Biomedicine.

Example

curl -X GET http://localhost:5000/icd11
Response
[
  {
    "code": "TM2-001",
    "display": "Common Cold",
    "definition": "Acute viral rhinitis",
    "chapter": "TM2"
  },
  {
    "code": "TM2-002",
    "display": "Headache",
    "definition": "Pain in head or neck",
    "chapter": "TM2"
  },
  {
    "code": "BM-001",
    "display": "Acute rhinitis",
    "definition": "Acute inflammation of the nasal mucosa",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-002",
    "display": "Tension-type headache",
    "definition": "Headache caused by muscle tension",
    "chapter": "Biomedicine"
  }
]

GET /icd11/tm2 — List TM2 Codes

Returns only the codes that belong to the Traditional Medicine Module 2 chapter (chapter = "TM2"). Method: GET
Path: /icd11/tm2
Auth: None required (open in demo mode)

Response

Same object shape as GET /icd11. All returned objects will have "chapter": "TM2".

Example

curl -X GET http://localhost:5000/icd11/tm2
Response
[
  {
    "code": "TM2-001",
    "display": "Common Cold",
    "definition": "Acute viral rhinitis",
    "chapter": "TM2"
  },
  {
    "code": "TM2-002",
    "display": "Headache",
    "definition": "Pain in head or neck",
    "chapter": "TM2"
  },
  {
    "code": "TM2-003",
    "display": "Fever",
    "definition": "Elevated body temperature",
    "chapter": "TM2"
  },
  {
    "code": "TM2-004",
    "display": "Joint Pain",
    "definition": "Arthralgia",
    "chapter": "TM2"
  },
  {
    "code": "TM2-005",
    "display": "Digestive Issues",
    "definition": "Gastrointestinal symptoms",
    "chapter": "TM2"
  },
  {
    "code": "TM2-006",
    "display": "Skin Rash",
    "definition": "Dermatological symptoms",
    "chapter": "TM2"
  }
]

GET /icd11/biomedicine — List Biomedicine Codes

Returns only the codes that belong to the Biomedicine chapter (chapter = "Biomedicine"). Method: GET
Path: /icd11/biomedicine
Auth: None required (open in demo mode)

Response

Same object shape as GET /icd11. All returned objects will have "chapter": "Biomedicine".

Example

curl -X GET http://localhost:5000/icd11/biomedicine
Response
[
  {
    "code": "BM-001",
    "display": "Acute rhinitis",
    "definition": "Acute inflammation of the nasal mucosa",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-002",
    "display": "Tension-type headache",
    "definition": "Headache caused by muscle tension",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-003",
    "display": "Fever of unknown origin",
    "definition": "Elevated body temperature without identified cause",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-004",
    "display": "Arthralgia",
    "definition": "Joint pain without inflammation",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-005",
    "display": "Dyspepsia",
    "definition": "Indigestion or stomach discomfort",
    "chapter": "Biomedicine"
  },
  {
    "code": "BM-006",
    "display": "Dermatitis",
    "definition": "Inflammatory skin condition",
    "chapter": "Biomedicine"
  }
]

GET /icd11/search/{term} — Search ICD-11 Codes

Performs a case-insensitive substring search across the code, display, and definition fields of all ICD-11 codes (both TM2 and Biomedicine). Method: GET
Path: /icd11/search/{term}
Auth: None required (open in demo mode)
Rate limit: 30 requests per minute per IP address

Path Parameters

term
string
required
The search term to match against code identifiers, display names, and definitions. For example, fever matches TM2-003 Fever and BM-003 Fever of unknown origin.

Response

Returns a filtered JSON array of code objects that contain the search term in at least one of the three searchable fields. Returns an empty array [] if no matches are found.
code
string
ICD-11 code identifier.
display
string
Human-readable code name.
definition
string
Clinical definition text.
chapter
string
TM2 or Biomedicine.

Example — Search for “fever”

curl -X GET http://localhost:5000/icd11/search/fever
Response
[
  {
    "code": "TM2-003",
    "display": "Fever",
    "definition": "Elevated body temperature",
    "chapter": "TM2"
  },
  {
    "code": "BM-003",
    "display": "Fever of unknown origin",
    "definition": "Elevated body temperature without identified cause",
    "chapter": "Biomedicine"
  }
]

GET /icd11/{code} — Get a Specific ICD-11 Code

Returns the full detail record for a single ICD-11 code. Method: GET
Path: /icd11/{code}
Auth: None required (open in demo mode)

Path Parameters

code
string
required
The ICD-11 code identifier to retrieve. Must be an exact match, e.g. TM2-001 or BM-004. The lookup searches both TM2 and Biomedicine code sets.

Response

Returns a single code object on success, or HTTP 404 when the code is not found.
code
string
ICD-11 code identifier.
display
string
Human-readable code name.
definition
string
Clinical definition text.
chapter
string
TM2 or Biomedicine.
404 Response
{
  "error": "Code not found"
}

Example

curl -X GET http://localhost:5000/icd11/TM2-003
Response — TM2-003
{
  "code": "TM2-003",
  "display": "Fever",
  "definition": "Elevated body temperature",
  "chapter": "TM2"
}
Response — BM-005
{
  "code": "BM-005",
  "display": "Dyspepsia",
  "definition": "Indigestion or stomach discomfort",
  "chapter": "Biomedicine"
}

In the current MVP, WhoApiService returns 6 sample TM2 codes (TM2-001TM2-006) and 6 sample Biomedicine codes (BM-001BM-006). These are returned directly without a live network call. To integrate with the real WHO ICD-11 API, set the WHO_API_KEY environment variable. The service connects to https://icd.who.int/dev11 and passes the key via an API-Key header on each request.

Build docs developers (and LLMs) love