feat: AI-based Medical Report Generation & Processing#68
Conversation
- Created `MedicalReport` entity and endpoints (`POST`, `GET`) in the backend. - Applied `SameIdGuard` on endpoints to prevent IDOR and restrict patients to their own reports. - Implemented `MedicalReports` component in the frontend and integrated it into the `PatientDashboard` page. - Created KMP `MedicalReportsScreen` for Android/iOS with networking support. - Fixed failing unit tests in `auth.service.spec.ts`. Co-authored-by: markrizkalla <46606022+markrizkalla@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Created `MedicalReport` entity and endpoints (`POST`, `GET`) in the backend. - Applied `SameIdGuard` on endpoints to prevent IDOR and restrict patients to their own reports. - Implemented `MedicalReports` component in the frontend and integrated it into the `PatientDashboard` page. - Created KMP `MedicalReportsScreen` for Android/iOS with networking support. - Fixed failing unit tests in `auth.service.spec.ts`. - Removed automatically generated `package-lock.json` files and ran pre-commit. Co-authored-by: markrizkalla <46606022+markrizkalla@users.noreply.github.com>
- Added `MedicalReportsRepository` and its remote implementation. - Added `GetMedicalReportsUseCase` and `CreateMedicalReportUseCase`. - Added `MedicalReportsViewModel` and refactored `MedicalReportsScreen` to rely on UI state rather than executing calls within composables. - Wired all the new classes in `AppModule.kt` for Dependency Injection using Koin. - Ran pre-commit hooks. Co-authored-by: markrizkalla <46606022+markrizkalla@users.noreply.github.com>
- Changed NetworkMedicalReportsRepository endpoints to use relative URL ("patients/...") to match Ktor client configuration.
Co-authored-by: markrizkalla <46606022+markrizkalla@users.noreply.github.com>
- Frontend: Use `NEXT_PUBLIC_API_BASE_URL` in `MedicalReports` component to connect accurately in both development and production. Handled errors nicely to propagate from API. - Backend: Added `class-validator` `MaxLength` and `IsNotEmpty` checks to `CreateMedicalReportDto` for better data integrity. - Verified test suite passes, and pre-commit checks are happy. Co-authored-by: markrizkalla <46606022+markrizkalla@users.noreply.github.com>
This PR introduces the AI-based medical report generation and processing feature across the full stack.
medical-reportsmodule to simulate AI generation and store reports for patients. Incorporates security checks to prevent IDOR viaSameIdGuard.MedicalReportsUI to view/generate reports and updatesPatientDashboardto fetch actualpatientIdfrom Auth Context.MedicalReportsScreenwith KMP and integrates it into theHomeScreenvia Voyager navigator.PR created automatically by Jules for task 3085700298183959076 started by @markrizkalla