Medical AI

The InstantHPI Medical Sequence

A 10-step AI-powered clinical pipeline that takes a patient from first contact to complete documentation — fully automated, no humans required until the doctor reviews.

10
Steps Total
5
Fully Automated
3
Doctor Reviews
$0.003
Per Consultation

The 10-Step Sequence

From SMS invitation to complete clinical documentation. Each step is designed to require minimal human input while maintaining clinical quality.

01
Patient Invitation
Automated

Patient receives an SMS invitation to join the medical platform via Spruce Health. The system extracts patient names and phone numbers from the clinic schedule and sends personalized invitations automatically.

SMS Gateway — Outbound Queue
Bonjour Jean-Paul — your doctor has an invitation for you. Join our secure medical platform to complete your intake before your appointment. [secure link]
Sent automatically · 09:14
QUEUE: 24 patients · SENT: 19 · PENDING: 5 · FAILED: 0
02
Patient Connects
Automated

Patient downloads Spruce Health and connects. A webhook fires automatically, updating the doctor's inbox in real-time. The new conversation appears instantly in the Command Center.

Command Center — Inbox
Jean-Paul M. — Nouveau patient connecté
Webhook reçu · il y a 3 secondes
LIVE
webhook POST /spruce/new-conversation → 200 OK
03
Identity Verification
Automated

Patient sends a photo of their government ID or health card. AI Vision reads the document via OCR and extracts: full name, date of birth, ID number, expiry date. No manual data entry needed. Works with any country's ID format.

Vision OCR — Card Extraction
IMAGE RECEIVED: id-card.jpg · 342KB · Processing...
Full Name
Moreau, Jean-Paul
Date of Birth
1991-08-15
ID Number
MP-2834-7192
Expiry
2028-06
04
Medical Intake Form (OPQRST Method)
Automated

Patient fills out a structured clinical intake form based on the OPQRST method — the same systematic approach used by paramedics and emergency physicians worldwide.

  • 1What is your gender?
  • 2How old are you?
  • 3What brings you to the clinic today?Chief Complaint
  • 4When did this problem start?Onset
  • 5Was there a specific trigger?Provocation
  • 6Where is the symptom located?Location
  • 7How would you describe your symptom?Quality
  • 8What makes the symptom worse?Aggravating
  • 9What relieves the symptom?Relieving
  • 10On a scale of 0 to 10, how severe is your symptom?Severity
  • 11How has the symptom evolved over time?Time/Evolution
  • 12Are you experiencing any associated symptoms?
  • 13Have you tried any treatments or remedies?
  • 14Were the treatments effective?
  • 15Do you have any chronic conditions?
  • 16Do you have any known medication allergies?
  • 17Are you pregnant or breastfeeding?
  • 18Is there anything else we should know?
Generated Patient ID
BLU-4721-KX
Alphanumerical pseudonym — replaces name for privacy
05
AI Matches Patient to Conversation
Automated

Patient sends their pseudonym code via Spruce message. The AI auto-scans incoming messages every 800ms, detects the pseudonym pattern, looks up the intake form submission, and links the clinical data to the conversation. Zero manual matching.

Matching Engine
BLU-4721-KX
[08:47:03.441] Scan cycle #3104 — checking 6 new messages
[08:47:03.442] Pattern match: BLU-4721-KX detected
[08:47:03.443] Lookup: form submission found → 18/18 answered
[08:47:03.444] LINKED: Jean-Paul M. ↔ BLU-4721-KX ✓
06
HPI Confirmation + 10 Follow-Up Questions
AI Generated Automated

AI generates a flowing natural-language HPI (History of Present Illness) confirmation summary and 10 clinically-targeted follow-up questions based on the patient's specific condition and differential diagnoses. Sent automatically to the patient.

Example HPI Confirmation
"Just to confirm before we continue — you are a 34-year-old male presenting with chest pain for 3 days, located in the left substernal area, described as a pressure sensation, aggravated by physical exertion, partially relieved by rest, with a severity of 7/10, accompanied by shortness of breath on exertion. Your medical history includes hypertension. You have no known medication allergies. Is this summary accurate?"
Example Follow-Up Questions Generated
  • Q1"Have you noticed the pain radiating to your left arm, jaw, or back?"
  • Q2"Do you experience the shortness of breath at rest or only during physical activity?"
  • Q3"Have you had any episodes of dizziness, palpitations, or loss of consciousness?"
07
Patient Replies
Automated

Patient answers all 10 follow-up questions directly in the chat. The system tracks completion and automatically advances the pipeline when all questions are answered.

Question Completion Tracker
Q1 ✓ Q2 ✓ Q3 ✓ Q4 ✓ Q5 ✓ Q6 ✓ Q7 ✓ Q8 ✓ Q9 ✓ Q10 ✓
10/10 answered — advancing pipeline automatically
08
Clinical Reasoning + Timeline
AI Generated

The AI runs a full clinical reasoning analysis generating three components: a symptom timeline, a differential diagnosis summary, and a decision tree. This is informational for the doctor — not patient-facing.

