<?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: Jesus Pantoja</title>
    <description>The latest articles on DEV Community by Jesus Pantoja (@jesuspantojap).</description>
    <link>https://dev.to/jesuspantojap</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4061400%2Fb25105a3-25ce-4707-895e-ad7e9896d8d8.png</url>
      <title>DEV Community: Jesus Pantoja</title>
      <link>https://dev.to/jesuspantojap</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jesuspantojap"/>
    <language>en</language>
    <item>
      <title>The server rejected the norepinephrine — and that was the best thing that happened</title>
      <dc:creator>Jesus Pantoja</dc:creator>
      <pubDate>Mon, 03 Aug 2026 22:33:29 +0000</pubDate>
      <link>https://dev.to/jesuspantojap/the-server-rejected-the-norepinephrine-and-that-was-the-best-thing-that-happened-tags-fhir-4jmi</link>
      <guid>https://dev.to/jesuspantojap/the-server-rejected-the-norepinephrine-and-that-was-the-best-thing-that-happened-tags-fhir-4jmi</guid>
      <description>&lt;p&gt;I'm a critical care physician in Colombia. For months I've been&lt;br&gt;
building OMAXI, an LLM pipeline that reads Spanish clinical&lt;br&gt;
documents — nursing records, resident notes, lab reports — and&lt;br&gt;
turns them into structured data plus a note a physician can sign.&lt;br&gt;
The rule is narrow: structure what the documents say, never infer&lt;br&gt;
what they don't. In critical care, the failure that matters isn't&lt;br&gt;
a missed nuance. It's a confident fabrication.&lt;/p&gt;

&lt;p&gt;Last week I ran an experiment: map the pipeline's output to FHIR&lt;br&gt;
R4 and validate it against a real server (a Medplum project) —&lt;br&gt;
actual POSTs, every resource read back to confirm what persisted.&lt;/p&gt;

&lt;p&gt;Of 38 resources in the first run, the server rejected 2.&lt;/p&gt;

&lt;p&gt;One of them was norepinephrine — the drug that defines the&lt;br&gt;
severity of septic shock. The reason: R4 carries an invariant on&lt;br&gt;
MedicationAdministration (&lt;code&gt;mad-1&lt;/code&gt;) requiring a dose or a rate.&lt;br&gt;
The source documented "0.35 mcg/kg/min", which can't become a&lt;br&gt;
UCUM quantity without the patient's weight — and the pipeline&lt;br&gt;
doesn't extract weight. Text alone isn't enough. The standard&lt;br&gt;
said no.&lt;/p&gt;

&lt;p&gt;There was an easy fix: write &lt;code&gt;dose: 0.35 mcg&lt;/code&gt; and pass validation&lt;br&gt;
instantly — producing a perfectly valid resource that lies about&lt;br&gt;
a vasopressor dose. I did the opposite: declared the absence&lt;br&gt;
explicitly with the standard &lt;code&gt;data-absent-reason&lt;/code&gt; extension&lt;br&gt;
(&lt;code&gt;as-text&lt;/code&gt;). It satisfies the invariant without asserting any&lt;br&gt;
quantity, and preserves the original text and route.&lt;/p&gt;

&lt;p&gt;The goal isn't to produce valid resources. It's to avoid&lt;br&gt;
producing valid resources that lie.&lt;/p&gt;

&lt;p&gt;That rejection turned out to be the most useful moment of the&lt;br&gt;
whole experiment. The rest of the friction log is just as&lt;br&gt;
instructive:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The schema kills data the model already read.&lt;/strong&gt; Nursing
documented exact administration times; the pipeline's type
schema had no temporal field, so they vanished. The patient's
weight appeared in two documents and reached the output in
none. A negation ("PE ruled out") was extracted — into the
wrong field — and a sanitizer flattened it into an asserted
finding. None of this is fixable with a better prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two blood draws became four Observations.&lt;/strong&gt; The same
creatinine value, restated in two physicians' notes, produced
phantom data points — enough to fake a KDIGO staging change
that never happened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;My own layer was no cleaner.&lt;/strong&gt; I assigned LOINC codes with
clinical judgment; checked against NLM's official table, 15%
were wrong. And a genuine end-to-end run caught a factor-of-ten
unit bug my hand-written test fixture structurally couldn't —
because I had written the fixture to match my own assumptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both runs used entirely fictitious data — including a fabricated&lt;br&gt;
day-2 ICU case (septic shock, four documents, Spanish) that's now&lt;br&gt;
in the repo as a reusable test case for anyone working on&lt;br&gt;
Spanish-language clinical NLP.&lt;/p&gt;

&lt;p&gt;Full write-up — what survives the trip to FHIR, what breaks, and&lt;br&gt;
in which layer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/JesusPantojaP/fhir-spanish-icu-notes" rel="noopener noreferrer"&gt;https://github.com/JesusPantojaP/fhir-spanish-icu-notes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you work on FHIR in Latin America, Spanish-language clinical&lt;br&gt;
NLP, or LLM extraction pipelines with validation layers, I'd&lt;br&gt;
genuinely like to compare notes — especially on terminology&lt;br&gt;
assignment with a human in the loop, which I don't think is&lt;br&gt;
safely automatable yet.&lt;/p&gt;

</description>
      <category>fhir</category>
      <category>healthcare</category>
      <category>llm</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
