All work

Clinical AI

Dr. AIgent

Clinical AI that turns a consultation into a SOAP note and writes it into the clinic's EMR, which has no API.

Role
Backend, AI and the Windows EMR agent
Timeline
June 2025 to November 2026

Stack

  • Python
  • FastAPI
  • Firestore
  • Next.js
  • TypeScript
  • Electron
  • C#/.NET
  • Windows UI Automation
  • CLOVA Speech
  • OpenAI, Claude, Gemini
  • AWS ECS
  • AWS Amplify
Dr. AIgent: from the consultation to the EMR
  1. Consultation
  2. Live transcript
  3. AI stepTwo-step SOAP noteprimary + backup model

    the doctor reviews and edits it in the web app

  4. Desktop agentElectron + C#/.NET
  5. EMR note field
  • checks the open patient before writing
  • appends below the chart, never overwrites
  • a detailed version with 28 structured fields

In the product

The Dr. AIgent report workspace: a consultation transcript and the SOAP report, with a sample demo patient
A consultation transcript and its SOAP report
The Dr. AIgent SOAP report with assessment, plan, subjective and objective sections filled in, for a sample demo patient
The SOAP report: assessment, plan, subjective and objective findings

The problem

Doctors document every consultation in their EMR, and most clinic EMRs in Korea are Windows desktop programs with no API. An AI scribe that leaves the note on a separate web page still means copying and pasting into the EMR for every patient.

The goal was a note good enough to trust in a working day, and a way to get it into the EMR without the doctor retyping anything.

What I built

Dr. AIgent has three parts in one codebase: a Python and FastAPI backend on Firestore, running on AWS ECS in Seoul; a doctor web app and an admin portal in Next.js and TypeScript on AWS Amplify; and a Windows desktop app that does the EMR work.

The consultation is transcribed in real time. The backend builds the SOAP note in two steps, the doctor reviews and edits it in the web app, and one button sends it to the EMR. Around that sit patient records, practitioner verification, role-based access, scheduling and follow-on documents such as referral letters and certificates.

The hard parts

Getting the note into the EMR

Writing into an EMR with no API

The desktop app is an Electron shell that loads the web app, with a small C#/.NET agent beside it that does the EMR work. It uses no EMR API and no database access. It works on the EMR window itself, mainly through Windows UI Automation.

The right patient, every time

The agent reads which patient is open in the EMR, so the doctor never types a name or a chart number. Before it writes, it checks that the same patient is still open.

Adding, never overwriting

The note goes into the EMR note field below whatever is already there, instead of replacing it. Nothing a doctor wrote earlier is ever lost.

One integration per EMR

Every EMR is built differently, so each one needs its own integration work. I did that work on real doctors' PCs over remote sessions. Dr. AIgent runs with 의사랑, and the same agent runs in Jema AIgent with four Korean medicine EMRs.

The note itself

A two-step SOAP note

The consultation is transcribed in real time (CLOVA Speech by default). The backend first pulls the clinical facts out of the transcript, then writes S, O, A and P from those facts. A detailed version fills 28 structured fields.

A backup model when one fails

Each task has a model chosen in configuration, across OpenAI, Claude and Gemini, and a configured backup. If the primary is unavailable or failing, the backup picks it up, so notes keep generating when a single provider has a bad day.

Where it is now

I built Dr. AIgent for Medisoom between June 2025 and November 2026. It is in production, with the desktop agent installed on clinic PCs, and it is one of three connected platforms I built for them.

Zeeshan did an excellent job leading development on our healthcare software. He helped turn complex product requirements into working features and worked closely with me to find practical solutions, especially on our Windows app and its EMR integrations. I’d be happy to work with him again.

Danny L · Medisoom

Building something with AI, or stuck on one that keeps breaking?

I work from Pakistan.