Symptom Timeline
Mar 12 ● Onset: substernal pressure after climbing stairs
Mar 13 → Worsening: pain now at rest, severity 5 → 7
Mar 14 ► Associated: dyspnea on exertion begins
Mar 15 ✔ Presentation: seeks medical evaluation
Clinical Summary
34-year-old male, 3-day history of progressive substernal chest pain with exertional dyspnea. Most likely diagnosis: Unstable Angina (72% probability). Urgency: HIGH — requires same-day evaluation.
Decision Tree
Chief Complaint: Chest pain + dyspnea
→ Cardiac risk factors: HTN, male, age 34
→ Progressive pattern: worsening over 3 days
→ Exertional component: suggests cardiac origin
→ Differential: Unstable Angina > GERD > Costochondritis
→ Decision: Urgent cardiac workup required
09
Patient Message — Plain Language Explanation
AI Generated Doctor Reviews

The AI generates a complete patient-facing explanation of their condition — what's likely going on, why it matters, what they should watch for — written in plain language the patient can understand. Doctor approves before sending.

Message #7 — Patient Explanation (Draft)
"Based on what you've described, the chest pain you're experiencing — especially the fact that it's getting worse over three days and is triggered by physical activity — suggests we need to rule out a cardiac cause. The combination of pressure-type pain, shortness of breath, and your history of high blood pressure means we should do some heart tests quickly. I'm going to order blood work and an ECG. If at any point the pain becomes severe, radiates to your arm or jaw, or you feel faint — go to the emergency room immediately."
10
Complete Documentation Package
AI Generated Doctor Reviews

The AI generates every document needed for the patient's care — all in one step, all ready for the doctor to review and approve. Nothing is sent until the physician confirms.

