AyushSyncAPI is a lightweight, FHIR R4–compliant terminology micro-service for India’s AYUSH and WHO ICD-11 (TM2 & Biomedicine) clinical vocabularies. It enables Electronic Medical Record (EMR) systems to integrate, search, and map traditional medicine diagnoses (Ayurveda, Siddha, Unani) using NAMASTE codes, and automatically link them with global ICD-11 codes for true dual-coding, analytics, and interoperability.
- FHIR R4 compliant resources for NAMASTE, ICD-11 TM2 & Biomedicine codes.
- Auto-complete REST endpoints for searching AYUSH and ICD-11 codes.
- Bidirectional mapping between NAMASTE and ICD-11 (TM2) codes.
- FHIR Bundle upload endpoint for dual-coded encounters.
- OAuth 2.0 and ABHA ID authentication for secure API access.
- Audit-ready metadata for consent and version tracking.
- Web/CLI demo interface for term lookup, mapping, and FHIR ProblemList generation.
- Bridges AYUSH (India’s traditional medicine) and global digital health ecosystems.
- Enables India’s healthcare providers and EMRs to code, analyze, and claim insurance for traditional as well as biomedical conditions—using a single, standards-based service.
- Powers analytics, research, and reporting for Ministry of Ayush, insurance, and public health.
-
Code Ingestion and Mapping The
ConceptMapping Service, built with Spring Boot and deployed on AWS, is responsible for handling the terminology mapping. It ingests the NAMASTE codes from CSV files and uses the ICD-11 API to synchronize and map the codes. -
Auto-complete and Translation The REST API endpoints, powered by the
ConceptMapping Service, allow users to search, look up, and translate between AYUSH (NAMASTE) and ICD-11 codes. -
FHIR Bundle Upload Securely upload dual-coded clinical encounters for record-keeping and analytics, following EHR 2016 standards.
-
Web/CLI Demo Interface Test and demonstrate code search, mapping, and ProblemList entry creation.
The AyushAuth service handles user authentication and authorization. It uses a passwordless, OTP-based system for both registration and login. Here's a step-by-step breakdown of the process:
- User Initiates Login/Registration: The user enters their ABHA ID (Health ID) in the AyushCLI or AyushWebsite.
- Request to AyushAuth API: The client sends the ABHA ID to the
/auth/otp/sendendpoint of the AyushAuth API. - OTP Generation and Storage:
- The AyushAuth API generates a random 6-digit One-Time Password (OTP).
- It securely stores the OTP and its expiry time in the
otpstable in the Supabase database, associated with the user's ABHA ID.
- OTP Delivery via Twilio: The API sends the generated OTP to the user's registered mobile number via the Twilio SMS API.
- User Enters OTP: The user receives the OTP on their mobile device and enters it into the client application.
- OTP Verification: The client sends the ABHA ID and the entered OTP to the
/auth/otp/verifyendpoint of the AyushAuth API. - JWT Generation:
- The AyushAuth API verifies the OTP against the value stored in the Supabase database.
- If the OTP is valid and not expired, the API checks if a user with the given ABHA ID already exists in the
userstable. - If the user doesn't exist, a new user record is created.
- A JSON Web Token (JWT) is generated, containing the user's ID and other relevant claims. The JWT is signed with a secret key.
- Session Management: The AyushAuth API returns the JWT to the client. The client stores the JWT securely (e.g., in
localStorageor a secure cookie) and includes it in theAuthorizationheader of subsequent requests to the AyushSync API. - Authenticated Requests: The AyushSync API (acting as a gateway) validates the JWT on each incoming request before proxying the request to the appropriate downstream service (e.g., ConceptMapping Service).
This entire workflow is designed to be secure, scalable, and user-friendly, providing a seamless authentication experience without the need for passwords.
GET /codes/search?query=<term>&type=namaste|icd– Search and auto-complete codesPOST /codes/translate– Map between NAMASTE and TM2 codesPOST /fhir/bundle/upload– Securely upload FHIR Bundles (dual-coded)- OAuth 2.0 endpoints for ABHA authentication
- Meets India’s 2016 EHR standards (FHIR R4, ISO 22600, SNOMED CT, LOINC)
- Consent and version tracking within all core data operations
- Clone the repository
- Install dependencies (Python/Node/Java, depending on your backend framework)
- Configure OAuth 2.0 and ABHA endpoints
- Run the migration to ingest NAMASTE and ICD-11 code data
- Start the API service
- Access API docs and sample CLI/Web interface for demo
Released under the MIT License.
- Ministry of Ayush, Government of India
- Open-source digital health community
For more information, technical questions, or contribution guidelines, please refer to the /docs directory or raise an issue in this repository.
