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 Professional Dashboard (served at /professional.html) is designed for clinicians, health informaticians, and researchers who require precise NAMASTE-ICD-11 mapping, direct access to FHIR R4 resources, and data-driven analytics. It exposes the full power of the Ayush Synapse API through a structured interface that surfaces equivalence scores, confidence levels, and system-level metadata alongside every result.

Accessing the Dashboard

1

Start the Flask server

From the project root, run:
python app.py
The server starts on http://0.0.0.0:5000 by default. You can override the host and port via the FLASK_HOST and FLASK_PORT environment variables.
2

Open the dashboard in your browser

Navigate to:
http://localhost:5000/professional.html
The dashboard loads immediately — no login is required to view the interface. Protected API calls (FHIR resources, mappings) require a demo token; see Authentication below.

Key Features

Every search result card in the Professional Dashboard shows both the source NAMASTE code and its mapped ICD-11 target side by side. The card surface includes:
  • Source code (NAM-XXX) with AYUSH system label (Ayurveda, Siddha, or Unani)
  • Target code (TM2-XXX or BM-XXX) with ICD-11 chapter label
  • Equivalence — always equivalent in the current dataset
  • Confidence score — a float between 0.75 and 0.95 reflecting the mapping strength
Use GET /mappings to retrieve the full list of 85 cross-system mappings in JSON:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
     http://localhost:5000/mappings
[
  {
    "sourceCode": "NAM-003",
    "targetCode": "TM2-003",
    "equivalence": "equivalent",
    "sourceSystem": "NAMASTE",
    "targetSystem": "ICD-11 TM2",
    "confidence": 0.95
  }
]
The dashboard provides direct links to the three FHIR R4 resources exported by Ayush Synapse:
ResourceEndpointDescription
NAMASTE CodeSystemGET /codesystem/namasteFHIR R4 CodeSystem for all NAMASTE codes (full definitions, system labels)
ICD-11 CodeSystemGET /codesystem/icd11FHIR R4 CodeSystem combining TM2 and Biomedicine codes
ConceptMapGET /conceptmapFHIR R4 ConceptMap from namaste-codesicd11/tm2
Example — fetch the NAMASTE CodeSystem:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
     http://localhost:5000/codesystem/namaste
The response is a fully valid FHIR R4 CodeSystem JSON resource with resourceType, id, url, status, and concept array.
The analytics panel is populated by GET /api/stats, which returns mapping coverage metrics broken down by coding system and chapter:
curl http://localhost:5000/api/stats
{
  "namaste_codes": {
    "total": 85,
    "by_system": {
      "Ayurveda": 60,
      "Siddha": 15,
      "Unani": 10
    }
  },
  "icd11_codes": {
    "tm2_total": 55,
    "biomedicine_total": 30
  },
  "mappings": {
    "mapped": 85,
    "unmapped": 0,
    "coverage_percentage": 100.0
  }
}
The dashboard renders coverage percentage as a progress bar and displays per-system breakdowns as a bar chart.

Authentication

The Professional Dashboard uses the demo token issued by POST /auth/login. No account registration is required.
1

Request a demo token

curl -X POST http://localhost:5000/auth/login \
     -H "Content-Type: application/json" \
     -d '{"user_id": "demo_user", "role": "clinician"}'
{
  "message": "Authentication successful",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
  "user_id": "demo_user",
  "role": "clinician",
  "demo_mode": true,
  "permissions": {
    "can_access_all_endpoints": true,
    "can_view_all_data": true,
    "can_perform_translations": true,
    "can_access_fhir_resources": true
  }
}
2

Attach the token to protected requests

Copy the value of "token" from the response and pass it as a Bearer token in the Authorization header:
curl -H "Authorization: Bearer YOUR_TOKEN_HERE" \
     http://localhost:5000/codesystem/namaste
The dashboard stores the token in the browser session automatically once entered in the token input field.
The demo token grants full access to every protected endpoint. There is no expiry enforced in demo mode, so you can reuse the same token throughout a session.
The following endpoints are called directly by the Professional Dashboard:
MethodEndpointAuth RequiredDescription
GET/api/searchNoFull-text search with system and mapping filters
GET/mappingsNoAll 85 NAMASTE→ICD-11 concept mappings
GET/codesystem/namasteNoFHIR R4 CodeSystem for NAMASTE codes
GET/codesystem/icd11NoFHIR R4 CodeSystem for ICD-11 TM2 + Biomedicine
GET/conceptmapNoFHIR R4 ConceptMap (NAMASTE → ICD-11)
GET/api/statsNoMapping coverage statistics
POST/auth/loginIssues a demo JWT token

Build docs developers (and LLMs) love