🩺 Niramoy
Technical & Feature Specification

Medical Referral & Discovery Platform —
Full Software & System Architecture

A complete engineering breakdown of the platform: every screen and capability across the Patient App, Doctor Portal, Ambulance Driver App and Admin/Ops Console — plus the dispatch, metered-pricing, verification, telemedicine, records and geo engines behind them. Architected around Bangladesh's regulatory reality, not around it.


Prepared by
Mahfuz Akand
Uttara, Dhaka · Bangladesh
Prepared for
Niramoy
Dhaka-first · Bilingual বাংলা / English
🔒 Confidential — Technical Document
July 2026 · Spec v1.0 · Flutter + NestJS + PostGIS · Hosted in Bangladesh
⚙️ Software · Apps · System Architecture

Everything the platform does, and everything that runs it

This document is feature- and architecture-first. It maps the entire product surface — four applications, eight backend engines, the data model, the API layer, the payments topology and the reliability/scale foundations — so engineering, review and estimation all work from the same source of truth. Every design decision that is driven by Bangladeshi regulation is called out at the point it bites.

Applications4
Core Engines8
MobileFlutter
BackendNestJS
GeoPostgreSQL + PostGIS
HostingIn-country (BD)
Build18–22 weeks
01 — System Overview

Four applications, eight engines, one compliance layer

Each client app talks to a shared NestJS API over REST for actions and WebSocket for live state. Behind that API sit the engines that actually create value: dispatch, the metered fare, verification, telemedicine, records, geo/search, notifications and tourism. Cutting across all of them is a compliance layer that is not a feature — it is a constraint on every other feature.

📱

Patient App

Search, nearby, doctor & facility directory, lab price comparison, ambulance, video consult, checkup packages, records, tourism. Flutter · iOS + Android.

🩺

Doctor App / Portal

BMDC-verified onboarding, availability, video consult, e-prescription with the enforced drug matrix, patient records. Flutter + Web.

🚑

Ambulance Driver App

Onboarding, availability, job offers, navigation, trip flow, live meter, proof of trip. Flutter · Android-first.

🛡️

Admin / Ops Console

Verification queue, live dispatch map, listings, pricing, finance, disputes, content, reports. Web.

The eight engines behind the apps

🎯

Dispatch Engine

Geospatial ambulance matching, offer cycle, timeout & re-assign, ops escalation.

📏

Metered Pricing Engine

Distance-based ambulance meter anchored to the government's Tk 35–40/km reference rate. The core IP.

Verification Engine

BMDC registration + DGHS facility licence as a hard gate on every listing, with expiry and re-verification.

🎥

Telemedicine Engine

WebRTC consult rooms, consent capture, session recording metadata, e-prescription with the drug matrix hard-coded.

📁

Health Records (EHR)

Patient-owned record vault, prescriptions, reports, Health ID / NID, NDHIE-ready export.

🔎

Search & Geo / Nearby

PostGIS radius + polygon queries, faceted objective search, no ranking signal.

🔔

Notification Hub

Transactional-only push/SMS/in-app. Structurally incapable of promoting a doctor.

✈️

Medical Tourism

Multi-destination enquiry, itemised quote with disclosed fee, interpreter bundle, document workflow.

The one-line summary of this architecture

Standard marketplace software assumes it may rank supply, rate supply, promote supply and hold the money. In Bangladeshi healthcare, all four are prohibited or licensed. So this platform is built as a verified, neutral, price-transparent directory with a metered transaction layer — and the compliance layer is enforced in the schema and the API, not in a policy document that engineers can forget.

79.31%of Bangladeshi health spending is out-of-pocket — effectively the world's highest. World Bank / WHO GHED, 2023.
27.52%of that out-of-pocket money goes to diagnostics — the #2 category after medicines. BNHA/BIDS, 2021 data.
89.3%of ambulance capacity sits idle; utilisation is 10.7%. Hossain et al., IJCCEM, 2022.
32×maximum observed price spread on an identical diagnostic test in Dhaka. New Age, 12 Aug 2022.

Those four numbers are the entire product thesis, and each one maps to a module in this document: transparency (§12 Search), diagnostics price comparison (§3 Patient App), the ambulance meter (§9 Pricing Engine), and verification (§7).

02 — Compliance Architecture 🔴

The regulation rewrites the product. Read this before any other section.

Every other spec you have seen for a health marketplace is illegal in Bangladesh in at least four ways. The BMDC Code of Professional Conduct, the BMDC Telemedicine Guidelines (July 2020) and the DGHS National Telehealth Guideline together remove star ratings, reviews, rankings, paid placement, promotional push, referral commission, offshore hosting and fund custody from the design space. This section states the constraints; the rest of the document obeys them.

🚫

Prohibited — and therefore not built

These are not toggled off. They do not exist in the schema, the API or the UI.

  • Star ratings on doctors — BMDC Code §3
  • Patient reviews / testimonials — §3.4.3 requires we actively discourage them
  • "Top Doctor" / "Best cardiologist in Dhaka" / any ranking or superiority claim — §3.2b
  • Paid or sponsored doctor placement in search results
  • Push / SMS / email promoting a specific doctor — §3.5.4
  • Guarantees of cure; photographs in announcements
  • Commission to a doctor for a referral, in cash or kind — §4.3.1
  • Taking a cut of the doctor's consultation fee — §4.3.2 (a platform is not a "bona fide partner")
  • AI counselling or prescribing — Telemedicine Guidelines §7.4
  • Holding third-party funds — that is PSO territory
  • Overseas cloud hosting of health data — DGHS Telehealth Guideline §5(10)

Permitted — and therefore built

The compliant product surface, in full.

  • Neutral directory card with the permitted fields only (below)
  • BMDC registration number displayed on every doctor profile — §7.2, mandatory
  • Sort by objective, non-comparative criteria: availability, specialty, distance, fee, gender, language
  • Fee schedule published — explicitly permitted, and the whole point
  • Price comparison across licensed facilities — a facility price is not a doctor advertisement
  • Patient-side booking/service fee, separately itemised, doctor's fee passed through intact
  • Flat SaaS / listing subscription to facilities, not volume-tied
  • Full financial disclosure on every booking screen — §4.2.2 demands it
  • Grievance mechanism — §7.5, mandatory
  • Explicit consent capture; identity verification on both sides — §5.4, §5.2
  • AI as an assist tool (triage hints, symptom capture for the doctor) — never counselling or prescribing

The neutral directory card — the most counterintuitive component in this spec

A patient opening a doctor listing on any normal marketplace sees stars, review counts, "97% recommend", and a "Sponsored" badge. On Niramoy they see none of that, because BMDC Code §3 defines "practice promotion" to include publicity by "anybody acting on his behalf" — our marketing of a doctor is captured by the code. The card below is the complete permitted field set. Nothing else renders. The card component takes no rating, reviewCount or sponsored prop, because those columns do not exist.

Dr. [Name]
MBBS, FCPS (Cardiology) — Council-approved qualifications only
BMDC Reg. No. A-XXXXX · Verified 12 Jun 2026 · Valid to 31 Dec 2027
Specialist titleCardiologist
GenderFemale
Languagesবাংলা, English
Affiliated hospital[DGHS-licensed facility]
Consultation hoursSun–Thu, 18:00–21:00
Chamber address[Address] · View on map
Consultation feeTk [X] — new · Tk [Y] — follow-up
Emergency availabilityNo
Book appointment

Uniform typography — same size, not bold, not italic, per §3. No doctor's entry may be visually emphasised over another.

What is deliberately absent — and why

★★★★☆ 4.7 (312 reviews) — ratings & reviews, §3, §3.4.3
"Top Rated" / "Most Booked" badge — ranking claim, §3.2b
"Sponsored" / "Featured" — paid placement
"98% of patients recommend" — testimonial & comparative claim
"Best in Dhaka for angioplasty" — superiority claim
Patient photo testimonials / letters of gratitude
"Dr. X has a slot at 6pm — book now!" push — §3.5.4
Doctor leaderboards, "Trending", "Recommended for you"

Sort options that ARE allowed

Next available slot Distance from me Consultation fee ↑ / ↓ Specialty Language Gender Video consult available

Default sort is distance for in-person and next available slot for video. Both are objective and non-comparative. There is no relevance score, no engagement signal, no bid.

The separation of decisions — enforced in code

The problem we exist to fix is the referral kickback. Diagnostic centres pay doctors 20–50% commission on tests they send over — pathology 50%, ELISA 40%, X-ray/ultrasound/histopathology 20%; flat fees of Tk 1,350 on an MRI, Tk 1,200 on a CT (New Age, 12 Aug 2022). The president of the Bangladesh Medical Association has publicly called it "a crime." If our software lets a doctor pick the lab, we have digitised the kickback.

So the architecture separates the two decisions and never lets them touch:

  • The doctor issues an InvestigationOrder — a clinical artefact. It names the test. It has no facility field. The doctor's UI has no facility picker.
  • The patient then opens a LabBooking against that order and chooses the facility from a price-sorted list of DGHS-licensed centres. The doctor is not told which one, and receives nothing from it.
  • Both objects are written to an append-only audit log (decision_audit) with actor, timestamp and payload, so we can prove separation to a regulator or a court.
  • There is no schema path from a completed LabBooking to a doctor payout. The Payout table has no doctor_id on lab lines. This is a foreign-key-level guarantee, not a policy.

Where the constraint lands, module by module

