Real Case
Examya: AI for Medical Orders
The real case behind Shuri: medical OCR through WhatsApp, FONASA pricing, embeddings, MINSAL compliance and clinical architecture.
Why sub-agents work better as reviewers than concurrent writers
Throwing 5 agents to write code in parallel is a disaster. Why we inverted the pattern: 1 writer and 5 blind adversarial reviewers.
The hidden cost of ignoring healthcare interoperability before 2027
Chile's Law 21.668 isn't just an IT mandate; it's a commercial barrier. If your clinic doesn't interoperate with FHIR by 2027, you'll lose money and contracts.
My B2B tech stack: How I use NotebookLM and Obsidian to close healthcare deals
Selling clinical software requires processing hours of meetings and dense PDFs. Here is the AI workflow I use to turn raw documents into lethal proposals.
Why legacy lab result portals are killing the patient experience
Labs still hand out printed passwords to download incomprehensible PDFs. How Examya uses FHIR and WhatsApp to fix this broken flow.
Clinical AI Fails Because of Data, Not the Model
A clinical model can sound correct and still fail if it receives PDFs, free text and lab results without traceability. The problem starts before the prompt.
Interoperability does not start by connecting everything
Why FHIR/Core-CL pilots should start with one bounded flow, synthetic data and evidence before touching production.
Law 21.719 in clinical software: consent and real ARCO-P
How I turned privacy into architecture for Examya: consent ledger, ARCO-P, reporting and self-service before December 2026.
Human-in-the-loop is not enough: designing real oversight for medical AI
Medical AI oversight is not a doctor watching a screen. It requires authority, traceability, escalation, drift monitoring, and auditable evidence.
AI does not fix broken processes: it accelerates them
Before automating with AI, teams need to map decisions, data, traceability and rules. If we automate chaos, we only get faster chaos.
NEW, REVIEW, DUPLICATE: the guard that stops a content agent from writing the same post ten times
How I designed a deterministic three-state guard to prevent my content agent from repeating topics on the blog
Fhirex by Examya: FHIR pilots without touching production
Why we launched fhirex.examya.cl: FHIR/Core-CL pilots with synthetic data, technical evidence, and IT review before production.
Forensic Code Cleanup: deleting code with discipline
How I deleted 12 zombie files in Shuri with forensic cleanup, ripgrep, tests, and adversarial review as the final guardrail.
The clinical lab as a digital health API
A clinical lab already receives orders, processes samples, and returns results. The missing layer is treating it as a clinical API.
From clinical lab to interoperable data
Digital health starts when a lab result stops being a PDF and becomes a traceable FHIR DiagnosticReport.
Compliance is not a feature: it's evidence
In digital health, a working feature is not enough. Without auditable traceability, it does not exist for the regulator.
100% Compliant: How we closed all 36 MINSAL verifiers in record time
Closing MINSAL accreditation (Law 21.541) isn't just about coding. Here's how we jumped from 33% to 100% compliance in a single weekend.
Democratizing FONASA MLE Access: Open Data and an MCP Server
How we transformed the FONASA medical exam catalog into an AI-ready tool with an MCP server and 7-digit normalized data.
Prisma Schema Migration: How to Survive Local Hell in a Health Monorepo
Field lessons on the pitfalls of schema migrations in a medical monorepo with multiple databases and development environments.
Unit Testing and TDD in AI Agents: Lessons from the Examya Battlefield
How I implemented unit testing and TDD in my medical AI agent, the challenges encountered, and the solutions that actually work in production.
Field Engineering: How We Built a Portable Molecular Lab in Patagonia
The technical details behind BioHealth: How we packed RNA extraction, microfluidics, and 4G connectivity into a toolbox to operate in Torres del Paine.
The mistaken OpenAI email that forced us to migrate 45,000 embeddings
We migrated 45,678 medical vectors due to a false deprecation notice. How an OpenAI mistake improved our clinical precision by 37%.
OCR Routing Architecture in Examya: How a Photo Decides the Entire Flow
Deep dive into Examya's OCR routing architecture: how a medical photo decides between quotation and lab result interpretation.
Hallucinating Sub-Agents: Detection and Mitigation Protocol in Production
How to detect and mitigate when AI sub-agents report incorrect information: a real case with gemini-flash and the 4-command protocol.
FHIR DiagnosticReport: how a lab result travels back to the ordering physician
The result is ready. Now it needs to reach the physician who ordered it — no PDF, no WhatsApp, no human middleman. Here's how FHIR DiagnosticReport works and how Examya implements it.
How I Built Patagonia's First Private COVID PCR Lab (And Why I Ended Up Building AI)
In March 2021, I hoisted 300 kg of biosafety cabinet by crane to a second floor during lockdown. By May we were running the first private COVID PCR tests in Chilean Patagonia. The nights that followed became the real origin of Examya.
Multi-Agent Orchestration vs Single Agent: Lessons from the Trenches
My journey building Cotocha: why multi-agent orchestration beats single agents in real-world projects.
When your sub-agent lies: 3 failing tests that gemini-flash swore were passing
gemini-flash reported 'all tests passing': 3 tests were failing, 353 lines of stray package-lock.json included. The 4-command protocol I built to audit sub-agents in Examya.
From 0 to WhatsApp Payments: Mercado Pago + Stripe from a Single Conversation
How I built a payment system embedded in WhatsApp that processes medical orders and charges automatically with Mercado Pago and Stripe.
FHIR + Law 21.668: How Examya Is Preparing for Chile's Mandatory Interoperability
How we're adding a FHIR layer on top of Examya's current stack (NestJS + Prisma + pgvector) to comply with Law 21.668 without rewriting anything.
Clinical labs: the missing piece for healthcare interoperability in Chile
We mapped 245 clinical labs from Arica to Punta Arenas. Four out of ten lack a functional digital presence. Law 21.668 will force them to interoperate in 2026. Here are the ground-level data.
Chile now requires clinical record interoperability: why this changes everything for digital health
Law 21.668 mandates all healthcare providers in Chile to make clinical records interoperable. I analyze what this means technically, which standards are coming (FHIR, SNOMED CT, AIToF), and how Examya is preparing for this newly mandatory market.
Crowdsourcing medical prices: how Examya builds cost transparency layer by layer
The real architecture behind Examya's 3-layer pricing intelligence: FONASA data, user crowdsourcing, and order generation from WhatsApp. With code, design decisions, and real bugs.
Medical OCR on WhatsApp: how my agent reads exam orders and lab results
The real architecture behind Examya's OCR pipeline: how an AI agent classifies WhatsApp photos, decides if they're medical orders or lab results, and automatically generates FONASA quotes. With real bugs and design decisions explained.
DeepEval: how I measure the quality of my medical agent with objective metrics
How I built an evaluation layer with DeepEval to measure the quality of Shuri, Examya's medical agent. With real data: from 20% to 70% on E2E, custom metrics for Chile's FONASA system, and why gpt-5-nano doesn't work for structured output.
pgvector + Embeddings in Production: The Foundation of Medical Reasoning in Examya
Architecture for semantic search and text similarity in production with pgvector, pg_trgm, and real MINSAL data.
One Week of Building: 82 Decisions That Shaped an AI Product
What Engram's memories reveal about a real week of development: bugs caught, architecture hardened, and the invisible decisions that make a medical agent work.
Examya: how I built a medical WhatsApp agent that processes exam orders
Technical details of implementing the Shuri agent in Examya, a system for processing medical orders via WhatsApp with FONASA integration.