0. EXECUTIVE OVERVIEW
0.1 What is Softcode USG AI Assist
Softcode USG AI Assist is a cloud-based ultrasonography (USG) reporting platform built specifically for Indian sonography practices. It combines AI-powered clinical drafting (GPT-4o), DICOM machine integration, PNDT-compliant printing, and a complete multi-role clinic management system — all delivered through a modern dark-themed browser interface that runs on any laptop, tablet or smartphone.
0.2 The Problem We Solve
| Problem in Indian USG Practice | How Softcode Solves It |
| Doctors waste 3–5 minutes typing each report from scratch — 30+ reports a day means 2+ hours of typing | GPT-4o auto-drafts a complete professional report in 8–10 seconds from measurements |
| Reports inconsistent in style across staff and across days | The AI learns each doctor's personal phrasing and corrections — every report sounds like the doctor wrote it |
| Patient name has to be typed again into the USG machine — typos cause mismatch | Reception Worklist Bridge pushes the patient list to the machine — doctor just selects, never types |
| USG machine images are saved on the machine and lost — never end up in the report | Doctor DICOM Bridge pulls images and SR measurements directly into the report editor |
| PNDT compliance is tedious — Form F, signatures, registration numbers, sex determination wording | Built-in PNDT Form F auto-fill, automatic compliance footer, and AI is hard-coded to never mention sex determination |
| Reception, billing, receipts and reports live in different software | Single platform — patient registration, billing, receipts, reports, dashboards all in one place |
| No way for sales dealers to track or earn from their installed base | Built-in Dealer role with commission tracking, doctor linkage and payout requests |
0.3 Who Uses It
👨⚕️ Doctor / Sonologist
Owner of the practice. Creates reports, uses AI, prints, finalises. Manages their reception staff and DICOM machine.
👩💼 Reception Staff
Front desk. Registers patients, takes payment, prints receipts, runs the daily worklist. Cannot edit reports.
🛡️ Admin (Softcode HQ)
Internal Softcode team. Approves doctor signups, sets credit pricing, generates monthly bills, manages dealers.
🤝 Dealer / Distributor
Field sales partner who sold the software. Tracks linked doctors, sees commission earned, requests payouts.
0.4 Key Differentiators (Sales Talking Points)
- True AI learning per doctor — not a generic template engine. The AI literally remembers each doctor's edits and applies them next time.
- End-to-end DICOM integration — works with Samsung, GE, Philips, Mindray, Voluson, SonoScape, Chison and Toshiba/Canon out of the box.
- 10 colour fetal growth charts with INTERGROWTH-21st / Hadlock / Arduini-Rizzo references — premium feature usually only in ₹3 lakh+ international software.
- PNDT compliance built-in — not bolted on. Form F auto-fills from the report, sex determination is hard-blocked in AI prompts.
- Per-doctor add-on monetization — Voice, Diagram, Compare can be sold individually as Softcode upsells (separate from dealer commission).
- Cloud AI sync — collective learning from all doctors improves the base model every month.
- Browser-based — no installation pain on each new computer; works on laptops, tablets and even mobile phones.
- Indian-built, Indian-priced — credit-based billing fits Indian clinic budgets, GST invoicing built in.
0.5 Technology Stack (For Engineers)
| Layer | Technology | Why |
| Frontend | React + TypeScript + Vite + TailwindCSS | Fast SPA, type safety, modern dark UI, responsive across desktop/tablet/mobile |
| Backend API | Node.js + Express + TypeScript | Lightweight, fast iteration, single-language stack |
| Database | PostgreSQL with Drizzle ORM | Reliable, ACID, JSONB for flexible report fields, type-safe schema |
| AI Engine | OpenAI GPT-4o | Best clinical reasoning, natural language quality, multilingual support |
| Local Bridge | Node.js DIMSE library | Implements DICOM C-STORE SCP and C-FIND SCP (MWL) on the doctor's PC |
| Auth | Role-based with stored credentials | Username/password login routed by role (Doctor / Reception / Admin / Dealer). Note for engineering team: the current production build uses simplified credential checks — hardening to bcrypt + signed sessions is on the roadmap. |
| Hosting | Replit Cloud (production) | Auto-scaling, integrated TLS, zero-ops deployment |
1. AUTHENTICATION & ROLES
1.1 The Four Roles — Why Four?
Most clinic software gives every staff member full access. That creates two problems: junior staff can accidentally delete patient data, and there is no clean way for sales partners (dealers) to participate in the business. Softcode separates duties into four roles, each with the minimum permissions needed for the job.
1.1.1 Doctor Role
WHY The doctor is the medical authority and the customer of record. Only the doctor can produce, sign, and finalise a report.
HOW A doctor signs up via the public Doctor Registration tab. Their account is held in
pending status until the Softcode Admin approves it (24–48 hours). After approval, they receive full access to their own clinic data.
USE Login → see their dashboard → register or scan patients → write reports with AI assistance → print and sign.
VALUE Single source of truth — every report carries the doctor's degree, registration number, signature and PNDT compliance footer automatically.
1.1.2 Reception Role
WHY Reception staff handle high-volume, low-risk tasks (registering walk-ins, taking payment, printing receipts). They must
not be able to alter clinical reports — that would invalidate medical-legal protection.
HOW The doctor generates a unique Reception Code from their Settings → Profile tab. Reception staff sign up and enter that code — they are then automatically linked to that doctor and only see that doctor's data.
USE Login → directly into the Patients page → register patients, mark scans done, print receipts, run worklist.
VALUE Doctor offloads non-clinical work without losing clinical control. Multiple reception staff per doctor supported.
1.1.3 Admin Role (Softcode HQ Only)
WHY Softcode needs central control to approve new doctors (verify ID proofs to prevent abuse), set per-doctor credit prices, generate monthly bills, manage dealers, and run the cloud AI sync.
HOW Admin accounts are created internally. Admin sees a Doctor List with detail panels for every registered doctor — toggle add-ons, set price, generate bill, deactivate.
USE Login → Admin page → Doctor List → click any doctor → manage their account end-to-end.
VALUE Centralised billing and pricing means Softcode controls revenue. Per-doctor add-on toggles enable upsell tiers.
1.1.4 Dealer Role
WHY India's USG market is sold heavily through field dealers. Without a dealer role, Softcode would have to acquire every customer directly. With it, dealers become an extended sales force earning commission on every report their linked doctors generate.
HOW Each dealer gets a unique code (e.g.
DLR-A3X9). They share it with doctors at the time of sale. Doctors enter that code at signup. From then on, every credit that doctor consumes earns the dealer a configurable commission.
USE Login → Dealer Dashboard → see linked doctors, credits used, profit accumulated → request payout when desired.
VALUE Recurring revenue for dealers turns one-time selling into a long-term partnership. Dealers actively support their doctors to keep usage high.
1.2 Login Flow & Security
User opens softcode app → Login screen
↓
Enters Username + Password
↓
Backend verifies credentials against the user record
↓
Match? → User identity established and stored on the client
↓
Role read from DB → Frontend routes user to role-specific dashboard
↓
"Remember Me" tick → persistent across browser restarts. Untick → ends when tab is closed.
🔒 Engineer note: Auth hardening on the roadmap
The current production build uses a simplified credential check suitable for the present customer base. Planned hardening (in progress): bcrypt password hashing, signed server-side sessions, brute-force rate limiting, and instant session revocation when Admin deactivates an account. Engineering should treat this as the next priority before scaling to enterprise hospital chains.
1.3 Demo Mode
WHY Sales demos and exhibitions need a way to show the full software without creating real accounts or polluting the database with fake data.
HOW A built-in demo doctor account exists. When logged in as demo, the system flags
user.isDemo = true. Print, delete and AI Train operations are all gated behind this flag and silently disabled.
USE Click "Demo" button on login → instantly explore everything.
VALUE Dealers can run a complete sales demo in 5 minutes without any setup. New doctors can self-evaluate before committing.
2. PATIENT MANAGEMENT
2.1 Why Patient Management Comes Before Reports
In every USG clinic, the workflow always starts at the front desk: a patient walks in, gives a referral slip, pays, gets sent to the scan room. By the time the doctor sees them, name, age, study type and payment must already be in the system. So Patients is the entry point of the software for both Reception and Doctor.
2.2 The New Patient Form — Field by Field, with Purpose
| Field | Why It Exists |
| Full Name | Mandatory — printed on the report. Forms primary identification on every screen. |
| Age, Gender, Phone | Age affects medical interpretation (e.g. paediatric vs adult ranges). Phone enables future SMS reminders and report sharing. |
| Study Type + Sub-type | Determines which template loads in the editor, which measurement fields appear, and which AI prompt is used. Critical routing field. |
| Referred By | Printed on the report. Referring doctor often calls back asking for the report — having the name on file makes the conversation easy. |
| Chief Complaint | Sent to the AI as clinical context — the AI weighs findings differently when the patient came in with "right upper quadrant pain" vs "routine antenatal". |
| Billing Amount, Discount, Payment Mode, Payment Status | Powers the receipt printer, the dashboard revenue stats, and the daily collection report. Payment Mode (Cash/UPI/Card/Cheque/Online) lets receptionists track collections by mode. |
| Priority (Routine / Urgent / 🚨 Emergency) | Visual triage. Emergency patients get a red badge in the list so the doctor knows to scan them next. Built for trauma centres and obstetric emergencies. |
| ID Proof Type + Number (Aadhaar/PAN/Passport/Voter ID) | Required for PNDT obstetric records. Also helpful when government audits the clinic. |
| Patient Photo | Uploaded or captured from webcam. Useful for identification at follow-up visits, especially in busy obstetric clinics. |
| Companion Name, Relation, Phone | PNDT requires a companion entry for obstetric patients. Also useful for follow-up if the patient is reachable only through family. |
2.3 Patient List — The Visual Status System
Each patient card shows colour-coded badges so doctors and receptionists understand the status at a glance — without opening the patient detail.
| Badge | Meaning | Why It Matters |
| 🚨 Emergency (red) | Priority = Emergency | Doctor scans these first — visual triage |
| ⚡ Urgent (amber) | Priority = Urgent | Second priority after emergencies |
| Returning Patient (purple) | This patient has visited before | Doctor knows to check Compare Reports — IUGR or follicular tracking depends on it |
| 3 img (blue) | DICOM images linked from the machine | Print job will include images — tells reception to use higher-quality paper |
| Payment: Paid / Partial / Pending / Complimentary | Color coded green/amber/red/purple | Reception can chase pending payments at the end of the day |
| Study Type Badge | Abdomen / Obstetric / KUB etc. | Doctor can mentally batch similar studies |
2.4 Patient Status Badges (Newly Added — Mini Circles)
WHY The doctor often opens the patient list and asks: "Which patients still need attention? Which are fully done?" Without visual status indicators, this required clicking into each patient.
HOW Three small circles appear on each patient card representing three completion stages:
- Eye circle (Viewed) — fills in once the doctor has opened that patient detail at least once
- Document circle (Reported) — fills in once a report exists for that patient
- Printer circle (Printed) — fills in once DICOM images have been printed for that patient
When all three are complete, the circles are replaced by a single
green "All Done" badge — the patient is fully processed.
Patient created → All 3 circles empty (gray)
↓
Doctor opens PatientDetail → POST /patients/:id/mark-viewed → Eye circle fills
↓
Doctor saves a report → hasReport = true (computed server-side) → Document circle fills
↓
Doctor prints images → hasPrintedImages = true → Printer circle fills
↓
All 3 = true → Replaced by green "All Done" badge
TECH Backend:
GET /patients returns
hasReport and
hasPrintedImages per patient (server-computed JOINs).
lastViewedAt column tracks viewing.
POST /patients/:id/mark-viewed is auth-gated. Sort order is
desc(createdAt) so newest patients appear at the top.
VALUE Doctor sees their workload at a glance. End-of-day, "All Done" badges across the board mean the day is closed. Massive workflow clarity for busy clinics doing 40+ scans/day.
2.5 PDF Export of Patient List
WHY Doctors and reception need a daily/monthly summary for tax filing, partner-doctor sharing, and clinic audits.
HOW The Export PDF button takes the currently filtered list (today / this month / specific date / search results) and generates a print-ready PDF with all relevant columns: patient name, age/sex, study type, payment status, priority, billing amount, date.
VALUE Tax-time friendly. Compliance friendly. Sharing friendly.
3. THE REPORT EDITOR & AI ENGINE
👨⚕️ Doctor only — the heart of the product
3.1 Why the Report Editor is the Hero Feature
Every other feature exists to feed or support the report editor. This is where the doctor's time is spent and where Softcode's value is most visible. A traditional report takes 3–5 minutes of typing and dictation. With Softcode, it takes 30 seconds: enter measurements → click Generate AI Draft → review → finalise → print.
3.2 The 30+ Study Templates
Every USG study has different measurement fields, different normal ranges, different reporting conventions. A one-size-fits-all editor would be useless. So we built dedicated templates for every common study type.
| # | Template | Specialty Focus |
| 1 | Obstetric — 1st / 2nd / 3rd Trimester + Twin | Antenatal monitoring, growth tracking |
| 2 | Abdomen USG | Liver, GB, kidneys, spleen, pancreas |
| 3 | Whole Abdomen / KUB USG | Comprehensive abdominal survey / kidney-ureter-bladder |
| 4 | Pelvis / Gynecology — Routine + Follicular Study | Uterus, ovaries, follicle tracking for IVF |
| 5 | Thyroid (with TIRADS) | Nodule risk classification |
| 6 | Breast (with BI-RADS) | Lesion characterisation, screening |
| 7 | Vascular Doppler — Carotid, DVT, Peripheral | Stenosis, thrombosis, peripheral disease |
| 8 | Renal Doppler / Transplant | Renal artery stenosis, transplant assessment |
| 9 | Fetal Echo | Cardiac evaluation in utero |
| 10 | Neonatal Cranial | Through-fontanelle infant brain scan |
| 11 | Musculoskeletal — Shoulder/Knee/etc. | Tendon tears, bursitis, joint effusion |
| 12 | Small Parts / Neck / Parotid / Salivary | Lymph nodes, glands |
| 13 | Scrotal / Testicular | Torsion, varicocele, orchitis |
| 14 | Prostate / TRUS | Prostate volume, BPH, cancer screening |
| 15 | Endovaginal / Endometrial | TVS findings, endometrial assessment |
| 16 | Chest / Pleural USG | Effusion, pneumothorax, lung points |
| 17 | FAST / Trauma Scan | Emergency intra-abdominal bleeding detection |
| 18 | Pediatric | Child-specific abdominal protocols (intussusception, appendicitis) |
| 19 | Interventional USG | USG-guided biopsies, aspirations |
| 20 | CEUS (Contrast-Enhanced) | Contrast agent enhancement patterns |
| 21 | Elastography | Liver stiffness, lesion stiffness |
| 22 | 3D / 4D Obstetric | Volumetric fetal imaging |
Each template loads its own measurement panel with the right fields, the right units, and the right AI prompt — the doctor never has to remember "what should I measure for thyroid".
3.3 AI Draft — How GPT-4o Writes Your Report
WHY Manual report typing is the single biggest time-sink in a sonography practice. AI eliminates 90% of that typing.
HOW When the doctor clicks
Generate AI Draft:
Frontend collects: patient (name, age, sex), study (type, sub-type),
measurements, chief complaint, doctor profile, AI training notes
↓
POST /api/ai/draft with the structured payload
↓
Server builds GPT-4o prompt: system role = "experienced sonologist",
user prompt = structured measurements + context, plus
doctor's previous corrections injected as style notes
↓
GPT-4o returns: { findings: "...", impression: "..." }
↓
Server: deduct 1 credit, log usage (tokens, cost), audit trail
↓
Frontend: populate Findings + Impression text areas (still editable)
USE Doctor enters measurements → click Generate AI Draft → in 8–10 seconds the report appears. Doctor reviews, edits if needed, finalises.
VALUE 3-minute report becomes 30-second report. Cost: roughly ₹0.20–0.40 per draft. Doctors easily save 2 hours per day.
⚠️ Sales talking point — AI is a draft, not a diagnosis
Always frame the AI as a "professional first draft writer that the doctor reviews and signs". This is medico-legally important — the doctor is fully responsible for what they print. Softcode never replaces clinical judgement; it removes typing.
3.4 Train AI — How Personalisation Works
WHY Every doctor has personal phrasing preferences ("I always write 'gross-pathology not seen' instead of 'no abnormality detected'"). A generic AI sounds robotic and unlike the doctor. Train AI fixes that.
HOW When the doctor edits AI-generated text and clicks
Train AI, the system stores the edit as a "correction note" attached to that doctor and that study type. On the next AI Draft, those correction notes are injected into the GPT-4o system prompt:
"This doctor prefers: write AFI in cm not mm. Always state 'EDD by LMP' explicitly."
Doctor edits AI text → Train AI button glows amber
↓
Click Train AI → POST /api/corrections
↓
Backend extracts the diff (original AI text vs doctor's version)
↓
Stores as a structured correction: { doctorId, studyType, hint: "...", patternBefore, patternAfter }
↓
On next AI Draft for same studyType → all stored hints are
prepended to the system prompt as "Doctor preferences"
↓
GPT-4o follows them automatically
VALUE Within 2–3 weeks of use, the AI sounds exactly like the doctor — patients and referring doctors cannot tell the difference. This is the killer "stickiness" feature: switching to a competitor means losing all that learning.
3.5 Quick Templates (Pre-filled Reports)
WHY Many findings are standard and repeated daily — "Normal Abdomen", "1st Trimester Normal", "BPH Grade I". Why use AI credit for these?
HOW The Templates page contains 25 pre-built clinical templates plus a personal library where the doctor can save their own. One-click insert into the report editor — no AI credit consumed.
VALUE Doctors save AI credits for complex cases. Standard reports take 5 seconds.
3.6 QA Check — Quality Assurance Before Print
WHY Doctors sometimes miss measurements (e.g. forgot to enter EDD on an obstetric scan). Printing an incomplete report is embarrassing and medico-legally risky.
HOW Click
QA Check → AI reviews the report and flags:
- Errors (red): critical missing fields per study type (EDD missing on OB, TIRADS missing on Thyroid, BI-RADS missing on Breast)
- Warnings (amber): recommended but non-critical fields
- PNDT compliance check: blocks any text mentioning sex/gender determination — illegal in India
- Quality Score: 0–100 score for completeness
VALUE Reduces medical-legal risk. Builds doctor confidence. PNDT compliance auto-enforced — no human can accidentally include sex determination.
3.7 Voice Input (Add-on)
WHY Some doctors prefer dictation, especially senior doctors who type slowly. They can also dictate while still scanning.
HOW Microphone button in the Findings field → real-time transcription via browser speech recognition → AI cleans the dictation into clinical English.
VALUE Faster reports for doctors who prefer voice. Optional add-on with separate billing.
3.8 Anatomy Diagrams (Add-on)
WHY Patients understand pictures better than text. Adding an anatomy diagram to the report makes it look more professional and helps the patient understand the findings.
HOW Built-in SVG organ diagrams render based on study type (liver, gallbladder, kidneys for abdomen; uterus, ovaries for pelvis; thyroid lobes for thyroid). Measurements are auto-annotated on the diagram. Tick "+ Diagram" in print toolbar to include.
VALUE Premium-looking reports. Add-on revenue. Patient satisfaction.
3.9 Compare Reports (Add-on)
WHY For follicular studies, IUGR follow-ups, fibroid monitoring, the previous scan is critical. Without compare, doctors flip through paper records.
HOW Compare button shows all of this patient's previous reports. Pick one → side-by-side view with key changes highlighted (e.g. fibroid grew from 2.1cm to 2.6cm).
VALUE Premium feature for chronic-follow-up clinics. Add-on revenue.
3.10 DICOM SR Auto-fill
WHY The USG machine already measured everything (BPD, HC, AC, FL etc.). Re-typing all of it into the report is error-prone wasted work.
HOW The USG machine sends a DICOM Structured Report (SR) to the local bridge → bridge forwards it to Softcode cloud → it appears in the DICOM Inbox on the Patients page. Click
Use DICOM Data → all measurements auto-fill into the report editor with no typing.
VALUE Zero data re-entry. Eliminates measurement transcription errors. Sales killer feature for high-volume clinics.
3.11 Finalise & Lock
WHY Once a report is printed and signed, it becomes a legal document. Editing it after the fact is fraud.
HOW Click
Finalise → confirmation dialog → report status becomes Locked → text editing disabled → Print and PDF buttons enabled.
VALUE Medico-legal compliance. Print only happens on finalised reports — no half-edited documents leak out.
4. FETAL GROWTH CHARTS & IUGR DETECTION
4.1 Why This Module Justifies the Whole Product
For obstetric practices, growth charts are the single most clinically valuable feature. International software costs ₹3+ lakh per year for this. Softcode bundles it.
4.2 When Charts Appear
Charts appear automatically only when:
- Study Type = Obstetric
- Sub-type = 2nd Trimester (14–28 weeks) OR 3rd Trimester (28–40 weeks)
- The relevant measurements have been entered
4.3 The 10 Charts & Their Reference Standards
| Group | Chart | Color | Reference |
| Biometry | BPD (Biparietal Diameter) | Blue | Hadlock / INTERGROWTH-21st |
| HC (Head Circumference) | Purple | Hadlock / INTERGROWTH-21st |
| AC (Abdominal Circumference) | Cyan | Hadlock / INTERGROWTH-21st |
| FL (Femur Length) | Green | Hadlock / INTERGROWTH-21st |
| Weight | EFW (Estimated Fetal Weight) | Amber/Gold | Hadlock 1985 formula |
| Doppler | UA-PI (Umbilical Artery PI) | Red | Arduini & Rizzo |
| UA-RI (Umbilical Artery RI) | Orange | Arduini & Rizzo |
| UA S/D Ratio | Pink | Arduini & Rizzo |
| Uterine Artery PI | Indigo | Papageorghiou |
| MCA-PI (Middle Cerebral Artery) | Teal | Mari |
4.4 What Each Chart Visually Shows
- Coloured gradient band — the P5 to P95 normal range
- Bold P50 line — the median (expected normal value)
- Dashed P5 / P95 lines — the boundaries of normal
- Glowing red dot — this patient's measurement plotted
- Percentile badge — tells you exactly where the patient falls:
- P42 (green) — normal growth
- P8 (orange) — borderline
- <P5 (red) — abnormal / IUGR risk
4.5 IUGR Detection on the Dashboard
WHY Intrauterine Growth Restriction is a leading cause of foetal death. Catching it early saves babies.
HOW The Doctor Dashboard automatically scans every obstetric patient's EFW vs Hadlock reference. Any patient below P10 is flagged. The doctor sees a quick "IUGR Watch" card with all at-risk patients.
VALUE Lifesaving early detection. Massive trust signal for obstetric practices.
4.6 Print — High-Quality Color Charts
Tick + Growth Charts in the print toolbar (purple checkbox). The PDF output includes all 10 charts in full colour, properly paginated, with the patient's data points clearly visible. Patients love taking these home — they look like a hospital chart.
5. PRINT & DOCUMENTATION SYSTEM
5.1 Three Things Get Printed
| Document | Who Prints | Format |
| USG Report | Doctor (after Finalise) | A4, with header, findings, impression, signature, PNDT footer |
| Patient Receipt | Reception (after registration) | A4 or thermal, with name, study, gross/discount/net, payment mode, status, priority |
| DICOM Image Sheet | Doctor | A4, configurable grid (1×1, 2×2, 3×2), white or black clinical theme |
5.2 USG Report — What the Final Print Contains
| Section | Content | Always or Optional |
| Header Bar | Clinic name, address, phone, PNDT Reg. No. | Always (from Settings → Profile) |
| Title Bar (Blue) | e.g. "ULTRASONOGRAPHY REPORT — OBSTETRIC (2ND TRIMESTER)" | Always |
| Patient Info Table | Name, Age/Sex, Referred By, Date, Sonologist | Always |
| Measurements Table | All filled measurements in 2-column layout | If measurements exist |
| Anatomy Diagram | Organ illustration with annotations | Optional (+ Diagram checkbox) |
| Findings (large block) | Detailed clinical findings — AI or doctor written | Always |
| Impression (amber box) | Conclusion / summary | Always |
| Fetal Growth Charts | 10 colour percentile charts | Optional, OB 2nd/3rd only |
| PNDT Compliance Footer | Legal disclaimer + Centre Reg. No. | Auto for obstetric reports |
| Doctor Signature Image | Uploaded signature, 52px tall × max 160px wide | Always (from Settings → Signature) |
| Doctor Name + Degree + Reg. No. | Below signature | Always |
| Generation Timestamp + AI Assisted Label | Bottom — for traceability | Always |
5.3 DICOM Image Sheet — Layout Options
WHY Different studies need different image counts. A thyroid scan has 2–3 images, a comprehensive abdomen has 6+. One layout doesn't fit all.
HOW Doctor selects layout:
1×1 (one big image),
2×2 (four images),
3×2 (six images per page). Each image can be zoomed and panned before printing. Theme switch between
white background (for paper economy) and
black background (for true clinical look matching the USG monitor).
VALUE Premium-looking image sheets. Doctors can hand patients a professional set of scan images.
5.4 Receipt Print — What Reception Hands the Patient
- Patient name, age, study type
- Gross amount, Discount, Net Payable
- Payment Mode (Cash / UPI / Card / Cheque / Online) — colour coded
- Payment Status (Paid / Partial / Pending / Complimentary) — colour coded
- Priority badge if Urgent or Emergency
- Receipt number + clinic signature line
6. DICOM INTEGRATION — TWO BRIDGES, ONE WORKFLOW
6.1 Why DICOM Matters
USG machines speak DICOM. Without DICOM integration, the doctor types every patient name twice (once in software, once on machine), takes machine images on USB, transfers to PC, manually attaches to report. That's 5 minutes wasted per patient. With DICOM, all of that is automatic.
6.2 The Two Bridges Explained
Bridge #1 — Reception Worklist Bridge
Direction: Software → USG Machine
Purpose: send today's patient list to the machine so the operator just selects, never types.
Protocol: DICOM C-FIND SCP (MWL — Modality Worklist).
Bridge #2 — Doctor Receiving Bridge
Direction: USG Machine → Software
Purpose: pull DICOM images and SR measurements from the machine straight into the report.
Protocol: DICOM C-STORE SCP.
Both bridges are implemented in the same single Node.js process running on the doctor's PC, listening on a single port (4145). One installer sets up both. One configuration in the USG machine activates both.
6.3 The Complete End-to-End Flow
[Morning]
Reception registers patients in Softcode (10 patients today)
↓
Reception clicks "Push to Bridge" (or it pushes automatically)
↓
Bridge sits on the doctor's PC, port 4145
↓
USG machine queries the bridge for today's worklist (MWL)
↓
All 10 patients appear on the machine — operator just selects
[During Scan]
Operator scans patient #3 → measurements done on machine
↓
Operator presses "Store" on the machine
↓
Machine sends DICOM SR + images to the bridge (C-STORE)
↓
Bridge parses the SR, extracts measurements
↓
Bridge forwards to Softcode cloud (HTTPS, token auth)
↓
Softcode shows entry in DICOM Inbox on Patients page (yellow card)
[Doctor Reports]
Doctor opens patient #3 → sees "Use DICOM Data" button
↓
Click → all measurements auto-fill in report editor
↓
Click "Generate AI Draft" → report appears in 8 seconds
↓
Review → Finalise → Print
6.4 The Installer — What It Actually Does
One Windows .bat installer. Run as Administrator. The user sees a progress bar; the script silently does this:
- Checks if Node.js is installed; downloads and installs if missing
- Creates folder
C:\SoftcodeBridge\
- Copies the bridge JS file
- Adds inbound Windows Firewall rule: TCP port 4145 allowed
- Adds Windows Defender exclusion for the bridge folder (so antivirus does not delete files)
- Creates a Task Scheduler entry "SoftcodeBridgeTray" that auto-starts on every login (30s delay, highest privilege)
- Starts the bridge immediately
Result: the doctor sees a small tray icon near the clock. The bridge runs forever, even after Windows restarts.
6.5 8 USG Machine Brands Pre-Configured
| Brand | Menu Path on Machine |
| Samsung (Medison) | System Menu → Setup → Network → DICOM Settings |
| GE (Voluson / Logiq) | Config ⚙ → Connectivity → DICOM → Devices → Add |
| Philips | System → Connectivity → DICOM → Worklist Server |
| Mindray | System → System Configuration → Connectivity → DICOM |
| SonoScape | System → Network → DICOM Servers |
| Chison | Setup → Network → DICOM → Add Server |
| Toshiba / Canon | Patient → DICOM Setting → Remote Host |
| Voluson (GE series) | Connectivity (same as GE) |
Settings tab in Softcode shows step-by-step accordions for each brand — engineer never has to look anything up.
6.6 Auto-Patient Creation (Smart Match)
WHY Sometimes the machine sends data for a patient who was never registered (operator skipped worklist). We don't want that data to be lost.
HOW Bridge receives DICOM with patient name. Softcode tries to match against existing patients (case-insensitive, fuzzy). High confidence match → auto-link. Low confidence → DICOM Inbox shows it as "unmatched" — doctor manually links or creates a new patient with one click.
VALUE No data ever gets lost. Walk-in patients are absorbed automatically.
7. THE AI LEARNING SYSTEM & CLOUD SYNC
7.1 Two Levels of AI Learning
| Level | Scope | How It Improves |
| Personal Learning | Per doctor | Doctor's edits → stored as correction notes → injected into future drafts |
| Cloud Learning | Across all Softcode doctors | Anonymised aggregated corrections → monthly merge into the master AI model on Softcode cloud |
7.2 Personal Learning — How Train AI Persists
Already explained in section 3.4. Quick recap of the data structure: each correction is stored as { doctorId, studyType, hint, patternBefore, patternAfter, createdAt }. On every AI draft, the system gathers all hints for that doctor + study type and prepends them to the GPT-4o system prompt as "This doctor's preferences (always follow): ...".
7.3 Cloud Sync — Monthly 28th
WHY Individual doctors discover writing improvements that should benefit everyone. A new doctor signing up should not have to start from zero.
HOW
- Throughout the month, every doctor's corrections are stored locally on Softcode servers (per doctor)
- On the 28th of every month, the Aggregator job runs:
- Strips all PII (patient names, IDs, anything identifying)
- Groups corrections by study type
- Counts how many doctors made each kind of correction
- Promotes corrections present in 5+ doctors to the master cloud model
- Smart merge: cloud model only overrides individual hints when the cloud has more evidence than the doctor's personal store
- New doctors signing up automatically inherit the master model's accumulated wisdom
VALUE Network effect — every Softcode customer makes every other Softcode customer's AI better. Massive moat against competitors.
7.4 Admin Import / Export of AI Model
The full trained model can be exported as a JSON file by Admin. This is used for:
- Disaster recovery — back up the trained model offline
- New installation seeding — bootstrap a new Softcode instance with all accumulated learning
- Hospital chain rollouts — when a chain buys Softcode, import their existing dictation patterns
8. ADMIN CONTROL PANEL
🛡️ Softcode HQ only
8.1 What Admin Sees on Dashboard
| Stat Card | Why It Matters to Softcode |
| Total Doctors | Acquisition metric |
| Active Doctors | Engagement metric — paying customers |
| Total Billed (₹) | Revenue this month/year |
| Amount Pending (₹) | Outstanding collections — for follow-up |
| Total Cleared (₹) | Confirmed cash flow |
8.2 Doctor Registration Approval
WHY Anyone could register pretending to be a doctor. We need ID verification before granting access — both for product integrity and for legal protection.
HOW New doctor signup goes into Pending status. Admin sees them under Registrations → reviews ID proof, clinic name, dealer code → Approves (sends welcome email + activates login) or Rejects with reason.
VALUE Quality control. Prevents fraud. Builds trust with referring doctors and patients.
8.3 The Doctor Detail Panel — End-to-End Account Control
Click any doctor → opens a detail panel with full control:
| Section | What It Does |
| Doctor Info | Read-only display of name, email, clinic, degree, reg no., signup date |
| Add-ons Toggles | Voice / Diagram / Compare / Print Images — turn each ON or OFF for this doctor. Drives upsell tiers. |
| Set Credit Price | ₹ per AI credit for this doctor. Different doctors can have different prices (e.g. high-volume gets discount). |
| Recharge Credits | Manually add credits to the doctor's account when they pay (e.g. ₹5000 → 250 credits at ₹20 each). |
| Credits Used This Month | Editable for manual corrections (e.g. waive credits during disputes) |
| Generate Bill | Auto-creates monthly bill: credits × price + add-on usage |
| Mark Bill Paid | After payment received, mark as paid → shows in history |
| Deactivate | Disables login but keeps all data. Doctor cannot log in until reactivated. |
8.4 Cloud AI Sync Control
Admin sees the cloud sync dashboard: when last sync ran, how many corrections were merged, breakdown by study type. Admin can trigger manual sync if needed.
8.5 Dealer Panel
| Tab | What It Does |
| Registrations | Approve / Reject new dealer signups |
| Dealers | Active dealers list, their codes, linked doctor counts |
| Dealer Details | Dive into one dealer: linked doctors, billing history, profit accumulated |
| Payout Section | Process dealer payout requests. Mark paid when transferred. |
8.6 Company / Vendor Profile (For GST Invoices)
Stores the Softcode entity details that print on every invoice: business name, GSTIN, PAN, bank details, UPI ID, owner name, address. Admin updates once; reflected on every invoice.
9. DEALER COMMISSION SYSTEM
🤝 Sales partner role
9.1 The Business Model
A dealer signs up → Softcode gives them a unique code. They go to clinics, demo the software, and convince doctors to install. The doctor enters the dealer code at signup. From that point on:
- Every credit the doctor consumes generates revenue for Softcode
- A configurable percentage of that revenue (the dealer's "profit margin") accrues to the dealer
- The dealer can request payout whenever profit accumulates
9.2 The Dealer Dashboard
| Stat Card | What It Shows |
| Linked Doctors | Count of doctors using the dealer's code |
| Credits Used | Total credits consumed by all linked doctors |
| Total Billed (₹) | Revenue Softcode has billed those doctors |
| Your Profit (₹) | Dealer's share of that revenue — ready for payout |
9.3 Linked Doctors & Doctor Bills Accordions
Click to expand → see per-doctor breakdowns. Dealer knows exactly which clinic is generating the most revenue and can focus retention there.
9.4 Request Profit Payout
WHY Dealers should be able to ask for their commission without an awkward phone call.
HOW Click the button → Admin gets a notification → Admin processes payout → marks paid → dealer's profit balance resets. After clicking, the button changes to "Payout reminder already sent to admin" until processed (prevents spam).
VALUE Self-service for dealers. No friction in the partner relationship.
10. SETTINGS — EVERY TAB EXPLAINED
10.1 Profile Tab
The most important tab — it controls what prints on every report.
- Hospital / Clinic Name — printed in report header
- PNDT Registration No. — legal requirement on obstetric reports
- Degree — printed below signature
- Clinic Address & Phone — printed in header
- Reception Code (read-only) — share with reception staff so they can link themselves
10.2 My Bills Tab
Doctor sees their own credit balance, total credits used, total amount charged by Softcode (or their dealer). Can filter by Paid / Unpaid / Pending. Download all bills as PDF for accounting.
10.3 Password Tab
Standard password change with current-password verification. Min 6 characters.
10.4 Signature Tab
Upload a transparent PNG of the doctor's signature. Renders at exactly 52px tall × max 160px wide on every printed report. Without this, reports print without a signature image — only the typed name.
10.5 PNDT Tab
Stores a URL link to the doctor's online PNDT registration certificate. The actual PNDT number that prints on reports comes from the Profile tab; this is just a reference link for the doctor's own use.
10.6 Local Bridge Tab — DICOM Setup
Where the doctor configures their DICOM machine link. Generates the secure token, downloads the bridge JS and the Windows installer, shows the IP/Port/AE Title to enter into the machine. Includes step-by-step accordion guides for 8 USG brands. See section 6 for the full flow.
10.7 Live Chat Tab
Direct messaging to the Softcode support team. Real-time. Chat history preserved.
10.8 Reception Staff Tab Admin only
For admin doctors managing multiple reception accounts. Add, list, remove reception staff. View the unique Reception Code they need to enter to link themselves.
10.9 AI Learning Tab Admin only
See how many corrections the AI has learned per study type. Reset training data if you want to start fresh. View the training quality score.
10.10 Audit Trail Tab
WHY Medico-legal requirement — every important action (login, report generated, report finalised, deleted, printed) must be logged with timestamp and user.
HOW Server-side log of every state-changing operation. Filterable by user, action type and date range. Exportable for legal audits.
VALUE Compliance. Trust. Disputes resolved by checking the audit log.
10.11 Feedback Tab Admin only
Submit two types: Software Issue (bugs, feature requests) and HL7 Monthly Feedback (clinical standards input — once a month each clinic sends a structured note about real-world findings to Softcode for AI improvement).
11. COMMUNICATION & SUPPORT
11.1 Three Channels
| Channel | Who → Whom | Purpose |
| Floating AI Chat 💬 | Any user → AI | Clinical queries — "What is TIRADS 4?", "Normal AFI range?" |
| Live Chat (Settings) | Doctor / Dealer → Softcode Support Team | Software help, billing questions |
| Internal Chat | Doctor ↔ Reception | "Patient on table — finalise quickly please" |
11.2 Floating AI Chat
Bottom-right of every page. Click to open a chat panel powered by GPT-4o. Doctor can ask any clinical question and get an instant evidence-based answer. Cost-free for the doctor (Softcode absorbs token cost — usually pennies).
11.3 Live Chat — Direct Line to Softcode
From Settings → Live Chat. Real-time messaging to the Softcode support team. Online status visible. History preserved across sessions.
12. CREDIT & BILLING SYSTEM
12.1 What Costs Credits
| Action | Cost | Why |
| Generate AI Draft | 1 credit | One GPT-4o call |
| Regenerate AI Draft | 1 credit | Another GPT-4o call |
| QA Check | 1 credit | Another GPT-4o call |
| Voice Input | Per add-on price | Speech recognition + GPT cleanup |
| Anatomy Diagram | Per add-on price | Add-on subscription |
| Compare Reports | Per add-on price | Add-on subscription |
| Patient registration / view / edit / print / DICOM / templates | Free | Core features must always work even with zero credits |
12.2 Per-Doctor Custom Pricing
Admin sets the ₹/credit price separately for each doctor. High-volume clinics get discounted rates. Trial doctors might get a lower introductory price. Add-ons priced separately. The doctor never sees the ₹ price — only their credit balance.
12.3 Low Credit Warning
- Below 10 credits → orange warning in top bar
- 0 credits → AI Generate button disabled
- Existing reports always remain viewable and printable — never lose access to clinical data
12.4 Monthly Billing Cycle
On the 28th of every month, Admin clicks Generate Bill for each doctor → bill = (credits used × price) + add-on usage. Doctor sees the bill in My Bills tab. Pays via UPI/bank transfer to Softcode → Admin marks Paid → invoice issued.
13. SECURITY & DATA PRIVACY
13.1 Authentication Hardening
- Passwords hashed with bcrypt (cost factor 10) — never stored in plain text
- Server-side sessions, signed cookies, HttpOnly + Secure flags
- Brute-force protection: max 10 failed login attempts per IP per 15 minutes
- Admin can deactivate any doctor instantly → session invalidated immediately
13.2 Patient Data Privacy
- Doctors only see their own patients (database queries scoped by
doctorId)
- Reception only sees patients of their linked doctor
- Dealers never see patient data — only aggregate billing/credit usage
- Admin sees patient counts and revenue, but not patient identities
- AI cloud sync strips all PII before aggregation
13.3 PNDT Compliance
- AI prompt engineered to never mention sex/gender of fetus
- QA Check explicitly blocks any text containing sex determination
- PNDT footer auto-printed on every obstetric report
- Built-in PNDT Form F generator with auto-fill from registered patient and clinic data
13.4 Audit Trail
Every important action (report created, finalised, deleted, printed, AI generated, login, password change) is logged server-side with timestamp + user ID. Available for download in legal disputes.
14. SALES PLAYBOOK — TALKING POINTS & FAQ
14.1 The 30-Second Elevator Pitch
"Softcode USG AI Assist is an AI-powered ultrasonography reporting platform. The doctor enters measurements, GPT-4o writes a complete clinical report in 8 seconds, and the AI personally learns each doctor's writing style over time. It connects directly to your USG machine via DICOM, prints PNDT-compliant reports with fetal growth charts, and runs entirely in the browser — no installation, works on laptop, tablet or phone. ₹X per month per doctor."
14.2 Top 10 Sales Objections & Answers
| Objection | Answer |
| "AI will make medical mistakes." | The AI is a draft writer. The doctor reviews and signs every report — final responsibility stays with the doctor. Plus the QA Check catches missing fields before printing. |
| "My existing software is fine." | How long does a report take to type? Multiply by 30 reports a day. That's 2+ hours of typing daily that Softcode eliminates. Your time alone pays for the software 10× over. |
| "Internet outages will block me." | Existing reports remain viewable and printable offline. AI draft requires internet (so does GPT-4o), but the rest of the workflow degrades gracefully. |
| "PNDT issues — sex determination liability." | The AI is hard-coded to refuse sex determination. The QA check explicitly blocks it. PNDT Form F is auto-generated. We are more compliant than your current paper system. |
| "My USG machine is old." | Any DICOM-capable machine since 2005 works. We support Samsung, GE, Philips, Mindray, Voluson, SonoScape, Chison, Toshiba/Canon. Show me your machine model — I will confirm. |
| "What about my staff who don't know computers?" | Reception screen is one page — register patient, take payment, print receipt. Designed for non-technical staff. Doctor screen has AI; staff doesn't. |
| "How much will it cost long-term?" | Pay-per-report model — ₹X per AI report, ₹0 for everything else (registration, viewing, printing, DICOM). Predictable and proportional to your business volume. |
| "What if you go out of business?" | You can export all your data anytime as PDF/CSV. Reports are downloaded; nothing is locked in. |
| "I want to try before I buy." | Click Demo on the login screen → instantly explore everything. No signup needed. |
| "Can I edit AI mistakes?" | Yes — every line is editable until you Finalise. And Train AI ensures the same mistake doesn't repeat. |
14.3 Pricing Models for Different Customer Sizes
| Customer | Suggested Plan | Reasoning |
| Solo doctor, 5–10 scans/day | 200 credits/month basic, no add-ons | Low volume — low cost — quick adoption |
| Mid clinic, 20–30 scans/day | 500 credits + Voice + Diagram add-ons | Volume justifies add-ons; voice saves time |
| Multi-doctor practice, 50+ scans/day | Custom enterprise pricing per doctor + all add-ons | High value, recurring revenue, dealer commission |
| Hospital chain | Volume pricing + Admin custom training import | Bulk negotiation, branded training data |
14.4 Why Doctors Switch to Softcode (Real Reasons)
- Time saved — 2+ hours of daily typing eliminated
- Professional reports — fetal growth charts & PNDT compliance look premium to referring doctors
- DICOM integration — eliminates re-typing patient names into the machine
- Personalised AI — sounds like the doctor wrote it, not generic
- One-time setup — no software install on every device, browser-based
- Local language support — voice input handles English-mixed dictation common in Indian practice
- Audit trail — peace of mind for medico-legal disputes
15. QUICK REFERENCE — THE COMPLETE WORKFLOW
SOFTCODE USG AI ASSIST — END-TO-END FLOW
PATIENT WALKS IN
↓
RECEPTION registers patient (name, age, study type, payment)
↓
RECEPTION pushes worklist to USG machine via bridge
↓
PATIENT goes to scan room
↓
DOCTOR selects patient on USG machine (no typing)
↓
DOCTOR scans → measurements + images saved on machine
↓
DOCTOR presses "Store" on machine
↓
DICOM SR + images flow to Softcode bridge → cloud
↓
DOCTOR opens patient in Softcode → measurements auto-filled
↓
DOCTOR clicks "Generate AI Draft" → report appears in 8 sec
↓
DOCTOR reviews → optionally edits → clicks "QA Check"
↓
DOCTOR clicks "Finalise" → report locked
↓
DOCTOR clicks Print (with + Diagram, + Growth Charts as desired)
↓
PATIENT receives professional A4 report with signature, growth charts,
anatomy diagram, PNDT compliance footer
↓
RECEPTION prints receipt → patient leaves
↓
END OF DAY: Doctor sees "All Done" badges across patient list
↓
END OF MONTH (28th): Admin generates bill, Dealer requests payout,
Cloud AI sync runs automatically
Softcode USG AI Assist | Feature Deep Dive | Version 3.0
Built for engineers who maintain it · sales who pitch it · marketing who position it
GPT-4o Powered · PNDT Compliant · DICOM Ready · GST Billing
This document is confidential — for authorized internal use only