Welcome to MedXpert-FrontEnd, the Android application of the MedXpert system. MedXpert is a smart medical report analysis platform designed to simplify complex medical documents, highlight abnormal readings, and provide users with a clear, easy-to-understand health summary.
This repository contains the full Android app codebase for the MedXpert system, responsible for interacting with users and displaying simplified medical insights retrieved from the backend.
Understanding medical reports can be challenging for non-medical professionals. Many patients struggle to interpret complex test results, abnormal values, and medical terminology. Additionally, doctors often have limited time to explain reports in detail, leaving patients uncertain about their health conditions.
The backend of MedXpert is responsible for handling the heavy lifting of medical report analysis. It performs the following tasks:
- β Extracts Medical Data: Utilizes advanced OCR technologies like Tesseract and pdfplumber to accurately extract text from PDF and image-based medical reports.
- β Summarizes Medical Jargon: Processes complex medical terminologies and converts them into simplified, understandable summaries using AI-powered language models (OpenAI GPT-3.5).
- β Detects Abnormal Readings: Scans for abnormal values within the report and highlights potential health concerns through AI-driven analysis.
- β Powers the Chatbot: Provides instant, reliable answers to user queries about their medical reports by leveraging LLM (Large Language Model)-based responses.
The frontend of MedXpert provides a seamless and user-friendly Android interface for interacting with the backend features. It handles:
- β User-Friendly Interface: Designed to ensure even non-technical users can easily upload reports and view results.
- β Report Upload & Results Display: Allows users to submit their reports and receive a detailed analysis and summary of the findings.
- β Abnormality Highlighting: Visually marks abnormal values within the summary to help users quickly identify areas of concern.
- β User Role Management: Manages user authentication (guest and logged-in users) and enforces usage limits.
- β Chatbot Interaction: Facilitates communication with the backend chatbot for personalized health insights and explanations.
- β Providing an intuitive Android app interface.
- β Allowing users to upload reports and view summaries.
- β Displaying highlighted abnormalities visually.
- β Managing user roles, limits, and chatbot interactions.
π Download Latest APK
π‘ Click the link above to download the latest version of the MedXpert app and install it on your Android device.
- User authentication (Guest & Logged-in users)
// β
Signup
FirebaseAuth.getInstance()
.createUserWithEmailAndPassword(email, password)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
// Signup success
} else {
// Signup failed
}
}
// β
Signin
FirebaseAuth.getInstance()
.signInWithEmailAndPassword(email, password)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
// Signin success
} else {
// Signin failed
}
}
// β
Forgot Password
FirebaseAuth.getInstance()
.sendPasswordResetEmail(email)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
// Reset email sent
} else {
// Failed to send reset email
}
}-
Upload medical reports (PDF/Image formats)
val intent = Intent(Intent.ACTION_GET_CONTENT)
intent.type = "application/pdf"
startActivityForResult(intent, REQUEST_CODE)- View simplified summaries and abnormalities of your reports
summaryTextView.text = "Summary: ${viewModel.summary}"-
Usage limits based on user roles:
- Logged-in Users (Limit: 5 uploads per day and 10 chabot queries per day):
if (user.isLoggedIn && dailyUploads >= 10) showLimitReached()
- Guest Users (Limit: 2 uploads per day and not chabot access):
if (user.isGuest && dailyUploads >= 2) showLimitReached()
- Logged-in Users (Limit: 5 uploads per day and 10 chabot queries per day):
- Integrated chatbot
| Technology | Description |
|---|---|
| Platform | Android (Kotlin) β A modern, concise, and powerful statically typed programming language. |
| UI Design | XML Layouts β Declarative UI component design for seamless user experiences. |
| State Management | ViewModel + LiveData β Lifecycle-aware components to handle and observe UI-related data. |
| Authentication | Firebase Authentication β Secure, scalable user sign-in and account management. |
| Backend Integration | OkHttp β Efficient and powerful HTTP client for handling API communication. |
| Cloud Services | Firebase β Realtime database, storage, analytics, and backend services. |
| Deployment | Google Play Store (coming soon) β For global Android app distribution. |
val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.medxpert.com/")
.build()
client.newCall(request).enqueue(object : Callback {
override fun onFailure(call: Call, e: IOException) {
// Handle failure
}
override fun onResponse(call: Call, response: Response) {
// Handle response
}
})FirebaseAuth.getInstance().signInWithEmailAndPassword(email, password)
.addOnCompleteListener { task ->
if (task.isSuccessful) {
// User signed in successfully
}
}MedXpert/
βββ manifests/
β βββ AndroidManifest.xml # Defines essential app configurations and permissions.
βββ java/
β βββ com.example.medxpert
β βββ adapters/ # Handles data population in RecyclerViews.
β β βββ ChatAdapter.kt # Manages chat messages display.
β β βββ ReportAdapter.kt # Manages report items in a list.
β β βββ UserAdapter.kt # Manages user list and interactions.
β βββ fragments/ # Modular UI components for various screens.
β β βββ ChatBotFragment.kt # Chat interface with the medical assistant.
β β βββ ChatIntroFragment.kt # Introduction to chatbot features.
β β βββ ResultsFragment.kt # Displays analyzed medical report results.
β β βββ UploadFragment.kt # Handles medical report upload.
β βββ models/ # Data classes used across the app.
β β βββ Report.kt # Represents a medical report structure.
β β βββ User.kt # Represents user profile information.
β β βββ Message.kt # Represents chat message data.
β βββ DashBoardActivity.kt # Post-login dashboard.
β βββ ForgotPasswordActivity.kt # Allows users to recover passwords.
β βββ MainActivity.kt # App's main entry point handling navigation.
β βββ ProfileActivity.kt # Displays and updates user profile.
β βββ SignInActivity.kt # Manages login functionality.
β βββ SignUpActivity.kt # Handles user registration.
β βββ SplashActivity.kt # Displays splash screen on app startup.
βββ res/
β βββ drawable/ # Contains image assets and vector graphics.
β βββ layout/ # Holds all XML UI layout files.
β βββ activity_dash_board.xml # Layout for the dashboard screen.
β βββ activity_forgot_password.xml # Layout for password recovery.
β βββ activity_main.xml # Main container layout.
β βββ activity_profile.xml # User profile screen layout.
β βββ activity_sign_in.xml # Login screen layout.
β βββ activity_sign_up.xml # Registration screen layout.
β βββ activity_splash.xml # Splash screen layout.
β βββ dialog_loading.xml # Loading dialog layout.
β βββ dialog_reset_success.xml # Success dialog after password reset.
β βββ dialog_verification.xml # Verification dialog layout.
β βββ fragment_chat_bot.xml # ChatBot UI layout.
β βββ fragment_chat_intro.xml # Intro screen for chatbot.
β βββ fragment_results.xml # Displays report results.
β βββ fragment_upload.xml # Upload report screen layout.
β βββ item_chat_ai.xml # Layout for AI chat messages.
β βββ item_chat_user.xml # Layout for user chat messages.
β βββ mipmap/ # App launcher icons.
β βββ raw/ # Stores raw assets like instructional videos.
β βββ values/ # XML files for app-wide constants (strings, colors, themes).
βββ build.gradle.kts # Gradle build script for project dependencies and settings.
βββ proguard-rules.pro # Rules for code obfuscation and optimization.
βββ google-services.json # Firebase configuration file.
βββ README.md # Project documentation.
To clone the project repository, use the following commands:
git clone https://github.com/JaspreetSingh-exe/MedXpert-FrontEnd.git
cd MedXpert-FrontEndFollow these steps to open the project:
- Launch Android Studio.
- Select Open an existing project.
- Navigate to the cloned directory and select the project.
Ensure the following configurations:
- Add your Firebase configuration file
google-services.jsonto the/appdirectory. - Connect your project with Firebase through the Firebase Console.
- Define your backend API endpoints in the appropriate service classes.
<resources>
<string name="api_url">https://api.medxpert.com/</string>
</resources>To run the project:
- Click on the Run button or use the shortcut
Shift + F10. - Choose a connected device or emulator for testing.
The MedXpert Android app communicates with the MedXpert Backend API to provide the core functionalities of the application. The backend processes and returns the necessary data, and the frontend handles the presentation and interaction.
-
Medical Report Analysis: When a user uploads a report, the frontend sends the file via an HTTP request to the backend. The backend performs OCR and text extraction, then analyzes the data to detect abnormalities and generate summaries.
-
Summary Generation: The backend uses AI-powered language models to convert complex medical data into simplified summaries and returns them to the frontend for display.
-
Usage Management: The backend tracks the number of uploads and chatbot interactions per user and enforces daily usage limits.
-
Chatbot Integration: The chatbot interface on the app sends user queries to the backend, which generates intelligent, context-aware responses using LLMs.
π MedXpert-Backend Repository
Introduce a dark theme option to reduce eye strain and provide a comfortable user experience in low-light conditions.
Add functionality for users to access and manage a history of their uploaded reports, enabling easy review and re-analysis.
Implement support for multiple languages to make the app accessible to a global user base, breaking language barriers in healthcare.
Allow users to view previously analyzed reports and summaries without needing an active internet connection.
We welcome contributions from developers and UI/UX designers to enhance the MedXpert Application! If you would like to contribute, hereβs how you can help:
- Fork the Repository: Click on the "Fork" button at the top right of this repository.
- Clone Your Fork: Clone the repository to your local machine.
git clone https://github.com/JaspreetSingh-exe/MedXpert-FrontEnd.git cd MedXpert-FrontEnd - Create a New Branch: Make sure to create a new branch for your changes.
git checkout -b feature-new-enhancement
- Make Your Changes: Add new features, fix bugs, or improve documentation.
- Commit and Push: Commit your changes and push to your fork.
git add . git commit -m "Added a new feature" git push origin feature-new-enhancement
- Create a Pull Request: Submit a pull request (PR) to the
mainbranch of this repository.
- Follow best practices for code structure, comments, and documentation.
- Ensure that your code passes all tests and does not break existing functionality.
- If adding a new feature, please update the documentation accordingly.
- Be respectful and collaborative when reviewing and discussing PRs.
Join me in making MedXpert a powerful and intelligent AI-based medical report analyzer! π
If you encounter any issues, feel free to create an issue on GitHub.
For any queries reach out at jaspreetsingh01110@gmail.com
This project is licensed under the Apache License 2.0. See LICENSE for details.
β Don't forget to star this repo if you like the project!
