Inspiration

What it does

Sri Lankan government hospital Outpatient Departments (OPDs) currently suffer from massive overcrowding, long waiting queues, and manual processes. Patients often arrive not knowing which specialist to see, wait in crowded corridors, and frequently miss required test preparations (like fasting), forcing repeat visits. We were inspired to solve this by bringing order and clarity to the OPD experience, ensuring patients get the right care faster while giving doctors better control over their operations.

How we built it by

Our AI Agent acts as a digital front desk at the hospital entrance. Patients scan a QR code using their own mobile phones to access the web app without needing to download anything. The system registers the patient, performs an initial symptom triage using a guided AI chat, and routes them to the correct specialist. It provides explicit test-preparation instructions, issues a digital virtual queue number, and pre-sends prescriptions directly to the pharmacy. For hospital staff, it provides a comprehensive doctor dashboard to manage queues, admit/discharge patients from wards, and oversee hospital operations.

We built a layered, graph-centric architecture with roughly 95% of the codebase written in Jac (Jaseci). The backend utilizes Jac "walkers" as API endpoints and a Jac Object-Spatial Graph to model the domain directly (connecting nodes like Hospitals, Doctors, Patients, and Wards).

For the intelligence layer, we utilized Jac's by llm feature to delegate conversational understanding to a language model. To ensure strict safety, we built a deterministic rules engine that processes red-flag symptoms and test prep guidelines before the AI is even engaged. The frontend is a mobile-first Jac client, supplemented by a public interactive hospital map built with Leaflet and OpenStreetMap.

Challenges we ran into

Accomplishments that we're proud of

What we learned

To make ai agent using JAC

What's next for AI Agent For Hospital Management System

https://github.com/kaveeshainduwara042-cmd/kia1/tree/main Our next steps involve expanding the system to handle multi-hospital real-time updates and introducing advanced features like live operation monitoring, doctor-to-doctor messaging, and deeper multilingual support for Sinhala and Tamil.

Explore our complete codebase here: https://github.com/kaveeshainduwara042-cmd/kia1/tree/main

Built With

  • jac
Share this project:

Updates

Submission history