RegulationSourceWhat it forces in the build
No ratings, reviews, rankings, paid placement, promotional pushBMDC Code §3, §3.2b, §3.4.3, §3.5.4Neutral directory card; objective-only sort; Notification Hub restricted to transactional templates (§13)
No referral inducement; no fee-splittingBMDC Code §4.3.1, §4.3.2Doctor↔lab decision separation (above); revenue model is patient-side fee + flat facility SaaS (§14)
Financial arrangements must be disclosed to all partiesBMDC Code §4.2.2A mandatory fee-disclosure block renders on every booking confirmation screen and every invoice (§14)
Must verify BMDC registration; must display reg. numberTelemedicine Guidelines §7.1, §7.2Verification Engine (§7) is a hard gate. bmdc_reg_no is NOT NULL on the doctor profile
AI may not counsel or prescribeTelemedicine Guidelines §7.4AI features are assist-only, always labelled, never patient-facing as advice; no auto-generated prescriptions (§10)
Drug matrix by consult modeTelemedicine Guidelines (e-prescription)List O / A / B-1 / Prohibited enforced server-side in the prescription API. List A = video only. Narcotics never (§10)
Health data must sit inside BangladeshDGHS National Telehealth Guideline §5(6), §5(10)In-country hosting; no Singapore/US region; media, DB, backups and video TURN/SFU all onshore (§19, §22)
Grievance mechanism requiredTelemedicine Guidelines §7.5Dispute Centre in Admin console; in-app "Raise a complaint" on every consult and booking (§6)
Practice limited to Bangladeshi territory; overseas physicians need a BD licenceTelemedicine Guidelines §3.4; DGHS Telehealth §3.3.1gTourism module ships no foreign-doctor teleconsult at launch — enquiry + document workflow only (§13, §23)
Holding patient money and settling out = PSO licenceDraft PSO Regulation 2025Merchant-of-record / split-settlement via a licensed gateway. We never touch the funds (§14)
Third-party telehealth platforms need a licence; price list approved at licensingDGHS National Telehealth GuidelinePrice list is a single admin-managed, versioned, exportable artefact — so it can be filed and approved (§9)

Every row above has a corresponding section in this document. If a developer is about to add a rating, a "recommended" badge, a promo push about a doctor, or a doctor payout on a lab booking, the schema should stop them before code review does.

03 — Patient App

Patient App — every feature

The demand surface. Bilingual বাংলা/English, Android-first (72.4% of households own a smartphone, 80.8% urban — BBS ICT Household Survey, 2025/26). Designed for one urgent job (an ambulance, right now) and one repeat job (a test at a fair price, every few months).

🔐

Onboarding & Account

  • Phone OTP login — no password
  • Profile: name, age, sex, blood group, NID (optional)
  • Family members — book on behalf of parents/children
  • Saved addresses with map pin + landmark
  • Language toggle (বাংলা / English) at first launch
  • Emergency contacts & allergies for the ambulance flow
🔎

Search

  • Unified search: doctor · facility · test · package
  • Bengali + English + transliterated query handling
  • Symptom → specialty mapping (assist only, never advice)
  • Filters: specialty, distance, fee, gender, language, availability
  • No relevance ranking on doctors — objective sort only
📍

Nearby

  • Map + list of verified facilities within radius
  • Layers: hospital · diagnostic centre · pharmacy · ambulance
  • Open-now, emergency-capable, has-ICU filters
  • Distance, travel time, phone, directions
  • Only DGHS-licensed facilities appear. Full stop.
🩺

Doctor Directory

  • Neutral directory card (see §2) — permitted fields only
  • BMDC registration number shown on every profile
  • Chamber hours, affiliated hospitals, fee schedule
  • In-person appointment or video consult
  • No ratings, no reviews, no rankings, no sponsored slots
🏥

Facility / Diagnostic Listing

  • Hospitals, clinics, diagnostic centres
  • DGHS licence number + expiry shown on the profile
  • Services, departments, bed/ICU availability if shared
  • Photos, hours, contact, map
  • Facility fee schedule where published
🧪

Investigation / Lab Listing & Price Comparison

  • Canonical test catalogue — one test, many facilities
  • Side-by-side price comparison across licensed centres
  • Sort by price, distance, turnaround, home-collection
  • Prices are facility-declared and timestamped
  • Home sample collection where the facility offers it
  • Upload a doctor's InvestigationOrder and price the whole panel at once
🚑

Ambulance Booking

  • One-tap emergency — location auto-captured, minimum fields
  • Type: normal · with-oxygen · ICU · freezer
  • Fare estimate shown before dispatch, from the published meter
  • Live driver marker, ETA, vehicle & driver identity
  • Live running meter during the trip — the market has none
  • Shareable tracking link for family
  • Scheduled (inter-district transfer) as well as immediate
🎥

Video Consultation

  • Pick a slot from the doctor's published availability
  • Explicit consent screen before the room opens (§5.4)
  • Pre-consult intake: symptoms, duration, photos, past reports
  • In-room chat + file share; audio-only fallback on weak network
  • Receive the e-prescription in-app, PDF, and to records
  • Follow-up booking with the same doctor
📦