Sample Case: Migraine with Aura
Download the complete case summary a patient receives — with HPI, assessment, and what to bring to their doctor.
↓ Case Summary PDF
SOAP
SOAP Note
Subjective, Objective, Assessment & Plan — ready to sign
● Ready for review
Download Sample PDF
Click to see examples
Example 1: Chest Pain
S: 34-year-old male presenting with progressive substernal chest pain for 3 days. Pressure-type pain, aggravated by physical exertion, partially relieved by rest, severity 7/10, accompanied by exertional dyspnea. History of hypertension. No known medication allergies. A: Chest pain suspicious for cardiac origin in a 34-year-old hypertensive male with exertional dyspnea. Unstable angina to be ruled out. P: Stat ECG and serial troponins. Complete lipid panel. ASA 80 mg PO daily, Nitroglycerin 0.4 mg SL PRN, Atorvastatin 40 mg PO daily at bedtime. Semi-urgent cardiology referral.
Example 2: Cough
S: 24-year-old male presenting with persistent productive cough since July 20, 2025. Clear to white sputum, adherent in the throat, temporarily relieved by water and expectoration. No associated systemic symptoms. No fever, dyspnea, or chest pain. A: Chronic cough likely post-infectious with bronchial hypersecretion. Possible persistent bacterial component. P: Azithromycin (Z-Pak) x 5 days and Ventolin PRN. Follow-up recommended in 7 days. If improvement less than 70%, consider chest X-ray.
Example 3: Back Pain
S: 45-year-old female presenting with acute low back pain for 5 days after lifting a heavy box. Pain localized to the lower back, radiating to the left buttock, severity 8/10, aggravated by bending and prolonged sitting, relieved by ice and lying down. A: Acute mechanical low back pain with possible left radicular component. Disc herniation to be ruled out if persistent. P: Naproxen 500 mg PO BID x 7 days, Cyclobenzaprine 10 mg PO TID PRN spasms. Relative rest 48-72h. If no improvement in 2 weeks, lumbar MRI.
REF
Specialist Referral
Full letter to cardiologist with patient presentation
● Ready for review
Download Sample PDF
Click to see examples
Example 1: Cardiology
Cardiology: Please evaluate this patient for probable unstable angina workup. Initial ECG and troponins requested. 34-year-old hypertensive male presenting with progressive substernal pressure-type chest pain for 3 days, aggravated by physical exertion, severity 7/10, with associated exertional dyspnea. Urgent - consultation within 48-72 hours
Example 2: Gastroenterology
Gastroenterology: Please evaluate for upper GI endoscopy. Suspected refractory GERD vs peptic ulcer. 52-year-old female with post-prandial epigastric burning for 4 months, aggravated by spicy foods, partially relieved by antacids, 3 kg weight loss. Semi-urgent - consultation within 2-4 weeks
Example 3: Orthopedics
Orthopedics: Please evaluate for suspected anterior cruciate ligament tear of the right knee. 28-year-old male, twisting injury during soccer 10 days ago, immediate swelling, instability while walking, clinically positive Lachman test. Semi-urgent - consultation within 2-4 weeks
IMG
Imaging Requisition
ECG, chest X-ray, stress test orders
● Ready for review
Download Sample PDF
Click to see examples
Example 1: ECG
12-lead ECG: Evaluate for ST segment elevation or depression, T-wave inversions, rhythm disturbances, left ventricular hypertrophy. 34-year-old hypertensive male presenting with progressive substernal chest pain for 3 days, aggravated by exertion, severity 7/10, with associated exertional dyspnea. Urgent - within 24 hours
Example 2: Abdominal Ultrasound
Complete abdominal ultrasound: Evaluate for gallstones, gallbladder wall thickness, signs of cholecystitis, liver parenchyma and biliary tree assessment. 38-year-old female presenting with post-prandial abdominal pain triggered by fatty foods for 3 months, associated nausea, severity 6/10. Semi-urgent - within 7 days
Example 3: Lumbar MRI
Lumbar MRI without and with contrast: Evaluate intervertebral discs L4-L5 and L5-S1, evaluate for disc herniation, spinal stenosis, radicular compression. 45-year-old female with acute low back pain radiating to the left buttock for 2 weeks, no improvement with conservative treatment. Semi-urgent - within 2 weeks
RX
Medication Recommendations
With dosage, frequency, and duration
● Ready for review
Download Sample PDF
Click to see examples
Example 1: Chest Pain
1. ASA (Acetylsalicylic acid) 80 mg 1 tablet PO daily Quantity: 30 tablets Refills: 3 2. Nitroglycerin 0.4 mg sublingual tablet 1 tablet SL PRN chest pain, may repeat q5min x 3 doses maximum Quantity: 25 tablets Refills: 1
Example 2: Cough
1. Azithromycin (Z-Pak) 500 mg PO day 1, then 250 mg PO daily days 2-5 Quantity: 6 tablets Refills: 0 2. Ventolin (Salbutamol) 100 mcg metered-dose inhaler 2 puffs PO q4-6h PRN cough or chest tightness Quantity: 1 inhaler (200 doses) Refills: 0
Example 3: Back Pain
1. Naproxen 500 mg 1 tablet PO BID with food x 7 days Quantity: 14 tablets Refills: 0 2. Cyclobenzaprine 10 mg 1 tablet PO TID PRN muscle spasms Quantity: 21 tablets Refills: 0
LAB
Laboratory Tests
Troponin, CBC, lipid panel, BMP ordered
● Ready for review
Download Sample PDF
Click to see examples
Example 1: Chest Pain
Troponine T haute sensibilité FSC CRP Bilan lipidique complet Créatinine Électrolytes BNP
Example 2: Infection
FSC CRP Hémocultures x 2 Procalcitonine Gaz artériel
Example 3: Metabolic
FSC Glycémie à jeun HbA1c Bilan lipidique Créatinine Microalbuminurie TSH
CERT
Work Leave Certificate
With dates and physical restrictions
● Ready for review
Download Sample PDF
Click to see examples
Example 1: Cardiac Investigation
Justified absence from 03/18/2026 to 03/24/2026 inclusive for cardiac investigation requiring rest and avoidance of all physical exertion. Expected return to work on 03/25/2026 pending favorable investigation results.
Example 2: Gastroenteritis
Justified absence from 03/18/2026 to 03/20/2026 inclusive for acute gastroenteritis requiring rest and home hydration. Expected return to work on 03/21/2026 pending clinical improvement.
Example 3: Back Injury
Justified absence from 03/18/2026 to 03/31/2026 inclusive for acute low back pain with radicular component requiring rest, physiotherapy, and avoidance of all heavy lifting. Expected return to work on 04/01/2026 with lifting restrictions of maximum 10 kg for 4 weeks.

What Can Be Fully Automated

A clear look at where humans are needed — and where they aren't.

Step
Description
Status
01–05
Invitation → Connection → ID Verification → Intake Form → Matching Five sequential steps with zero human involvement required
100% Automated
06
HPI Confirmation + Follow-Up Questions AI generates and sends automatically to patient
100% Automated
07
Patient Answers Follow-Up Questions Patient does this themselves — no staff needed
Patient Self-Serves
08
Clinical Reasoning + Timeline + Decision Tree Doctor begins here — reviews AI reasoning before patient message
Doctor Begins Here
09
Plain Language Patient Explanation (Message #7) AI drafts, doctor approves before sending
Doctor Reviews
10
Complete Documentation Package (6 documents) All AI-generated, doctor reviews and signs each document
Doctor Reviews
// The Vision

Free Healthcare Education For Everyone, Everywhere

This entire sequence can run as a Telegram bot using DeepSeek AI. A person in a village with no doctor — no clinic within 200km — can message a bot, go through the full OPQRST intake, receive clinical reasoning, and get the same quality of guidance a physician would provide.

Legally framed as medical education, not diagnosis. Practically, it is life-saving guidance at a cost that rounds down to zero.

One third of a cent per consultation.

Per Consultation
$0.003
One third of a cent per person, using DeepSeek
1,000 People / Day
$3
Per day, serving a small town
10,000 People / Day
$30
Per day, serving a region
Entire Region / Month
<$100
Monthly cost for 1k consultations/day