Inspiration

We were inspired by the real-world challenge of messy handwritten and faxed prescriptions that still move through healthcare workflows. In many pharmacies and clinics, prescription intake is still manual, slow, and error-prone, which creates risk for patients and inefficiency for providers. We wanted to build a smarter, safer way to extract and verify medication orders before they are filled.

What it does

ClearScript is an AI-powered prescription intake and safety review system that turns faxed and handwritten prescription images into structured, reviewable medical data. It extracts key fields like patient information, drug details, dosage instructions, and prescriber metadata, then validates those fields against safety rules and assigns a triage status such as green, yellow, or red. This helps identify ambiguous, incomplete, or risky prescriptions before they reach the pharmacy.

How we built it:

We built ClearScript in Python using a modular workflow:

  • image ingestion and prescription extraction
  • structured schema models for patient, medication, and prescriber data
  • verification rules for NPI, DEA, date, and medication checks
  • triage logic to classify orders as ready, needs review, or blocked
  • JSON output generation to record structured results from sample prescriptions
  • We also integrated external validation services and prepared the project for future API-based deployment, with a FastAPI layer to expose endpoints and support scalable integration.

Challenges we ran into

The biggest challenge was handling real-world prescription noise: handwriting ambiguity, missing fields, placeholder identifiers, and inconsistent dosing instructions. Many prescription forms are not cleanly structured, so we had to design logic that could both detect errors and avoid overblocking valid orders. We also needed to ensure our system explained why a prescription was flagged, instead of just marking it as risky.

Accomplishments that we're proud of

We’re proud that the project successfully processes sample prescription images, converts them into structured data, and produces a clear risk assessment with reasoning. The system demonstrates an end-to-end pipeline from image input to validated output, which is a strong foundation for a real healthcare safety tool.

What we learned

We learned that healthcare data is messy and variable, and that extraction is only half the problem. The bigger challenge is verifying the extracted values and building trust through safety checks, explainability, and human review when needed. We also learned how important it is to surface exact reasons for a yellow or red triage decision.

What's next for ClearScript

Use the ElevenLabs API to call doctors when a prescription is unclear, incomplete, or ambiguous Confirm medication details directly with prescribers before filling Expand validation rules for broader clinical safety checks Add real-time pharmacy workflow integration Improve OCR and handwriting recognition for more complex prescription formats

Built With

  • blockconvey
  • nicrron
  • openai
  • python
  • tavily
Share this project:

Updates

Submission history