Checkup Packages

  • Bundled panels (basic, diabetic, cardiac, women's health, pre-employment)
  • Bundle price vs sum-of-parts shown honestly
  • Package composition listed test-by-test
  • Compare the same package across facilities
  • Book for self or a family member
📁

Health Records

  • Timeline of consults, prescriptions, lab reports, admissions
  • Upload photos/PDFs of paper reports; OCR-indexed
  • Per-doctor, time-boxed sharing — patient grants, patient revokes
  • Family member vaults under one account
  • Export as PDF; NDHIE/SeHR-ready structure (§11)
✈️

Medical Tourism

  • Destination browse: India · Thailand · China (Kunming) · Malaysia
  • Submit a case (reports + question) → receive itemised quotes
  • Our fee shown as a separate line, never baked into the quote
  • Interpreter bundle — the Kunming wedge (§13)
  • Visa/document checklist, travel & stay coordination
🌏

International Search

  • Search partner hospitals abroad by procedure & destination
  • Indicative cost bands per destination, clearly labelled indicative
  • Accreditation, specialties, languages spoken
  • No foreign-doctor video consult at launch — regulatory blocker (§23)
💳

Payments & Transparency

  • bKash · Nagad · Rocket · cards, via a licensed gateway
  • Mandatory fee-disclosure block on every checkout: what we earn, from whom
  • Doctor's fee shown passed-through intact
  • Cash payment supported (ambulance, walk-in)
  • Digital receipt & invoice history
🆘

Grievance & Support

  • "Raise a complaint" on every consult, booking and trip — mandated by §7.5
  • Report a price mismatch at a facility (feeds the price-integrity queue)
  • Help centre & FAQ, bilingual
  • Call-centre fallback number for users who can't complete a flow
⚙️

Personalization

  • Language, text size, notification preferences
  • Data & consent centre — see and revoke every grant
  • Download my data / delete my account
  • Low-bandwidth mode (defers images, audio-only consult)

Design constraint the patient will actually notice

Users are conditioned to expect stars. When they don't see them, the app must say why — a one-line explainer on the directory ("Bangladesh's medical council prohibits rating or ranking doctors. We show verified credentials and published fees instead.") turns a missing feature into a trust signal. This copy is part of the deliverable, not an afterthought.

04 — Doctor App / Portal

Doctor App — every feature

The supply surface for the 134,568 physicians registered with BMDC (Nov 2024). Mobile app for consulting; web portal for schedule and records. Nothing here may be used to promote the doctor, and nothing here pays the doctor for a referral.

🪪

Onboarding & BMDC Verification

  • Self-registration → manual verification queue (§7)
  • Upload: BMDC certificate, NID, degree certificates, chamber proof
  • Ops verifies against verify.bmdc.org.bd and stores the evidence
  • Cannot appear in the directory until verified. Hard gate
  • Registration expiry tracked; auto-delist on lapse, with warning ladder
  • Confirmation the doctor has completed the BMDC telemedicine course (§3.5)
👤

Profile (permitted fields only)

  • Name, gender, languages, Council-approved qualifications & specialist title
  • BMDC registration number — displayed publicly, mandatory
  • Affiliated hospitals, chamber address, contact
  • Fee schedule — new / follow-up / video
  • Free-text "about me" is moderated — superiority claims rejected (§3.2b)
  • No profile photo in promotional contexts; no self-declared "Best…" strings
📅

Availability & Schedule

  • Weekly recurring chamber & video slots
  • Slot duration, buffer, max bookings per session
  • Leave / blackout dates; instant "unavailable today"
  • Separate availability per affiliated hospital
  • Queue view — who is next, who no-showed
🎥

Video Consultation

  • Waiting room; patient identity verification before start (§5.2)
  • Consent status visible — cannot start without patient consent
  • Patient intake, uploaded reports and shared history in-panel
  • In-call notes; chat; file transfer
  • Audio-only fallback — but this downgrades prescribing rights (see drug matrix)
  • Full record-keeping per §5.8.2 — every session logged
💊

E-Prescription (drug matrix enforced)

  • Structured Rx: drug, strength, dose, frequency, duration
  • Drug names rendered in CAPITALS — mandated
  • Server refuses List A drugs unless the session was video
  • Prohibited list (narcotics/psychotropics) — cannot be prescribed at all
  • Digitally signed PDF with the doctor's BMDC number
  • Sending to a pharmacy requires explicit patient consent; patient keeps free pharmacy choice
🧪

Investigation Orders

  • Order tests by name from the canonical catalogue
  • No facility picker. There is no field for it. (§2)
  • Clinical indication captured for the record
  • The patient chooses the lab, later, alone
  • Doctor is never shown which facility was chosen, and earns nothing from it
📁

Patient Records

  • Access only what the patient has explicitly granted, for a bounded period
  • Prior consults, prescriptions, lab reports
  • Every read is audit-logged and visible to the patient
  • Grant expires automatically after the consult window
💵

Earnings

  • Consultation fees, passed through intact — we take no cut of them
  • Settled by the licensed gateway, not by us (§14)
  • Statement, invoice history, tax export
  • No referral bonus. No lab commission. No volume incentive. By design
🤖

Clinical Assist (never autonomous)

  • Structured symptom summary from the patient's intake
  • Drug interaction & allergy flag against the patient's record
  • Prescription template recall
  • Every AI output is labelled "assistive — not clinical advice" and requires doctor action (§7.4)
  • No AI output ever reaches the patient directly
05 — Ambulance Driver App

Ambulance Driver App — every feature

The supply surface for a market with 89.3% idle capacity (IJCCEM, 2022) and — as of 2021 — 4,821 registered ambulances in Dhaka out of 7,076 nationally (BRTA). We are not buying vehicles. We are giving the existing ones a dispatcher and a meter, both of which the market currently lacks entirely.

🪪

Onboarding & Documents

  • Operator/owner and driver registered as separate entities
  • Upload: driving licence, vehicle registration (BRTA), fitness, insurance, NID
  • Vehicle capability declaration: oxygen · ICU kit · ventilator · freezer
  • Photo evidence of equipment required — most "ambulances" are converted microbuses with an often-empty cylinder (Financial Express, 2021); we verify, we don't assume
  • Manual ops approval; document expiry reminders and auto-suspend
🟢

Availability

  • Online / offline toggle; break mode
  • Preferred zones and base location
  • Background location while online, throttled
  • Auto-offline on prolonged inactivity or low battery
📨

Job Offers

  • Offer card: pickup, destination, type required, estimated fare, distance, ETA
  • Countdown accept/reject; loud alert (emergency context — the phone may be in a pocket)
  • Auto-skip on timeout, re-offered to the next candidate
  • Earnings preview before accepting — computed from the same published meter the patient saw
🧭

Navigation & Trip Flow

  • Turn-by-turn to pickup, then to destination
  • Handoff to Google Maps if preferred
  • Flow: Accepted → En route → Arrived → Patient onboard → In transit → Completed
  • Hospital gate notes (which entrance, which floor)
  • Traffic-aware ETA, continuously refreshed
📏

The Meter

  • Live running fare visible to driver and patient simultaneously
  • Distance from GPS trace, snapped to road network
  • Waiting time after a grace period
  • Equipment surcharge (oxygen, ventilator) applied only if declared and verified
  • Fare is computed server-side. The driver cannot alter it in the app
📸

Proof of Trip

  • Odometer photo at start and end
  • Patient/attendant confirmation (OTP or signature)
  • Destination arrival photo
  • Full GPS polyline stored — the audit trail behind every fare
  • Exception reasons: patient not found, refused, diverted, deceased at scene
💵

Earnings

  • Per-trip fare breakdown, itemised the same way the patient sees it
  • Daily/weekly summary; cash-collected vs digitally-settled
  • Platform fee shown transparently as a line item
  • Settlement via the licensed gateway (§14)
🆘

Safety & Support

  • SOS to ops with live location
  • "Blocked at the gate" incident report — syndicates physically obstruct outside ambulances at hospital gates; this is a documented, fatal problem. Reports go straight to ops and to the hospital-partnership log
  • Masked calling with the patient/attendant
  • Cancel with reason codes
📊

Performance (operational only)

  • Acceptance rate, completion rate, response time
  • Document compliance status
  • Cancellation history
  • Used by ops for suspension decisions — not published as a public rating

The syndicate problem is a product requirement, not a footnote

Ambulance syndicates control hospital gates and physically block outside vehicles. A newborn died in Shariatpur in August 2025 after a 40-minute blockade; a 70-year-old died in January 2026 after being held roughly an hour and a half; seven syndicate members were arrested at Rangpur Medical in June 2026. Software does not defeat this. The product response is: (a) gate-access agreements negotiated with partner hospitals before we route a single trip there, (b) a facility-level gate_access flag that determines whether we will dispatch to that hospital at all, and (c) the in-app incident report above, so the pattern is documented rather than absorbed silently by drivers.

06 — Admin & Ops Console

Admin & Ops — the control room

In a regulated marketplace the console is not a back-office convenience — it is where the legal obligations are actually discharged. Verification, price integrity, grievance handling and the audit trail all live here, and all of them are manual by design because the registries have no APIs.

Verification Queue

  • Doctors — BMDC reg. number lookup, evidence capture, approve/reject with reason
  • Facilities — DGHS licence + renewal receipt, number + expiry recorded
  • Ambulances — BRTA registration, fitness, equipment photos
  • SLA timers on the queue; ageing alerts
  • Expiry dashboard — who lapses in 30/60/90 days
  • Every decision signed by a named ops user and immutably logged
🗺️

Live Dispatch Console

  • Live map: every online ambulance, coloured by state
  • Open requests, offers in flight, unmatched escalations
  • Force-assign / broadcast override
  • Stuck-trip and ETA-breach alerts
  • Manual dispatch by phone for call-in patients (a large share of this market still phones)
📋

Listings Management

  • Doctors, facilities, ambulances, test catalogue, packages
  • Content moderation — reject any listing text with a superiority or comparative claim
  • Canonical test catalogue curation (mapping a facility's names to ours)
  • Bulk import of a facility's price list (CSV) with a review step
  • Publish / unpublish / suspend with reason
💰

Pricing Manager

  • Ambulance meter: base, per-km bands, waiting, equipment surcharges, night, inter-district
  • Versioned and effective-dated — every fare traces to the rule version in force
  • Platform fee configuration (patient-side), per module
  • Facility subscription plans (flat, not volume-tied)
  • Exportable price list — for the DGHS licensing declaration (§12.4)
🧮

Finance

  • Transaction ledger — reconciliation view, not a custody view
  • Gateway settlement matching per merchant (hospital/lab/operator)
  • Our platform-fee invoices, raised separately (§14)
  • Cash-collected ambulance trips reconciled against operators
  • Exports: CSV / PDF, VAT-ready
🎧

Dispute & Grievance Centre

  • Mandatory under Telemedicine Guidelines §7.5
  • Ticket queue, assignment, SLA timers, resolution codes
  • Consult disputes, fare disputes, price-mismatch reports
  • Refund initiation (executed by the gateway, not by us)
  • Full audit trail on every resolution
🔍

Price Integrity Queue

  • Patient-reported "the facility charged me more than the app said"
  • Facility price staleness alerts (declared price older than N days)
  • Outlier detection against the catalogue median
  • Repeat offenders are delisted — price accuracy is the product
👥

Users & Staff

  • Patients, doctors, facilities, operators, drivers
  • Staff accounts with RBAC — verification, finance, dispatch, support, content
  • Suspend / ban / restore with reasons and notes
  • Break-glass access to patient data requires a reason, is time-boxed, and notifies the patient
📢

Content & Campaigns (constrained)

  • Banners, health-education content, FAQ, policy pages
  • Broadcast push — the composer physically cannot attach a doctor entity
  • Every non-transactional broadcast passes a compliance review gate before send
  • Template library, all pre-approved
📊

Reports & Analytics

  • Bookings, consults, trips, GMV, fee revenue
  • Ambulance: response time distribution, utilisation, unmatched rate
  • Diagnostics: price spread per test, savings delivered vs the highest listed price
  • Verification: queue throughput, expiry exposure
  • Scheduled exports
📜

Audit & Compliance

  • Append-only audit log across every privileged action
  • Decision-separation report — proves no doctor influenced a lab choice (§2)
  • Consent register — every consent, grant and revocation
  • Data-access log per patient, exportable to the patient
⚙️

System Settings

  • Gateway, SMS, maps, video provider keys
  • Feature flags — ship dark, roll out gradually
  • Localization manager (বাংলা / English copy, editable without a release)
  • Service-area polygons per city
07 — Verification Engine

Verification is the product. It is also entirely manual — deliberately.

Roughly 95% of private facilities are operating on un-renewed licences: only 914 of 19,627 hospitals and clinics (4.66%) and 1,790 of 35,597 diagnostic centres (~5%) renewed (DGHS via The Daily Star, 2025). And around 36,000 of Bangladesh's 134,568 registered physicians — roughly one in four — practise without a renewed BMDC registration (Prothom Alo, 2024). Verification is not a checkbox in this market. It is the differentiator.

🩺

Doctor — BMDC gate

Telemedicine Guidelines §7.1 and §7.2 make this our legal obligation, not the doctor's.

  • Doctor submits BMDC registration number + certificate scan + NID
  • Ops officer looks the number up at verify.bmdc.org.bd — a form-based lookup
  • Evidence stored: screenshot/PDF of the result, timestamped, hashed, tied to the ops user
  • Name, qualification and registration status must match the submission or it is rejected
  • Registration expiry date recorded; re-verification job fires before it lapses
  • Status ≠ verified → the doctor does not exist in the directory. Enforced at the query layer
🏥

Facility — DGHS licence gate

A valid DGHS licence is a hard gate for listing. No licence, no listing, no exceptions.

  • Facility uploads its DGHS licence and the current renewal receipt
  • Ops records licence number, issue date, expiry date, category
  • Cross-checked against DGHS's published lists where they exist (stale PDF dumps, 2020 — no API)
  • Annual re-verification is a scheduled job, not a good intention
  • Expired licence → auto-unpublish with a warning ladder at 60 / 30 / 7 days
  • Displayed publicly: licence number and expiry, on the facility profile

Why we are not building a scraper

BMDC's verification portal is a form-based lookup with no public API and no bulk registry. DGHS publishes facility lists as stale PDF dumps with no API. It would be technically trivial to scrape both and technically reckless to depend on either. An unauthorised scraper in the critical path of a legally-mandated verification obligation is a single ToS change, IP block or markup tweak away from silently failing — while we continue to display "Verified" to patients. So verification is a human workflow with stored evidence, expiry dates and scheduled re-verification. It is slower, it costs ops headcount, and it is the correct architecture. In parallel, we write to BMDC and DGHS requesting a formal data-sharing arrangement — that is the only legitimate path to automation.

Verification state machine

SUBMITTED DOCS_COMPLETE UNDER_REVIEW VERIFIED PUBLISHED EXPIRING_SOON EXPIRED / SUSPENDED REJECTED

Only PUBLISHED entities are returned by any public search, nearby or booking endpoint. The filter lives in the repository layer, not in each controller — so a new endpoint cannot accidentally leak an unverified provider. EXPIRED is reached automatically by a daily scheduler, never by a human forgetting.

EntityEvidence storedRe-verificationFailure mode
DoctorBMDC reg. no., portal lookup capture, certificate, NID, telemedicine-course confirmationBefore registration expiry; ad-hoc on complaintDelisted; active bookings honoured then closed; patients notified
Hospital / ClinicDGHS licence no. + expiry, renewal receipt, trade licenceAnnual + on expiry dateUnpublished; ambulance dispatch to it continues (emergency), booking does not
Diagnostic centreDGHS licence no. + expiry, renewal receipt, price list attestationAnnual + on expiry; price list every 90 daysUnpublished from comparison; existing bookings honoured
Ambulance / operatorBRTA registration, fitness, insurance, driver licence, equipment photosOn each document's expiryAuto-offline; cannot receive offers
Tourism partner (abroad)Accreditation, hospital licence in its own jurisdiction, signed agreementAnnualRemoved from destination browse
08 — Dispatch Engine

Real-time ambulance dispatch — how matching works

Bangladesh's national emergency number, 999, owns no ambulances — it phones private operators, and averages 35–40 minutes to get a vehicle moving against a 15-minute clinical survival benchmark (BSS, 2025). There is no dedicated prehospital EMS in the country (TraumaLink / GHSP, 2022), no dispatch structure and no SOPs (Hossain et al., IJCCEM, 2022). This engine is the dispatch structure.

LIVE
🎯

Matching algorithm

Candidates are filtered hard, then scored — clinical capability first, distance second.

  • Hard filter: capability required (ICU / oxygen / ventilator / freezer) — a normal van is never offered an ICU call
  • Hard filter: documents valid, driver online, not on a trip
  • Geo query: nearby candidates via PostGIS ST_DWithin over an indexed live-location table, mirrored into Redis GEO for hot reads
  • Score: road-network ETA (not straight-line), acceptance rate, heading toward pickup, time since last trip
  • Exclude drivers who rejected this request, and drivers who cancelled on this patient before
  • Gate check: if the destination hospital has gate_access = false, ops is warned before dispatch
📡

Offer cycle

Deterministic, tunable, and aggressive — because the clock is a survival clock.

  • Batch-of-N offer by default for emergencies (fastest accept wins), sequential for scheduled transfers
  • Per-offer timeout (target 20–30s), then the next batch
  • Expanding radius — 3km → 6km → 10km → city-wide
  • Escalate to the ops dispatch console after N rounds; a human phones an operator directly
  • Auto re-assign on driver cancel or no-show, with the meter reset
  • Every offer, rejection and timeout is logged — this is how we learn the real supply curve

Ambulance trip state machine

REQUESTED MATCHING ASSIGNED EN_ROUTE ARRIVED PATIENT_ONBOARD IN_TRANSIT AT_DESTINATION COMPLETED CANCELLED / UNMATCHED / ABORTED

Guarded transitions: PATIENT_ONBOARD requires the start-odometer photo; COMPLETED requires end-odometer + attendant confirmation. The meter starts at PATIENT_ONBOARD, not at ASSIGNED — the patient is not charged for the ambulance's approach. That single decision is a trust statement and it is hard-coded. Each transition emits a domain event consumed by the meter, notifications and the trip ledger.

What dispatch deliberately does not do

No surge pricing. A logistics marketplace surges when demand spikes. An ambulance marketplace that raises the price when someone is dying is indefensible, and it would hand our entire brand argument to the syndicates we are displacing — they already charge 2–3× the government's Tk 35–40/km reference rate. The meter is fixed, published, and does not know what time it is or how many people are calling. Night and inter-district bands exist and are published in advance; they are not dynamic, and the multiplier is bounded and visible in the app before booking.

09 — Metered Pricing Engine

The meter — the core IP of this platform

There is no meter, no universal rent chart, no monitoring authority and no national ambulance policy in Bangladesh — a draft was submitted in 2016 and never acted on (Financial Express, 2021). The government's own reference rate is Tk 35–40/km; syndicates charge 2–3× it. A Mymensingh→Dhaka trip that should cost Tk 7,000–8,000 is billed at Tk 8,000–15,000 (Prothom Alo, 2025). Building a published, deterministic, distance-based meter is the single most valuable thing this software does.

📐

Anchored, not invented

The per-km rate is anchored on the government's published Tk 35–40/km reference. We are not setting a price; we are enforcing the one that already exists on paper.

🔒

Deterministic

Same inputs → same fare, every time. The fare is a pure function of the rule version, the routed distance, the waiting time and the declared equipment. Nothing else.

🧾

Auditable

Every fare stores its rule version, its GPS polyline, its distance derivation and its itemised components. A disputed fare can be reconstructed line by line, months later.

ComponentHow it is calculatedConfigurableRationale
Base fareFlat start fee per ambulance typeYes — per type, per cityCovers callout & approach; the approach distance itself is not billed
DistancePer-km rate × routed distance, snapped to the road network from the GPS traceYes — bandedAnchored to the govt Tk 35–40/km reference rate. This is the heart of the meter
Distance bandsOptional taper on long inter-district trips (rate/km falls above X km)YesMakes long transfers economic without gouging — the exact case syndicates exploit
WaitingFree grace period, then per-minuteYesHospital admission queues are long; the driver's time is real, but the grace protects the patient
Equipment surchargeAdditive: oxygen · ventilator · ICU kit · freezerYes — per itemOnly applied if the vehicle's equipment was verified at onboarding. No verification, no surcharge
Attendant / paramedicAdditive, if the operator provides one and it is declaredYesMost vehicles carry no trained paramedic; where one exists it is a real, chargeable service
Night bandFixed, published multiplier within a fixed time windowYes — bounded & cappedPublished in advance. Not dynamic. Not surge. Visible before the patient confirms
Return / one-wayInter-district return leg policy, explicitYesThe single biggest source of opaque overcharging on long transfers
Toll / ferry pass-throughAt cost, receiptedYes — per corridorPassed through at cost with no margin, and shown as such
Platform feeSeparately itemised patient-side service feeYesNever hidden inside the fare. §4.2.2 disclosure obligation
TotalSum of the above, itemised, shown live during the tripThe receipt the market has never had

Estimate vs final fare

1
Pre-booking estimate

Computed from the routing engine's predicted distance and the active rule version. Shown as a range, with the per-km rate and every surcharge itemised before the patient confirms. Nobody in this market does this today.

2
Live meter during the trip

Recomputed server-side from the actual GPS trace, throttled to a few updates a minute. Driver and patient see the identical number on their screens at the same moment. There is no version of the fare that only the driver can see.

3
Final fare at completion

Recomputed from the completed, road-snapped polyline. If it exceeds the top of the quoted range by more than a configurable tolerance, it is capped at the quoted maximum and the overage is flagged to ops for review — a route deviation is our problem to investigate, not the patient's to pay for.

4
Receipt & audit

Itemised receipt with the rule version, the distance, the map trace and each component. Stored immutably. Any dispute is resolved against this artefact, not against a driver's word.

Fare rules are versioned, effective-dated and exportable

A fare rule is never edited in place. Publishing a change creates a new version with an effective-from timestamp; every trip stores the fare_rule_version_id it was priced under. This gives us three things at once: correct historical reconstruction of any fare; a defensible answer to a dispute or a regulator; and a single exportable price-list artefact — which matters because the DGHS National Telehealth Guideline requires a provider to declare a price list at licensing, approved by the authority. The pricing manager exports exactly that document.

Diagnostic and consultation prices are not set by this engine. Those are declared by the facility and the doctor respectively, and we display them. We price only what we operate: the ambulance trip, and our own separately-itemised platform fee.

10 — Telemedicine & E-Prescription Engine

Video consult — legal, and full of hard duties

Paid video consultation is explicitly legal under the BMDC Telemedicine Guidelines (July 2020), §5.8.3.1. But §7 loads the platform — not the doctor — with a list of obligations, and §7.6 gives BMDC the power to blacklist a platform, after which no registered doctor may use it. That is an extinction event. This engine is built to make it impossible.

LIVE
🎥

Consult room

WebRTC, media served from inside Bangladesh.

  • 1:1 video; audio-only fallback on weak networks
  • SFU + TURN hosted in-country — media may not transit an offshore relay
  • Identity verification on both sides before the room opens (§5.2)
  • Waiting room, join tokens, single-use, short-lived
  • Network-quality indicator; graceful degradation to audio, then chat
  • Session metadata (start, end, mode, participants) is immutable
✍️

Consent & record-keeping

Not a checkbox — a legal artefact.

  • Explicit patient consent captured before every consult (§5.4), versioned text, timestamped
  • Consent to the consult, to record-keeping, and separately to any pharmacy transmission
  • Full record-keeping per §5.8.2 — every consult produces a durable record
  • Consult mode (video / audio / text) is recorded, because it determines prescribing rights
  • Patient can download or revoke; revocation is logged, never silently applied
🤖

AI boundary — §7.4

"AI/ML may not counsel or prescribe." We take this literally.

  • AI may: structure the patient's symptom intake; flag drug interactions to the doctor; transcribe; suggest a specialty for search
  • AI may not: answer a clinical question for the patient, triage autonomously, generate a prescription, or recommend a treatment
  • No AI output reaches a patient without a doctor's explicit action on it
  • Every assistive output is labelled and logged with its model version
  • There is no "ask our AI doctor" surface. There never will be

The drug matrix — enforced server-side, not in the UI

This table is law, and it is implemented as a server-side guard on the prescription API. A doctor cannot bypass it by using a modified client, because the client never makes the decision.

ListPermitted consult modeWhenExamplesEnforcement
List OAny — video, audio or textAny consultOTC: paracetamol, ORS, antacids, antihistaminesAlways allowed
List AVIDEO ONLYFirst consult or refillAntifungals, eye drops, chronic refills (diabetes, hypertension, asthma)API rejects the item if session.mode != VIDEO. The doctor sees why
List B-1AnyFollow-up onlyAdd-on medicationsAPI rejects unless a prior consult with this doctor exists for this patient
ProhibitedNEVERNeverNarcotics & psychotropicsNot in the formulary. Cannot be selected, cannot be free-texted past validation

Additional hard rules baked into the prescription generator: drug names render in CAPITALS; the doctor's name, qualification and BMDC registration number appear on every prescription; transmission to a pharmacy requires explicit patient consent; and the patient retains free choice of pharmacy — which is precisely why we do not build exclusive pharmacy tie-ups, however commercially attractive they look.

Consultation state machine

SLOT_BOOKED PAID CONSENT_GIVEN WAITING_ROOM IN_CONSULT PRESCRIBED CLOSED NO_SHOW / CANCELLED / REFUNDED

IN_CONSULT is unreachable without CONSENT_GIVEN. PRESCRIBED is guarded by the drug matrix against the recorded session.mode. Nothing in the flow can be skipped by a client-side change.

11 — Health Records (EHR)

The record belongs to the patient

A longitudinal record vault that outlives any single consult, facility or doctor — structured from day one to interoperate with the national health record exchange rather than to lock a patient into us.

📁

What's in the vault

  • Consultations (in-person & video) with notes the doctor chose to share
  • E-prescriptions — structured, not just PDFs
  • Lab reports — structured results where the facility can send them, PDF/image otherwise
  • Uploaded paper records, OCR-indexed and searchable
  • Ambulance trip records (relevant to trauma history)
  • Allergies, chronic conditions, blood group, medications
🔑

Consent & access

  • Default: nobody but the patient can read anything
  • Patient grants a doctor access for a bounded window, per consult
  • Grants are revocable instantly, and revocation is logged
  • Every read is audit-logged and shown to the patient in a "who saw my data" view
  • Break-glass access by ops requires a reason and notifies the patient
  • Family vaults: an adult can hold records for dependants, with an explicit relationship record
🔗

NDHIE / SeHR interoperability

  • Records carry Health ID + NID where the patient provides them
  • Structured to the national exchange's expected shape — FHIR-aligned resources internally
  • Export & (when the interface opens) push to NDHIE / SeHR
  • Integration is designed for and stubbed in Phase 2; go-live depends on DGHS granting access
  • No record is shared with any foreign entity or government — prohibited outright

Storage & residency — non-negotiable

The DGHS National Telehealth Guideline §5(6) requires health data to be "seated within the territorial jurisdiction of Bangladesh," and §5(10) prohibits overseas cloud hosting unless the provider has at least one data centre inside Bangladesh. So: the primary database, the object store holding every report and prescription, the backups, the video TURN/SFU relays and the log store are all in-country. Records are encrypted at rest with per-tenant keys; the object store is private with short-lived signed URLs; and no analytics pipeline exports raw PHI anywhere. See §19 and §22 for how this is actually deployed.

13 — Medical Tourism Module

Multi-destination, fee-transparent, and honest about what we can't legally ship

Bangladeshis spend US$4–5 billion a year on treatment abroad — more than the entire national health budget. That figure comes from Ahsan H Mansur, Governor of Bangladesh Bank (2025), alongside DCCI, on roughly 450,000–800,000 patient journeys a year. This is the only line in the platform with a ticket size that can carry a commission. It is also the one with the sharpest regulatory edge.

🔴 The one thing we do not build at launch

A "video-consult a foreign specialist before you travel" feature is the obvious product. It is also a regulatory problem: the DGHS National Telehealth Guideline (§3.3.1g) indicates that overseas physicians need a licence to practise in Bangladesh, and the BMDC Telemedicine Guidelines limit practice to Bangladeshi territory (§3.4). A cross-border teleconsult between an Indian specialist and a Dhaka patient, brokered by us, is not clearly lawful. Note also that Rhythm Group (BD) and Manipal Hospitals (India) announced exactly this in April 2026 — a medical-tourism deal that includes a digital video-consultation platform for pre-travel consults. Somebody is already shipping it. That is not a reason for us to; it is a reason to get a written legal opinion (§23) and let them find out first. Until we have that opinion, the tourism module ships enquiry, quotes, documents and logistics — not a consult room.

✈️

What ships

  • Destination browse — India, Thailand, China (Kunming), Malaysia. Multi-destination by design
  • Case submission — reports, diagnosis, question; routed to partner hospitals
  • Itemised quote comparison — procedure, hospital stay, travel, accommodation, and our fee as a separate line
  • Document workflow — visa checklist, medical visa invitation letter, passport, reports, appointment letter
  • Interpreter bundle (below)
  • Travel & stay coordination; a case manager assigned per patient
  • Post-travel: reports flow back into the patient's record vault (§11)
🗣️

The Kunming interpreter wedge

The sharpest monetisable insight in the research.

  • China/Kunming is new and state-backed — first patients arrived March 2025, ~600 treated by August 2025, with one-day "green channel" visas and costs around a quarter of Thailand's
  • Its binding constraint is language — and that constraint is already priced: an interpreter costs roughly Tk 9,000 (¥500) for the first session, then ¥200–300/hour
  • So we productise it: a vetted Bengali interpreter, booked and priced up front, bundled into the quote as a visible line item
  • Interpreter is a first-class entity: vetted, scheduled, rated internally by ops (not publicly — see §2), paid through the same disclosed-fee structure
  • This is a concrete, sellable product, not a positioning statement

Destination context the module must encode

DestinationWhat the data saysProduct implication
India~50–60% of journeys. Cheapest, land border, no visa fee (Tk 1,500 processing). Bangladeshi medical arrivals: ~449,000 (2023) → 482,336 (2024) → 325,127 (2025). India reopened all visa categories to Bangladeshis on 28 June 2026, after a roughly two-year freeze, with an automated time-slot system across all five IVACs from 1 July 2026Do not build "India is closed" into the product. India is recovering fast and is the default destination. Visa-slot availability is a live data point worth surfacing
Thailand~65,000 BD patients/yr; 60% of all BD visa applications to Thailand are medical (~9,000/month). But ~80% of patients consider Thailand only after an Indian visa failure and abandon it on learning costs are 10–15× India'sThe quote comparator must show the cost gap honestly and early, or we waste the patient's time and our own. Cardiac stent: India ~$2,000 vs Thailand $5,000–20,000 (Al Jazeera, Jan 2025)
China / KunmingNew, state-backed, ~1/4 of Thailand's cost, one-day green-channel visas, Bengali/English interpreters and halal food availableThe interpreter bundle. The highest-margin, most differentiated offer we have
MalaysiaRecord revenue from BD patients in 2025; 10,800+ BD health travellers to Feb 2026. MHTC ran Malaysia Healthcare Week in Dhaka on 8 April 2026 and its CEO publicly said they want partnerships with local healthcare facilitatorsA government-backed warm lead. Business development, not engineering — but the module must support a formal partner integration when it lands

Facilitator commissions in this industry typically run 10–15%, up to 30%, with quotes padded 25–35% — and the fee is baked invisibly into the patient's bundled quote. That opacity is the thing we disrupt: our fee is a separate, named line on the quote. Note that no verified Bangladesh-specific commission rate exists publicly — 10–15% is our working assumption for modelling, and it is labelled as an assumption everywhere it appears, including in the admin console.

14 — Payments Architecture

We never touch the patient's money

This is the second architecture-rewriting constraint after advertising. The obvious design — patient pays us, we hold it, we settle out to the hospital minus our cut — puts us squarely in Payment System Operator territory. The draft PSO Regulation 2025 requires a Trust & Settlement Account, makes directors and the CEO personally liable for any shortfall, and carries a licence fee of Tk 5,00,000. Running a wallet is worse still — that is PSP/MFS licensing. So we do not do it.

🚫

The architecture we are NOT building

  • Patient → our account → hospital/lab/doctor, minus our cut
  • A platform wallet the patient tops up
  • Holding funds in escrow between booking and service
  • Netting our fee out of the doctor's consultation fee

Every one of these is a licensed activity, and the personal liability of the directors is the reason to take it seriously.

The architecture we ARE building

  • A licensed gateway — SSLCommerz / aamarPay / ShurjoPay — sits between patient and provider
  • The hospital / lab / ambulance operator is the merchant-of-record, or the gateway performs split-settlement directly to them
  • Funds move gateway → provider. They never enter our bank account
  • Our platform fee is invoiced separately — either as a split leg the gateway settles to us, or as a monthly invoice to the provider
  • The doctor's consultation fee is passed through intact. We take no cut of it (§4.3.2)
  • Our ledger is a reconciliation ledger, not a custody ledger. It records what the gateway did; it never holds a balance

Money-flow topology

Payer
PatientbKash · Nagad · Rocket · card · cash
▼ pays the provider, via ▼
Licensed Gateway (SSLCommerz / aamarPay / ShurjoPay)
Merchant-of-record= the hospital / lab / operator
Split-settlementprovider leg + platform-fee leg
RefundsInitiated by us, executed by the gateway
▼ settles directly to ▼
Payees — funds never pass through Niramoy
Hospital / Diagnostic centreService revenue
DoctorConsultation fee — intact
Ambulance operatorMetered fare
NiramoyPlatform fee only — invoiced / split leg
▼ we only observe ▼
Our systems
Reconciliation ledgerAppend-only, no balances held
Fee-disclosure rendererMandatory on every checkout
Invoice engineVAT/BIN-ready

🔴 The engineering pre-condition: confirm split-settlement IN WRITING first

This entire topology depends on the chosen gateway actually supporting merchant-of-record-per-provider or split-settlement. If it does not, the architecture changes materially and the legal exposure changes with it. Get written confirmation from SSLCommerz / aamarPay / ShurjoPay before a line of payment code is written. This is a Phase 0 task, not a Phase 3 discovery. Indicative MDR for planning only (get written quotes): cards ~2.0–2.5%, MFS ~1.5–2.1%, setup Tk 4,000–25,000, settlement T+1 to T+3.

The fee-disclosure block — a rendered component, not a policy

BMDC Code §4.2.2 is the one clause in the entire code that contemplates an intermediary like us — and what it demands is full financial disclosure to all parties. So disclosure is a UI component with a database-backed source of truth, rendered on every checkout screen and every invoice, in both languages. It states: what the provider charges, what we charge, who pays us, and what we do not receive.

LineExampleWho receives it
Consultation feeTk 800The doctor — in full, unreduced
Platform service feeTk 40Niramoy — for booking, records and support
Payment processingTk 16The licensed gateway
You payTk 856
We receive no commission from any doctor, hospital, laboratory or pharmacy for sending you to them. This sentence renders on the same screen. It is the brand.

Cash remains a first-class path — for ambulance trips especially, where the patient may have no phone charge and no time. A cash trip is recorded against the operator, reconciled in the admin console, and our fee is invoiced to the operator monthly. Cash does not mean unmetered: the fare is still computed server-side and the receipt is still itemised.

15 — Booking & Order Lifecycles

Five transaction types, five state machines

Each is an explicit, guarded state machine emitting domain events. Nothing changes state by direct database write; every transition is a command with a precondition, and every transition emits an event consumed by notifications, the ledger and the audit log.

Lab / investigation booking — where the decision separation lives

🩺ORDER_ISSUED (doctor · test only, no facility) 🧑PATIENT_COMPARES (price-sorted, licensed centres) FACILITY_CHOSEN BOOKED SAMPLE_COLLECTED IN_PROCESS REPORT_READY DELIVERED_TO_RECORD

The gap between ORDER_ISSUED and FACILITY_CHOSEN is the most important gap in this system. The doctor is on one side of it and never crosses. Both events are written to decision_audit with actor and timestamp.

Appointment (in-person)

SLOT_HELD CONFIRMED REMINDED ATTENDED CLOSED NO_SHOW / CANCELLED

Video consultation

SLOT_BOOKED PAID CONSENT_GIVEN IN_CONSULT PRESCRIBED CLOSED

Ambulance trip

REQUESTED MATCHING ASSIGNED EN_ROUTE ARRIVED PATIENT_ONBOARD (meter starts) IN_TRANSIT COMPLETED

Medical tourism case

ENQUIRY CASE_SUBMITTED QUOTES_RECEIVED DESTINATION_CHOSEN DOCS_IN_PROGRESS VISA_GRANTED TRAVELLED TREATED RECORDS_RETURNED

Event-sourced where it matters. The ambulance trip, the consultation and the lab order are event-sourced: the current state is a projection, and the event log is the truth. This is what makes a fare dispute, a prescription challenge or a regulatory audit answerable months later — we can replay exactly what happened, in order, with who did it. Appointments and tourism cases use a simpler state column with a transition log, because the audit stakes are lower.

16 — Data Model

Core entities

The relational backbone. Spatial columns are GiST-indexed; clinical and financial tables are append-only; and the entities that regulation cares about carry their constraints in the schema, not in application code.

EntityKey fieldsNotes & constraints
Patientphone, name, sex, dob, blood_group, nid?, health_id?OTP identity; family members via Dependant
Doctorbmdc_reg_no (NOT NULL), bmdc_expiry, qualifications[], specialty, languages[], gender, fee_scheduleNo rating, no review_count, no is_sponsored column exists. Compliance is enforced by absence
Facilitytype, dghs_licence_no, licence_expiry, location geography(Point), services[], gate_accessUnpublished automatically on licence expiry. GiST index on location
Verificationsubject_type, subject_id, status, evidence_uri, verified_by, verified_at, expires_atAppend-only. The legal artefact behind every "Verified" badge
Test (catalogue)canonical_name, bn_name, synonyms[], category, sample_typeOps-curated canonical catalogue; facility names map onto it
FacilityTestPricefacility_id, test_id, price, declared_at, turnaround, home_collectionFacility-declared and timestamped. Stale prices are flagged; the price-integrity queue works this table
Packagefacility_id, name, test_ids[], bundle_priceBundle vs sum-of-parts shown honestly
InvestigationOrderdoctor_id, patient_id, test_ids[], indication🔴 Has NO facility_id column. Structurally cannot name a lab
LabBookingpatient_id, order_id?, facility_id, test_ids[], price_snapshot, state🔴 facility_id is set only by a patient action. No doctor payout links to this table
Appointmentdoctor_id, patient_id, facility_id?, slot, stateIn-person chamber booking
Consultationdoctor_id, patient_id, mode (VIDEO/AUDIO/TEXT), consent_id, started_at, ended_atmode is what the drug matrix is enforced against. Immutable once closed
Prescriptionconsultation_id, items[], signed_pdf_uri, doctor_bmdc_noDrug names CAPITALS; items validated against the drug matrix server-side
DrugFormularyname, list_class (O / A / B1 / PROHIBITED), generic, strengthPROHIBITED rows are unselectable. The matrix is data, and it is versioned
Consentpatient_id, scope, text_version, granted_at, revoked_atAppend-only. Consent is never overwritten, only superseded
RecordItempatient_id, type, source, file_uri, structured_payload (FHIR-aligned)Encrypted at rest, in-country object store, signed short-lived URLs
RecordGrantpatient_id, doctor_id, scope, expires_atTime-boxed, revocable. Every read against it is logged
Ambulanceoperator_id, reg_no, type, capabilities[], equipment_evidence_uri, live_locationCapabilities are verified before they can attract a surcharge
AmbulanceTrippatient_id, ambulance_id, state, pickup, destination, polyline, fare_idEvent-sourced. Polyline is the audit trail behind the fare
Farefare_rule_version_id, base, distance_km, distance_amt, waiting, equipment[], night_band, tolls, platform_fee, totalItemised. Reconstructible. Never edited — corrections are new rows
FareRuleVersioncity, per_km_bands, base, surcharges, effective_from, published_byVersioned & effective-dated. Exportable as the DGHS price-list declaration
PaymentIntentgateway_ref, merchant_of_record, amount, provider_leg, platform_leg, statusRecords what the gateway did. Holds no balance
PlatformInvoicecounterparty, period, lines[], vat, totalOur fee, invoiced separately. Never netted out of a doctor's fee
TourismCasepatient_id, destination, partner_id, quotes[], interpreter_booking_id?, stateFee is a named line on every quote
Interpreterdestination, languages[], rate, vetted_atThe Kunming bundle as a first-class entity
Grievancesubject_type, subject_id, category, sla_due, resolutionMandatory under Telemedicine Guidelines §7.5
decision_auditactor_type, actor_id, action, subject, payload, at🔴 Append-only. Proves the doctor never chose the lab
audit_logactor, action, entity, before, after, ip, atEvery privileged action. Append-only, tamper-evident
Translationlocale, key, valueবাংলা / English copy editable without a release

Note the three rows marked 🔴. Between them they encode the two hardest legal constraints in the entire system — the absence of a rating column, the absence of a facility column on the doctor's order, and the append-only proof that the two decisions stayed apart. A developer cannot violate BMDC §4.3.1 through this schema without a migration, and a migration gets reviewed.

17 — API & Integrations

Interfaces in and out

🔌

Platform API

  • REST for actions, WebSocket for live state (trips, meter, consult signalling)
  • Versioned (/v1), JSON, OpenAPI documented, typed client generated for Flutter
  • JWT auth with refresh rotation; device binding; OTP login
  • Idempotency keys on every write — a patient double-tapping "book ambulance" must not create two trips
  • Rate limiting per client and per endpoint; stricter on OTP and search
  • Repository-level publication filter — unverified providers cannot leak through a new endpoint
  • Field-level authorization on all clinical data; every PHI read is audit-logged
🤝

Integrations

  • Payments — SSLCommerz / aamarPay / ShurjoPay behind one gateway interface (bKash, Nagad, Rocket, cards)
  • Maps & routing — MapLibre + tiles; directions/distance-matrix behind a provider interface (Google Maps as a drop-in alternative)
  • Video — LiveKit (self-hosted, in-country) with Agora as a fallback adapter only if it can serve media from a BD point of presence
  • Push — Firebase Cloud Messaging (tokens only; no PHI in a notification payload, ever)
  • SMS — local BD gateway for OTP & ambulance alerts, behind a provider interface
  • NDHIE / SeHR — designed for, stubbed in Phase 2, live when DGHS grants access
  • BMDC / DGHSno public API exists. Manual ops workflow (§7); data-sharing request in parallel
  • Facility LIS/HIS — optional CSV/SFTP or webhook ingest of results for the larger chains

Adapter pattern throughout. Payments, SMS, maps, video and push each sit behind a clean interface. The core booking/dispatch/pricing logic calls the interface, never a vendor. This matters more here than in a normal build: if the chosen gateway turns out not to support split-settlement (§14), or the video vendor cannot serve media from inside Bangladesh (§11), we swap the adapter — we do not rewrite the platform.

18 — Security & Reliability

This is health data. The bar is higher.

Bangladesh's Personal Data Protection Act was passed by Parliament on 10 April 2026 (deemed effective from 6 November 2025), and the Cyber Security Ordinance 2025 (gazetted 21 May 2025) replaced the Cyber Security Act 2023. Combined with the DGHS residency rules, the security model is not a checklist item — it is a licensing condition.

🔐

Auth & Access

  • OTP + JWT, refresh rotation, device binding
  • RBAC for ops staff — verification, finance, dispatch, support, content are separate roles
  • Break-glass PHI access: reason required, time-boxed, patient notified
  • MFA mandatory for every admin account
🛡️

Data Protection (PDPA + DGHS)

  • All health data hosted inside Bangladesh — DGHS §5(6), §5(10)
  • TLS in transit; encryption at rest on DB, object store and backups
  • PII/PHI masked in logs; no PHI in a push payload or a URL
  • Retention & deletion policy; patient-initiated export and erasure
  • No sharing with any foreign entity or government
📜

Auditability

  • Append-only audit_log on every privileged action
  • decision_audit — the referral-separation proof (§2)
  • Consent register: every grant, every revocation
  • "Who accessed my records" view, exposed to the patient
🕵️

Fraud & Abuse

  • GPS spoofing / mock-location detection on the driver app — a fake trace is a fake fare
  • Fare anomaly detection against the routed distance
  • Multi-account and OTP abuse controls
  • Facility price-manipulation flags (advertise low, charge high)
💾

Reliability

  • Automated backups in-country, with restore drills — not just backup jobs
  • Health checks & graceful degradation (if video fails, the consult falls back to audio, then to chat)
  • Idempotent jobs and retries throughout
  • Emergency path is the last thing to degrade: if search is down, ambulance dispatch still works
📟

Observability

  • Error tracking (self-hosted Sentry, in-country)
  • Structured logs, metrics, traces — PHI-scrubbed at the emitter
  • Uptime, queue depth, dispatch-latency and offer-timeout alerting
  • A dispatch failure pages someone. A marketing dashboard does not
19 — Scalability & Performance

Built for Dhaka first, then the rest of the country

➡️

Stateless API

Horizontally scaled behind a load balancer; shared state in Redis and Postgres, never in the process. Adding capacity is adding a container.

🗄️

Database

PostgreSQL primary + read replica. GiST indexes on all geography columns. High-volume tables (location pings, audit) partitioned by day.

📍

Geo at scale

Live ambulance positions in Redis GEO for hot lookups, persisted to Postgres/PostGIS for the audit trail. Throttled ingestion keeps writes bounded as the fleet grows.

Caching

Redis for the test catalogue, facility prices, fare rules and — critically — routing results. Map API calls are the single biggest variable cost in the system and are cached hard.

🧵

Async workers

BullMQ queues for notifications, PDF generation, OCR, re-verification schedules and reconciliation. Nothing slow ever blocks a request — least of all a dispatch request.

🎥

Video at scale

The SFU scales independently of the API. Consult concurrency is the metric to watch; it is the only component whose cost grows with minutes rather than requests.

🌍

Multi-city

Service areas are polygons; fare rules and supply are scoped to a city. Launching Chattogram is configuration and supply onboarding, not a rebuild.

📉

Realistic load

This is not a ride-hailing fleet. Ambulance concurrency in Dhaka is measured in dozens, not thousands. We engineer for correctness and auditability first, and for throughput second — honestly.

📱

Client performance

Android-first, low-end device targets, aggressive payload trimming, offline-tolerant record vault. 4G coverage is national, but device quality is not uniform.

20 — Technology Stack

What we build it with, and why

LayerTechnologyWhy this, here
Mobile (3 apps)Flutter (Dart)One codebase → iOS + Android across Patient, Doctor and Driver apps. That is the single biggest cost lever in an 18–22 week build with a small team. Strong on low-end Android, which is the actual device base
Web (Admin/Ops, Doctor portal)Next.js + TypeScriptShares types with the API; server-rendered admin is fast on poor connections
BackendNestJS (Node, TypeScript), modularOne language across API, web and workers — a small team cannot afford two ecosystems. Strong module boundaries map cleanly onto our eight engines. First-class WebSocket support for the live meter and dispatch. (Laravel is a defensible alternative if the delivery team's depth is PHP — the architecture does not depend on the choice.)
DatabasePostgreSQL 16 + PostGISNon-negotiable. Nearby, service-area polygons, ambulance matching and route traces are all geospatial. PostGIS does this natively with GiST indexes; MySQL does not do it properly. Postgres also gives us partitioning, JSONB for FHIR-aligned payloads, and full-text search — so no separate search cluster in v1
Cache / live stateRedis (+ Redis GEO)Hot driver positions, offer locks, fare-rule cache, routing cache, pub/sub backplane for WebSocket fan-out across API instances
QueueBullMQ on RedisNotifications, PDFs, OCR, re-verification schedules, reconciliation. Retries and dead-letter handling out of the box
Real-timeWebSocket (Socket.IO / native) + Redis pub/subLive meter, trip tracking, dispatch offers, consult signalling
VideoLiveKit (self-hosted WebRTC SFU + TURN)Chosen specifically because it can be self-hosted inside Bangladesh. A managed SaaS whose media relays sit in Singapore fails DGHS §5(10). Agora remains a pluggable fallback only if it can demonstrably serve media from a BD point of presence
MapsMapLibre + vector tiles; routing behind a provider interfaceMapLibre avoids per-view licensing on a high-traffic map surface. Routing/distance-matrix stays behind an interface so Google Maps can be swapped in where accuracy justifies the cost
PaymentsSSLCommerz / aamarPay / ShurjoPayLicensed BD gateways covering bKash, Nagad, Rocket and cards. Chosen on split-settlement support (§14) — that capability, confirmed in writing, is the selection criterion
Push / SMSFCM + local BD SMS gatewayNotifications and OTP. SMS is the fallback when the app cannot reach a patient in an emergency
Object storageS3-compatible, hosted in BangladeshReports, prescriptions, verification evidence, proof-of-trip photos. Encrypted, private, signed short-lived URLs
HostingIn-country BD datacentre / BD cloud region🔴 Mandatory. DGHS §5(10) prohibits overseas cloud unless the provider has a BD data centre. We do not propose a Singapore or US region. Provider selection is a Phase 0 task with hard requirements: BD DC, managed Postgres or competent DBA support, and an SLA
OpsDocker, CI/CD, self-hosted Sentry, uptime monitoringReproducible deploys; observability that does not export PHI offshore

The two stack decisions that are actually forced

🗺️

PostgreSQL + PostGIS

Not a preference. A requirement.

  • Nearby search, ambulance matching, service-area polygons and route traces are the product
  • PostGIS gives correct spherical distance, GiST indexing and polygon containment natively
  • Bolting geo onto MySQL, or onto Redis alone, means reimplementing it badly and losing the audit trail
🇧🇩

In-country hosting

The stack decision that most teams get wrong.

  • DGHS §5(10) prohibits overseas cloud hosting of health data unless the provider has a BD data centre
  • This rules out the reflexive "ap-southeast-1" default — including for the video relay and the backups
  • It affects vendor choice for video (hence LiveKit self-hosted), error tracking (hence self-hosted Sentry) and object storage
  • It is cheaper to design for on day one than to migrate into on day 200
Dockerized services CI/CD pipeline Staging + Production Env-based secrets Zero-downtime deploys Automated in-country backups Feature flags PHI-scrubbed logging
21 — Work Plan & Methodology

How we run the build — ~18–22 weeks

Iterative delivery in two-week sprints, each ending with a working demo on staging. The one thing that is not negotiable is Phase 0: legal opinion and supply-side validation happen before a line of production code, because both can invalidate the architecture.

🔁

Agile sprints

2-week cycles: plan → build → demo → feedback. Scope stays flexible, direction stays yours.

🎯

Milestone gated

Each phase ends with a reviewable deliverable and a go/no-go checkpoint.

🧪

Test as we go

Pricing math, state transitions and the drug matrix ship with tests. These are the parts where a bug is a legal event.

💬

Weekly sync

Progress, staging link, blockers, next-sprint plan — in writing.

Phase plan

PhaseWeeksDeliverableExit criteria
0 · Pre-code 🔴1–2Written legal opinion from a Bangladeshi lawyer on the §23 risk register. Written confirmation of gateway split-settlement. ~20 supply-side validation calls to hospitals, diagnostic centres and ambulance operators. Hosting provider selected (BD DC). Final scope, screen list, API contractLegal opinion in hand. Gateway capability confirmed in writing. Supply-side willingness to list — validated or the model changes. Signed-off spec & data model
1 · Foundation3–5UI/UX (bilingual), DB + PostGIS schema, auth, base API, Verification Engine + admin verification queue, in-country infraA doctor and a facility can be verified end-to-end on staging, with stored evidence
2 · MVP: trust wedge + volume engine6–12Patient App (search, nearby, directory, lab price comparison, checkup packages) · Ambulance (driver app, dispatch engine, metered pricing, proof of trip) · Admin/Ops (dispatch console, listings, pricing manager) · payments via gatewayA real ambulance trip, dispatched, metered, paid and receipted, on staging. A real lab booking with a price comparison and a disclosed fee
3 · Telemedicine & records13–18Doctor App · video consult (in-country SFU) · consent capture · e-prescription with the drug matrix enforced · health records vault · grievance centre · NDHIE-ready exportA video consult produces a compliant, signed e-prescription. A List A drug is refused on an audio session. Records land in the vault
4 · Tourism & international19–20Medical tourism module (multi-destination, itemised quotes, interpreter bundle, document workflow), international searchA tourism case runs enquiry → quote → document workflow, with our fee as a visible line
5 · Hardening & launch21–22Load test on the real-time paths, security review, compliance walkthrough against §2, store submission, ops training, handoverLive on both stores. Ops team trained on the verification queue — because that is the job that never stops

🔴 Phase 0 is not a formality, and it is not padding

Three findings in Phase 0 could each change the architecture: (1) a lawyer confirming that a facility-side technology fee is prohibited would force the revenue model onto flat SaaS alone; (2) a gateway that cannot do split-settlement would force a different payments topology; (3) hospital chains refusing to list at all — which no public source confirms they would accept — would change what we are even building. It costs two weeks. Skipping it risks the whole budget.

Testing strategy

🔬

Unit

Fare math, state transitions, the drug matrix, the publication filter. Property-based tests on the meter.

🔗

Integration

Gateway callbacks (idempotent), routing, video signalling, notification templates.

⚖️

Compliance

Automated assertions: no rating field is ever serialised; a List A drug on an audio session is rejected; an unverified provider never appears in any response.

🙋

UAT

Real ambulance operators and a real doctor test on staging before launch. Ops runs the verification queue for two weeks pre-launch.

22 — Setup, Deployment & Handover

From code to live — inside Bangladesh

Reproducible environments, the accounts you will need, and a clean handover with full source-code ownership.

🖥️

Environments

  • Dev — engineering
  • Staging — your review & UAT (synthetic data only; no real PHI)
  • Productionin-country BD hosting
  • Env-based config & secrets, nothing hard-coded
🚀

Deployment

  • Dockerized services, CI/CD from a protected main
  • Zero-downtime releases, automated migrations, rollback plan on every deploy
  • Feature flags — ship dark, roll out gradually
  • Backups in-country, with tested restores
📦

Handover package

  • Full source code — three apps, web, backend. Yours
  • Deployment & ops runbooks
  • API docs (OpenAPI) + admin user guide, bilingual
  • The compliance playbook — what ops must do, and never do, to stay compliant
  • Training for your ops and verification team

Accounts & services to provision

ServicePurposeOwner
Hosting — BD datacentre / BD cloud regionApp, DB, Redis, object storage, video SFU, backupsClient billing, we set up. Must be in-country
Payment gateway (SSLCommerz / aamarPay / ShurjoPay)bKash, Nagad, Rocket, cards — with split-settlementClient merchant account, we integrate. Confirm split-settlement in writing first
Apple Developer + Google PlayPublish three appsClient accounts, we submit
Maps / routingTiles, directions, distance matrix, ETAClient billing, we integrate
SMS gateway (BD)OTP, ambulance dispatch alertsClient account, we integrate
FirebasePush notifications (tokens only, no PHI)Client project, we configure
Domain + SSLWeb & API endpointsClient, we configure
Company & complianceRJSC registration, trade licence, e-TIN, VAT + BIN, bank account, UBID (Digital Commerce Guidelines 2021)Client, with a lawyer. Not an engineering task — but a launch blocker
Telehealth platform licenceDGHS — assume an independently-operating app requires one, with a price list declared and approved at licensingClient, with a lawyer. See §23

We set up and configure every service; the accounts stay in your name, so ownership and billing are always yours. The two rows in bold at the bottom are not software tasks — they are the reason Phase 0 exists.

23 — Regulatory Risk Register 🔴

Open legal questions that need a Bangladeshi lawyer's written opinion before launch

Every item below is a genuine unknown, not a hedge. Each one has been researched to the limit of what public sources can answer, and each one hits a wall that only a qualified Bangladeshi lawyer — and in two cases a call to DGHS — can get past. They are listed here rather than buried, because a spec that pretends these are settled is a spec that will need rewriting after launch. Phase 0 exists to close them.

#Open questionWhy it is unresolvedWhat it changes if the answer is badOwner
R1 Is a facility-side technology fee lawful? BMDC §4.3.1 bans a doctor accepting inducement for referral; §4.3.2 bans fee-splitting. §4.2.2 is the only clause contemplating an intermediary, and it demands full disclosure. Is a disclosed, patient-initiated, facility-side fee inside or outside that line? It is professional misconduct, not (yet) a crime, and no High Court ruling has been found. The clause was not written with platforms in mind The revenue model. If prohibited, we fall back to patient-side fee + flat, non-volume-tied facility SaaS only. The architecture already supports this — but the business case narrows Lawyer
R2 Can a commercial app lawfully publish a doctor directory at all? BMDC Code §3.4.7 says directories should be "published by professional medical organizations" A commercial listing app arguably is not one. Many operate anyway — Doctorola, DocTime, Praava. Tolerated ≠ lawful. Unresolved The doctor directory itself. Worst case: the directory becomes doctor-consented-only, or is dropped in favour of facility-led listings Lawyer
R3 Does an independently-operating telehealth app need a DGHS licence, and is the licensing window open? The DGHS National Telehealth Guideline states third-party systems, apps, webs and platforms need to be licensed, and that a provider must declare a price list at licensing, approved by the authority (§12.4) Could not confirm the guideline is gazetted, or that the licensing process is operational. Documents dated Feb & May 2026 Launch timing. We assume a licence is required and build the exportable price-list artefact (§9) accordingly. A closed licensing window could delay launch Lawyer + a call to DGHS
R4 Can a BD patient lawfully video-consult a foreign physician through our platform? DGHS Telehealth §3.3.1g indicates overseas physicians need a BD licence; BMDC Telemedicine §3.4 limits practice to Bangladeshi territory Directly contradicts the obvious tourism feature. Rhythm × Manipal announced exactly this in April 2026 — either they have a view we do not, or they have exposure they have not priced The tourism module's headline feature. We ship without it (§13). If lawful, it is a fast follow-on; if not, we have avoided the exposure Lawyer
R5 Does the chosen gateway actually support split-settlement / merchant-of-record per provider? Vendor documentation is not conclusive. Must be confirmed in writing The entire payments topology (§14). Without it we either hold funds — which needs a PSO licence, Tk 5,00,000, directors personally liable — or we redesign. Non-negotiable Phase 0 item Client + gateway, in writing
R6 Does an ambulance aggregator need a licence? No licence for an ambulance aggregator could be found. There is no national ambulance policy, no monitoring authority, and no meter. That is the opportunity — and the ambiguity The ambulance module's legal footing. Silence in the law is not the same as permission Lawyer
R7 Will the drafted Health Protection Act criminalise referral commissions — and would it capture us? An Act is being drafted and may criminalise the practice Nothing, if we build correctly. Our model takes no commission and splits the decisions structurally (§2), so a statutory ban should strengthen our position. This risk is listed so that stays true Lawyer (monitor)
R8 What exactly does the Personal Data Protection Act (passed 10 April 2026, deemed effective 6 Nov 2025) require of a health-data controller? The Act is very new; implementation rules and the regulator's posture are not yet established Consent flows, retention, breach-notification timelines, DPO obligations. We build to the strictest reasonable reading and adjust Lawyer
R9 Will hospitals and diagnostic centres actually list, and pay? 🔴 NO public source confirms hospital-chain willingness to accept a third-party referral platform. Chains with their own apps (Square, Labaid, Evercare, Ibn Sina) have little incentive to pay for patients who would walk in anyway. The ones most likely to sign are mid-tier centres with idle capacity Everything. This is a commercial risk, not a legal one — but it is the single biggest assumption in the plan. ~20 primary validation calls in Phase 0, before code Client + us, Phase 0
R10 Can we get a formal BMDC / DGHS data-sharing arrangement for verification? Neither has a public API. BMDC is a form-based lookup; DGHS publishes stale PDFs Ops cost. Without it, verification stays manual forever — which is our design assumption anyway (§7), so this is upside, not a blocker Client (write to BMDC/DGHS)

How to read this register

R5 and R9 are build-blocking — they must be answered before Phase 1 starts, because they can invalidate the payments architecture and the business model respectively. R1, R2, R3, R4, R6 and R8 are launch-blocking — they need a written opinion before the app is public, but the build can proceed against the conservative reading, which is what this specification encodes throughout. R7 and R10 are monitor-only. The conservative reading is already the design. That is the point of building it this way: if every one of these questions comes back with the worst plausible answer, the platform in this document still stands.

24 — Future Support & Maintenance

After launch — the compliance work never stops

Launch is the start. In this domain there is a permanent operational obligation — verification expires, licences lapse, prices go stale — and someone must own it every single day.

🛠️

Warranty period

  • Free bug-fix window after handover
  • Crash & regression fixes covered
  • Stabilisation of live issues
📟

Monitoring

  • Uptime, error and queue alerts
  • Dispatch-latency and unmatched-rate dashboards — the metrics that matter
  • Verification-expiry exposure report
🔄

Ongoing support (optional)

  • Monthly maintenance retainer
  • OS / SDK / dependency updates
  • Regulatory-change watch — the Health Protection Act, PDPA rules, the DGHS licensing regime
  • Priority response SLA

The permanent ops jobs this platform creates

JobCadenceWhy it cannot be automated away
Verification queueDailyNo BMDC or DGHS API exists. Every doctor and facility is verified by a human against the registry, with stored evidence
Expiry & re-verificationDaily (system-flagged, human-actioned)Registrations and licences lapse. ~1 in 4 doctors practise without renewed registration; ~95% of facilities on un-renewed licences. Our badge means nothing if it is stale
Price integrityWeekly + on reportFacility-declared prices drift. Price accuracy is the product; a wrong price is a broken promise
Grievance handlingContinuous, SLA-boundMandated by Telemedicine Guidelines §7.5
Content moderationOn submissionA doctor writing "Best cardiologist in Dhaka" in their bio is a BMDC violation by us
Manual dispatch fallbackContinuousA large share of this market still phones. The console must let a human dispatch a call-in patient

Roadmap — additive, feature-flagged, no rebuild

NDHIE / SeHR live integration Facility LIS/HIS result ingest Structured lab results (not just PDFs) Chattogram & second-city launch Corporate / employer health plans Insurer integration Cross-border teleconsult — only if R4 clears Home-collection logistics Interpreter marketplace beyond Kunming Never: ratings, reviews, rankings, paid placement

The last tag is not a joke. It is the one roadmap item that must survive every future product manager, every growth experiment and every investor who asks why there are no stars. Write it into the codebase, the compliance playbook and the ops training — because the schema will hold the line only as long as someone remembers why it was built that way.

Mahfuz Akandমূল সাইটে ফিরুন