TheDocumentation 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.
/api/search endpoint powers the frontend dashboards and is available without authentication in demo mode. It searches across NAMASTE codes and ICD-11 codes (both TM2 and Biomedicine) simultaneously, returning a unified result list that includes each code’s mapping status and linked ICD-11 target where applicable. This is the primary entry point for the Professional Dashboard, Public Dashboard, and Technical Dashboard search features.
GET /api/search
Method:GETPath:
/api/searchAuth: None required
Query Parameters
Full-text search query. The value is matched case-insensitively against the
code, display, and definition fields of both NAMASTE and ICD-11 code sets. Must be at least 2 characters to return any results. Shorter values are treated as empty.Filter results to a specific coding system. Accepted values:
| Value | Filters to |
|---|---|
all | All NAMASTE and ICD-11 codes (default) |
Ayurveda | NAMASTE codes with system = "Ayurveda" |
Siddha | NAMASTE codes with system = "Siddha" |
Unani | NAMASTE codes with system = "Unani" |
TM2 | ICD-11 codes with chapter = "TM2" |
Biomedicine | ICD-11 codes with chapter = "Biomedicine" |
Filter results by concept-map status. Accepted values:
| Value | Filters to |
|---|---|
all | Both mapped and unmapped codes (default) |
mapped | Codes that have a corresponding entry in the concept map |
unmapped | Codes with no concept-map entry |
Response
Returns a JSON array of unified result objects. Each element represents one code, whether it originated from the NAMASTE set or the ICD-11 set.The NAMASTE code identifier, e.g.
NAM-003. For results that originate purely from an ICD-11 search (i.e. no NAMASTE source code is mapped to this ICD-11 entry), this field is "N/A".Human-readable name for the condition, e.g.
Fever.Clinical definition of the condition.
The originating coding system. One of
Ayurveda, Siddha, Unani, ICD-11 TM2, or ICD-11 Biomedicine.The ICD-11 code this NAMASTE code maps to, e.g.
TM2-003. Set to "N/A" if no mapping exists for this code.Display name of the mapped ICD-11 code, e.g.
Fever. Set to "Not Mapped" if no mapping exists.Example — Search for “fever”
Response
Search Logic
The endpoint applies a two-stage search on each request:-
NAMASTE search (primary): The server iterates over all in-memory NAMASTE codes. For each code, it applies the
systemfilter first, then checks whetherqappears in thecode,display, ordefinitionfield (case-insensitive substring match). Passing codes are then matched against the concept map to populateTarget_CodeandTarget_Display. Themappingfilter is applied after the concept-map lookup. -
ICD-11 search (supplementary): If the NAMASTE stage returns fewer than 20 results, the server calls
WhoApiService.search_codes(q)which runs the same substring match against both TM2 and Biomedicine code sets. Results from this stage are subject to the samesystemandmappingfilters. Each ICD-11 result is checked against the concept map in reverse (target → source) to resolve itsNAMASTE_Code.
Example Queries
Response — system=Ayurveda
Response — mapping=mapped
Sending an empty
q parameter (or omitting it entirely) with no active filters (system=all and mapping=all) returns an empty array [] immediately — no database query is executed. The search query must be at least 2 characters long to trigger any matching logic.