- 🤖 Introduction
- 🔋 Features
- 🏆 Inspiration
- ⚙️ Setup and Deployment
- 🚀 Usage
- 🌠 Gemini AI Integration
- 🤝 Contributing
- 📜 License
AI Cancer Care provides an easy and efficient way to craft personalized cancer care using AI. It interacts with the Gemini AI to analyze and generate detailed treatment plans based on patient data and medical records.
- Personalized Treatment Plans: Analyzes patient data, medical records, and guidelines to identify gaps in cancer screening and follow-up care, crafting tailored treatment plans for individual patients.
- Secure Data Sharing: Shares sensitive data securely using encryption and cryptographic features, protecting patient information while facilitating necessary data access for healthcare providers.
This project is deeply personal to me. My grandmother recently passed away from cancer, and witnessing her struggle firsthand inspired me to create a solution that could help others in similar situations. She often faced difficulties in coordinating her care and keeping track of her treatment plan, which sometimes led to missed appointments and delayed treatments. I wanted to build an application that could alleviate these challenges for other patients and their families.
- Node.js and npm installed
-
Clone the Repository
git clone https://github.com/mendsalbert/beat-cancer.git cd beat-cancer
-
Install Dependencies
npm install
-
Setup Environment Variables
Create a
.env
file in the root directory with the following content:VITE_GEMINI_API_KEY='Gemini api key here'
-
Build the Project
npm run build
- Upload Reports: Patients or healthcare providers can upload medical reports directly into the system.
- View Treatment Plan: The AI assistant generates a detailed treatment plan based on the uploaded data and identified gaps.
- Track Progress: Patients can monitor their progress, completed screenings, and upcoming appointments through a user-friendly dashboard.
Incorporating Gemini AI into our system provides additional layers of analysis and generative capabilities:
- Detailed Image Analysis: Gemini AI can process medical images uploaded by patients or healthcare providers, offering advanced diagnostic insights.
- Advanced Natural Language Processing: Enhances the accuracy of treatment plans and patient data analysis.
- Scalable AI Infrastructure: Leveraging Gemini AI's robust infrastructure allows for real-time data processing and analysis.
import { GoogleGenerativeAI } from "@google/generative-ai";
const genAI = new GoogleGenerativeAI(process.env.VITE_GEMINI_API_KEY);
const readFileAsBase64 = (file) => {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.onload = () => resolve(reader.result.split(",")[1]);
reader.onerror = reject;
reader.readAsDataURL(file);
});
};
const handleFileUpload = async (file, filetype) => {
const base64Data = await readFileAsBase64(file);
const imageParts = [
{
inlineData: {
data: base64Data,
mimeType: filetype,
},
},
];
const model = genAI.getGenerativeModel({ model: "gemini-1.5-pro" });
const prompt = "Analyze this medical image and provide insights.";
const result = await model.generateContent([prompt, ...imageParts]);
const response = await result.response;
console.log(response.text());
};
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.