Figure 4: Clinical Data Embedding Pipeline, Creation of the embeddings
Creation Embeddings Flow
This second workflow allows users to interact directly with the system through Telegram, using a conversational assistant connected to language models and external tools. When a message is received, the AI Agent analyzes the request (supported by an Azure OpenAI model and an internal memory that maintains context) and decides what action to take. If the user asks about medical history, the agent queries the vector store stored in Pinecone (via the Medical_History node) to retrieve relevant information. If the request is related to a doctor’s availability, the agent connects to the medical database through the Agenda_Doctors node. Finally, the response is sent back through Telegram in natural language (clear and to the point), allowing for a conversational experience that is agile, helpful, and aligned with the needs of a clinical environment.
Figure 5: AI-Powered Telegram Assistant for Clinical Queries
This image shows a real example of the assistant working within Telegram. Through a natural conversation, the bot is able to identify the patient by last name, retrieve their full name, and then provide the date and time of their last medical appointment (including the doctor’s name and specialty). All of this happens within seconds and without the need to navigate through portals or forms, demonstrating how the integration of AI, semantic search, and instant messaging can streamline access to clinical information in a fast and accurate way.
Figure6: Real-Time Patient Query via Telegram Assistant
Conclusions
Intelligent automation improves efficiency in clinical environments
By combining tools like n8n, Azure OpenAI, and Pinecone, it’s possible to build workflows that reduce repetitive tasks and provide faster access to medical information (without constant manual intervention).Vectorizing clinical data enables more accurate queries
Transforming medical records into embeddings allows for more effective semantic searches (even when users don’t phrase their questions exactly as written in the original text).Conversational assistants offer a natural and accessible experience
Integrating the workflow into platforms like Telegram lets users interact with the system in an intuitive and direct way (without technical barriers or complex interfaces).Hourly updates ensure information is always current
Running the embedding process every hour keeps the system in sync with the latest records (which improves the accuracy and relevance of the assistant’s responses).A well-structured POC shows the real value of AI in healthcare
Even as a prototype, this case demonstrates how artificial intelligence can be applied in a concrete and functional way in the healthcare sector (enhancing both user experience and internal processes).
Source: Read MoreÂ