
The current patient referral validation process is manual, labor-intensive, and relies on hospital staff to cross-check multiple pages of PDF documents against a set of complex admission rules.
Staff must review each referral to ensure all required information is present and compliant. Any missing or inconsistent details are noted manually, which slows down patient admissions and increases administrative workload.

Our solution fully automates the review and validation of multi-page patient referral PDFs against the hospital’s admission rules. Using locally hosted LLMs, the system ingests each PDF and converts its pages into images for precise, page-by-page processing. A targeted extraction approach (scavenger hunt) ensures that all required information is identified while minimizing errors and inefficiencies common in traditional parsing methods.
The extracted data is compiled into a structured JSON object, which is then analyzed by the local llama3 model to generate a clear, actionable Markdown report. The report accurately distinguishes between information that is present and any missing fields, providing administrative staff with concise recommendations for follow-up.
By implementing this system, the hospital gains a fully automated workflow that eliminates manual checks, reduces administrative workload, and ensures all referrals are consistently validated against the hospital’s rules - while keeping patient data secure on local infrastructure.
.jpg)
Key Features
.jpg)
Challenge: Extracting and validating data from multi-page, unstructured patient referral PDFs against complex hospital rules was difficult. Initial attempts to process all data at once led to inaccuracies, and early reports misidentified information as missing.
Solution: Developed a targeted, page-by-page extraction approach using local LLMs, combined with structured rule parsing and refined reporting logic. This ensured accurate identification of present and missing information, producing clear, actionable reports for administrative staff.

Automating the patient's referral validation process has significantly improved hospital operations. Key benefits included:
Reduced Administrative Workload
Staff no longer need to manually review multi-page referral PDFs, allowing them to focus on other critical tasks.
Improved Accuracy and Compliance
Automated comparison against hospital admission rules ensures consistent validation, minimizing errors and overlooked information.
Faster Decision-Making
Actionable reports clearly highlight missing or incomplete data, helping staff quickly address issues and streamline patient admissions.
Enhanced Data Security
All processing is performed locally, keeping sensitive patient information secure and compliant with privacy standards.
Cabot successfully automated the hospital’s manual patient referral validation process using Python and locally hosted LLMs (llava and llama3). The system efficiently processes multi-page PDFs, identifies missing information, and generates clear, actionable reports, reducing administrative workload and improving accuracy.
This project demonstrates Cabot’s ability to deliver practical, scalable AI solutions that streamline complex workflows while keeping sensitive patient data secure. The success of this engagement highlights our commitment to creating intelligent automation that drives operational efficiency and supports client goals.
Want to enhance patient outcomes with a customizedhealthcare solution?
