MedilinkAI
MedilinkAI is an advanced patient portal application built to provide patients with seamless access to their health records, hospital locator functionality, a personalized chatbot, and emergency contacts. MedilinkAI leverages Microsoft Fabric and OpenAI for secure data management and contextual AI assistance, delivering a comprehensive and user-friendly healthcare solution.
Inspiration
We were inspired by the challenges many patients face when trying to access and interpret their medical information. With complex health records scattered across different systems, patients often struggle to stay informed about their health history. By integrating medical data with AI, we aimed to create an all-in-one platform that empowers patients with easy access to their health information, guidance, and tools for locating nearby hospitals, managing appointments, and seeking help during emergencies.
What it does
MedilinkAI offers the following features:
- Patient Dashboard: Provides patients with a summary of recent medical data, including last visit, encounter description, medications, immunizations, allergies, and imaging studies.
- Hospital Locator: Allows patients to find nearby hospitals using various filters like location, type, and emergency services.
- Power BI Integration: Visualizes patient data through a Power BI dashboard for an in-depth health overview.
- Personalized Chatbot: An AI chatbot leverages OpenAI’s API and the patient’s medical context to provide customized assistance.
- Emergency Contacts: Displays a list of quick-access emergency contacts for urgent situations.
System Architecture
The MedilinkAI architecture integrates Microsoft Fabric and Flask to manage and query large volumes of healthcare data securely and efficiently. Here’s how each component is used:
Microsoft Fabric Lakehouses:
- Patient Lakehouse: Stores all patient-related tables (18 tables generated from Synthea) in a dedicated Lakehouse, making it easy to manage and access data.
- Hospital Lakehouse: Separates hospital data into its own Lakehouse, optimized for location-based queries and searches. This separation also improves data organization and security.
SQL Endpoints:
- We established SQL Endpoints in Microsoft Fabric to connect both Lakehouses within a semantic model. This enables structured querying across patient and hospital data and integrates these queries seamlessly into the backend.
PySpark Notebooks:
- Microsoft Fabric’s notebooks were used to preprocess and clean the hospital data, retaining only essential columns, handling missing values, and standardizing column names for database compatibility.
Power BI Dashboard:
- The Power BI Dashboard visualizes patient data, providing patients with easy-to-understand visual summaries of their health data. This dashboard is directly powered by data from the SQL Endpoints.
Backend (Flask):
- The Flask backend interacts with Microsoft Fabric’s SQL Endpoints to retrieve and serve patient and hospital data to the frontend, handles user authentication, and manages session data securely.
AI Chatbot and Summary:
- OpenAI’s API powers a personalized chatbot and a summary generation feature, helping patients better understand their medical history and offering support for common health-related queries.
How we built it
MedilinkAI’s architecture was built around Microsoft Fabric components and Flask. Key development steps included:
- Data Collection: We used the Synthea API to generate synthetic patient data, creating 18 tables saved as CSV files.
- Data Preprocessing: The hospital data was processed using a PySpark notebook in Microsoft Fabric, where we cleaned and formatted the data into 12 essential columns.
- Lakehouse Storage: Patient and hospital data were each stored in separate Microsoft Fabric Lakehouses to optimize data organization, query efficiency, and access control.
- Semantic Model and SQL Endpoints: We created a semantic model in Microsoft Fabric, connecting both Lakehouses with SQL Endpoints for structured querying.
- Flask Backend: Our Flask backend retrieves data via SQL Endpoints, enabling user authentication and data management.
- Frontend (React.js): The frontend interacts with the backend, rendering the patient dashboard, hospital locator, and chatbot.
- AI Integration: Using OpenAI’s API, we developed a chatbot that provides personalized responses based on patient data and generates summaries of recent health information.
Challenges we ran into
Throughout the development process, we faced several challenges:
- Data Consistency: Integrating 18 tables of synthetic patient data required careful handling of missing or inconsistent data.
- Azure Authentication: Implementing secure Azure authentication and managing session data added complexity to the development.
- API Rate Limits: The OpenAI API rate limits required careful management to ensure smooth chatbot functionality.
- Efficient Querying: Ensuring efficient queries to Microsoft Fabric’s SQL Endpoints was critical, especially for a responsive user experience in the patient dashboard and hospital locator.
Accomplishments that we're proud of
We’re proud of building a comprehensive patient portal that combines multiple functionalities into one seamless platform. Some key accomplishments include:
- Successful Integration with Microsoft Fabric: Setting up a robust semantic model that allowed us to link patient and hospital data effectively across two dedicated Lakehouses.
- AI-Powered Chatbot: Leveraging OpenAI to deliver a personalized patient assistant, giving patients accessible and relevant responses based on their health records.
- Data Visualization with Power BI: Enabling patients to visualize and understand their medical history through a user-friendly dashboard.
What we learned
Through this project, we gained experience in handling large datasets, working with Microsoft Fabric’s data services, and building an AI-powered application. We also learned a great deal about managing API integrations, including Azure authentication and OpenAI’s limitations, and optimizing data queries to ensure fast response times.
What's next for MedilinkAI
In the future, we plan to expand MedilinkAI’s capabilities by:
- Profile Management: Adding functionality for patients to update their profile, including photos and personal information.
- Telehealth Integration: Introducing telehealth features to allow patients to connect with healthcare providers directly through the portal.
- Advanced Health Analytics: Using AI to provide predictive health analytics and risk assessments based on the patient’s medical data.
- Real-Time Notifications: Implementing real-time alerts for medication schedules, upcoming appointments, and important health updates.
- Advanced Imaging Analysis: AI-driven tools to enhance the analysis of medical imaging like MRIs and CT scans.
6. Clinical Report Generation. automatically generates a detailed, personalized clinical report using the user's relevant health data.
Summary
MedilinkAI directly addresses the challenge of fragmented healthcare information by consolidating patient records, visualizations, and AI-powered assistance into one platform. This solution empowers patients to understand and access their health data, solving a real-world problem with a highly relevant solution.
The code and setup instructions are documented in our GitHub repository, making it easy for others to reproduce our solution. A video demonstration is also included to illustrate how MedilinkAI utilizes Microsoft Fabric features and OpenAI for enhanced patient engagement.
A video demonstration showcases MedilinkAI’s use of Microsoft Fabric’s Lakehouses, SQL Endpoints, PySpark Notebooks, and Power BI integration, along with the OpenAI-powered chatbot. The video illustrates the platform’s user interface, highlighting its practical applications in patient health management.
Built With
- css
- flask
- javascript
- microsoft-fabric
- node.js
- openai
- powerbi
- python
- react-native
- sql
Log in or sign up for Devpost to join the conversation.