Skip to content

feat: AI-based Medical Report Generation & Processing#68

Draft
markrizkalla wants to merge 5 commits into
devfrom
feature/ai-medical-reports-3085700298183959076
Draft

feat: AI-based Medical Report Generation & Processing#68
markrizkalla wants to merge 5 commits into
devfrom
feature/ai-medical-reports-3085700298183959076

Conversation

@markrizkalla

Copy link
Copy Markdown
Contributor

This PR introduces the AI-based medical report generation and processing feature across the full stack.

  • Backend: Creates the medical-reports module to simulate AI generation and store reports for patients. Incorporates security checks to prevent IDOR via SameIdGuard.
  • Frontend: Creates a MedicalReports UI to view/generate reports and updates PatientDashboard to fetch actual patientId from Auth Context.
  • Mobile: Adds MedicalReportsScreen with KMP and integrates it into the HomeScreen via Voyager navigator.

PR created automatically by Jules for task 3085700298183959076 started by @markrizkalla

- 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>
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 4 commits April 3, 2026 23:03
- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant