ASIO‑Medical Platform

ASIO‑Medical Platform

Multi-interface medical system with RBAC, analytics, billing, and AI-assisted diagnostics.

AngularLaravelJWTFastAPITensorFlown8nGroqPostgreSQL
#full-stack #angular #laravel #jwt #fastapi #tensorflow #n8n #groq #postgresql

Project Overview

ASIO‑Medical is an end‑to‑end platform serving four interfaces: Admin, Doctor, Receptionist, and Patient. The system follows a 4‑layer architecture: Angular frontend, a dedicated security layer (JWT + permission middleware), a Laravel backend using services/repositories, and PostgreSQL. Interface permissions route each user to the correct UI and restrict features at the source. Analytics dashboards cover finances (timeline, yearly, doctor comparison, services usage) and engagement (activity, modules). AI tools assist doctors through a FastAPI service (TensorFlow models) and Groq LLM summaries. n8n powers a pre‑consultation assistant that guides patients, checks availability, and lists pre‑visit tests.

Cover

image

Project cover.

Project Architecture (4 layers)

image

Frontend (Angular) → Security (JWT + permission middleware) → Backend (Laravel services/repositories) → Database (PostgreSQL).

Request Lifecycle & Middleware

image

Client sends HTTP → JWT middleware validates token → Permission middleware authorizes → Activity logger records → Controller calls Service → Repository → Model → DB; response bubbles back to Controller → JSON to client.

Login Sequence (UML)

image

POST /api/auth/login from Admin UI → routes → AuthController → JWT service → DB lookup → journalActivity(logger) → JSON response.

Use Case Diagram

image

Actors: Patient, Receptionist, Doctor, Admin. Admin focuses on resources/permissions and cannot see patients’ personal clinical data.

Admin Dashboard – Activity Analytics

image

Real‑time active users, peak day, average/total logins, new user rate. All charts support date filters.

Admin Dashboard – Module Usage

image

Most used modules across interfaces (bills, AI, etc.), filterable by date to track adoption.

Financial Analytics – Timeline & Yearly

Timeline
Yearly Overview

Timeline: Revenue over selected dates with total bills, average bill, and weekly/monthly totals. Full date filtering.

Doctor Revenue Comparison

image

Ranks doctors by revenue (top to bottom) with date filters for fair comparison windows.

Services Usage Analysis

image

Most used backend services; choose how many entries to display to focus on the busiest endpoints.

Bills Management (read/delete + PDF)

Bills Home
Bills Table
Bill View
Bill Details
Delete Confirmation

Bills Home: Entry point to billing for staff.

Security – Login Attempt Throttling

image

Too many login attempts result in a temporary block to mitigate brute‑force attacks.

n8n – Agent System Prompt

image

System prompt configuration that guides the pre‑consultation agent’s behavior.

n8n – Workflow Architecture

image

Chat → preprocessing/settings → agent (Groq LLM, with memory) → Appointment API and doctor‑approved test suggestions before visit.

Auth API – Postman

Login Request
Login Response

Login Request: POST /api/auth/login with email and password.

AI Diagnosis Result

image

Example AI result for a brain tumor scan: negative classification with a concise explanation for the clinician.

Role & Permissions

image

Create or edit a role and assign permissions. Each role should have a single interface permission (e.g., receptionist_interface_permission). Frontend gating is planned to hide disallowed UI actions.

User Management

image

Users table supports CRUD and role changes. Each user holds exactly one role.

Patient Profile (Patient Interface)

image

How a patient sees their profile: personal info, appointments, and billing access.

Challenges

Build strict RBAC beyond simple flags, ensuring the whole interface is permission‑aware. Protect every request with JWT, permission checks, and audit logs. Provide deep analytics without exposing sensitive medical data to non‑clinical roles. Integrate AI (image models + LLM) and n8n workflows while keeping the Angular UX fast and consistent across four experiences.

Solutions

Security chain: Client → JWT middleware → Permission middleware → Activity logger → Controller → Service → Repository → Model → DB → JSON response. Angular guards reinforce interface access on the frontend. Dashboards implement date filters everywhere (activity, modules, revenue timeline/yearly, doctor comparison, services usage). Bills are read/delete only, with PDF export, to preserve auditability. AI: FastAPI endpoints host pre‑trained models (e.g., brain tumor, melanoma, pneumonia); Groq LLM produces readable summaries for doctors. n8n chatbot orchestrates pre‑consultation (triage, availability, tests).

Results

Four clean UIs with enforced access by role. Faster reception flow and clearer revenue tracking. Doctors get decision support from AI results and summaries. Patients can self‑serve (book, view bills) with better pre‑visit guidance.

Technologies Used

AngularLaravelJWTFastAPITensorFlown8nGroqPostgreSQL