<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Nazmul Huda</title>
    <description>The latest articles on DEV Community by Nazmul Huda (@nazmulhd10).</description>
    <link>https://dev.to/nazmulhd10</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2050688%2Fc2d57611-6c70-4a57-9600-3f172335e7f3.jpg</url>
      <title>DEV Community: Nazmul Huda</title>
      <link>https://dev.to/nazmulhd10</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nazmulhd10"/>
    <language>en</language>
    <item>
      <title>What "production-ready" actually means for healthcare software</title>
      <dc:creator>Nazmul Huda</dc:creator>
      <pubDate>Mon, 15 Jun 2026 04:40:44 +0000</pubDate>
      <link>https://dev.to/nazmulhd10/what-production-ready-actually-means-for-healthcare-software-2ei3</link>
      <guid>https://dev.to/nazmulhd10/what-production-ready-actually-means-for-healthcare-software-2ei3</guid>
      <description>&lt;p&gt;In most apps, a small bug is an inconvenience. In healthcare software, the&lt;br&gt;
same bug can mean a wrong dose, a missed warning, or a bill that's silently&lt;br&gt;
off. So before we let BioMedixAI — an AI-native healthcare platform — anywhere&lt;br&gt;
near a launch, we spent a full day doing nothing but trying to break it.&lt;/p&gt;

&lt;p&gt;Here's what that day actually looked like, and the bugs that taught us the most.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Vital-sign thresholds, re-aligned to NEWS2
&lt;/h2&gt;

&lt;p&gt;Early on, our "normal vs abnormal" vital-sign bands were &lt;em&gt;reasonable&lt;/em&gt; but not&lt;br&gt;
&lt;em&gt;standard&lt;/em&gt;. In clinical software, "reasonable" isn't good enough.&lt;/p&gt;

&lt;p&gt;We re-aligned every threshold to &lt;strong&gt;NEWS2&lt;/strong&gt; (National Early Warning Score) — the&lt;br&gt;
scoring system hospitals use worldwide to catch a deteriorating patient early.&lt;br&gt;
Pulse, blood pressure, respiratory rate, SpO₂, temperature: each now sits in&lt;br&gt;
the exact band that produces the correct early-warning flag.&lt;/p&gt;

&lt;p&gt;Lesson: in a regulated domain, don't invent your own constants. Find the&lt;br&gt;
published standard and match it exactly — then write tests that assert the&lt;br&gt;
boundaries (&lt;code&gt;spo2 === 91&lt;/code&gt; should escalate, &lt;code&gt;92&lt;/code&gt; should not).&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Timezones will betray you at midnight
&lt;/h2&gt;

&lt;p&gt;Several of our "per day" features (bed-day billing accrual, daily reports,&lt;br&gt;
sequence-number year prefixes) were quietly bucketing by &lt;strong&gt;UTC&lt;/strong&gt;. For a&lt;br&gt;
facility in UTC+6, that means a day "closes" six hours early — and a bill can&lt;br&gt;
land on the wrong calendar day.&lt;/p&gt;

&lt;p&gt;We moved everything to roll over at each facility's &lt;strong&gt;local&lt;/strong&gt; midnight, DST&lt;br&gt;
included. The fix isn't hard; &lt;em&gt;noticing&lt;/em&gt; it is. The only reliable way we found&lt;br&gt;
to catch these is to run the logic with the clock pinned to an awkward time&lt;br&gt;
(23:30 local, last day of the month) and watch what bucket the row lands in.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Concurrency: the database is your last line of defense
&lt;/h2&gt;

&lt;p&gt;Two requests admitting the same patient to the same bed at the same millisecond&lt;br&gt;
shouldn't both succeed. App-level checks (&lt;code&gt;SELECT then INSERT&lt;/code&gt;) lose this race.&lt;br&gt;
The fix is a &lt;strong&gt;partial unique index&lt;/strong&gt; that lets the DB reject the second write:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;one bed → at most one ACTIVE admission, enforced in Postgres, not in Node.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Application guards are for friendly error messages. The database is for truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Access control is correctness, not a feature
&lt;/h2&gt;

&lt;p&gt;Part of the audit was purely adversarial: log in as role X, try to read role Y's&lt;br&gt;
data, and confirm we get a hard stop. A few endpoints were returning data they&lt;br&gt;
shouldn't have. We also standardized on returning &lt;strong&gt;404, not 403&lt;/strong&gt;, for&lt;br&gt;
cross-tenant IDs — a 403 quietly confirms the record &lt;em&gt;exists&lt;/em&gt;, which is its own&lt;br&gt;
small leak.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;None of this makes a good screenshot. There's no "we did the security and&lt;br&gt;
correctness properly" demo. But this is the work that earns a system the right&lt;br&gt;
to stand next to someone's health data.&lt;/p&gt;

&lt;p&gt;We'd rather be slow and correct than fast and sorry.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Building BioMedixAI in public. More notes as we go.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>healthtech</category>
      <category>testing</category>
      <category>webdev</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
