Case study
On-Premises Clinical Decision Support APIs for Insurance and Drug Checks
- Client: A health-technology company in Saudi Arabia
- Industry: Health & Fitness
- AI capability: Generative AI & Intelligent Document Processing

- AI modules built: insurance alignment and pharmacy benefit APIs
- 2
- Endpoints in the pharmacy benefit API
- 4
- Closest matches returned for a misspelled drug name
- Top 5
The challenge
Insurance rules and drug naming checks, at the point of care
Doctors must write treatment plans that comply with each insurer's rules, which are mostly long if-then guidelines, and by law they must prescribe drugs by scientific name rather than brand. With thousands of drugs and many insurance plans, both checks are slow and error-prone at the point of care. The language models had to be hosted on-premises so patient data stays inside the client's environment, and the drug data had to stay in step with official Saudi sources: the CHI drug formulary, SFDA GTIN lists and Nphies code sets.
What we built
Two clinical APIs, with the models on the client's own servers
Patient data stays inside the client's environment.
- Stage 1
Data assembly
We compiled the CHI drug formulary, SFDA GTIN registry and Nphies codeable concepts, and profiled about 5,000 rows of the client's historical claims data. - Stage 2
Insurance alignment
Treatment plans and policy documents are read with EasyOCR, and an on-premises LLM checks whether the plan complies with the selected insurance policy. - Stage 3
Drug lookup
A drug index maps brand names, scientific names, GTINs and registration numbers to the full drug record, with fuzzy matching that returns the top five suggestions for misspelled names. - Stage 4
Drug Q&A agent
A follow-on module lets staff ask questions about the formulary in plain English, using a local Llama 3 model with a SQL agent over the drug database. - Stage 5
API delivery
Everything is exposed through authenticated FastAPI endpoints, including one that replaces the drug database from a new Excel upload.
The pharmacy benefit API's four endpoints, from authentication to drug lookup.
The impact
Compliance and drug checks behind a REST call
- Insurance alignment API
- Pharmacy benefit API with four endpoints
- Five closest matches for a misspelled drug name
The insurance policy alignment API takes a treatment plan and an insurance policy and returns whether the plan is compliant. The pharmacy benefit API has four endpoints: authentication, database update from Excel, database export, and drug lookup and validation by brand name, scientific name, GTIN or registration number. Invalid or misspelled drug names return the five closest matches with a validation status, and a formulary Q&A module answers questions such as a drug's registration year from the CHI formulary.
Project showcase
More from the project
Test interface for the drug index: a scientific-name search returns the matching formulary records.
Keep exploring
Related case studies
Real Estate & PropTechIntelligent Document ProcessingAI Offer Memorandum Parsing & Investment Intelligence
For commercial real estate brokers, lenders, and investors, evaluating an Offering Memorandum (OM) is a massive bottleneck. These 40-150 page documents are packed with crucial investment data hidden in complex tables, paragraphs, and financial projections that take hours to manually process.
- OM analysis time, down from several hours
- <3 min
- Extraction accuracy on critical financial fields
- 95%+
Real Estate & PropTechGenerative AIAI-Powered Virtual Staging and Renovation
Buyers respond better to furnished rooms, but physical staging is expensive and slow. PropTech founders and real estate agency owners need a highly scalable, photorealistic virtual staging automation tool that works instantly.
- Lower staging cost than physical staging
- 90%+
- Increase in inbound leads on staged listings
- 40%
Health & FitnessGenerative AIPharmaBrain: Private, Air-Gapped LLM for Medical Research
Atacana needed a private, air-gapped LLM deployment: a medical research assistant that answers complex questions over thousands of proprietary news reports and drug discovery updates each day, without any data leaving its own servers.
- Offline, on local servers
- 100%
- Parameter Mixtral MoE, 8-bit quantized
- 46.7B
Book a strategy session
Talk to an AI engineer about your project
Tell us what you want to automate. The first call is a 30-minute working session with an engineer, not a sales pitch.
- Send the form, it takes 2 minutes
- We reply within 1 business day, under NDA if you need it
- A 30-minute call to scope feasibility and next steps