Streaming Responses for LLMs: Implementing Server-Sent Events

Streaming LLM responses dramatically improves user experience. After implementing streaming for 20+ LLM applications, I’ve learned what works. Here’s the complete guide to implementing Server-Sent Events for LLM streaming. Figure 1: Streaming…

AI/ML4 min read

ASP.NET Page Life-Cycle Events

Since the beginning days i was working on with ASP.NET 1.1, quite familiar with the life-cycle events within the ASP.NET 1.1. But still it will be difficult to remember everything, when we…

.NET8 min read

C# 15 Union Types in a Real Domain Model: Dispensed, Rejected or Referred

C# 15 union types applied to a prescribing model: a dispensing outcome that is exactly one of three cases, handlers the compiler keeps exhaustive, and fifteen experiments on what unions compile to, how they behave when empty, what they cost, how they serialise, and how they work with .NET 10 and C# 14 code.

.NET14 min read

Lambda Web Functions: When a Function Becomes a Web Server

AWS Lambda Web Functions run an ordinary HTTP server, serve many requests per environment and bill by CPU time. What the contract is, what the billing model rewards and punishes, with a measured server and a cost model checked against AWS’s own examples, and where it sits against function URLs, API Gateway and App Runner.

FHIR Validation in CI: Profiles, Terminology and IPS Checks That Fail the Build

A build gate for FHIR conformance: the HL7 validator behind a Python wrapper and the Firely .NET SDK check resources against the IPS profiles in GitHub Actions, with deliberately broken test data that proves the gate refuses what it should, and a clear account of what it cannot see without a terminology server.

.NET18 min read

Querying Clinical Data: AQL vs. FHIR Search vs. SQL on FHIR

Five ordinary clinical questions put to three query languages: FHIR search, openEHR AQL and SQL on FHIR. The comparison shows what each was built for, where approximate cohort queries go wrong, and how view definitions turn FHIR resources into tables. Includes a tested SQL on FHIR pipeline in Python and C# clients for FHIR search and AQL.

.NET15 min read

Mapping openEHR Medication Orders to FHIR: AQL In, Transaction Bundle Out

A medication order has no status field in openEHR: its state lives in separate ACTION entries. This article builds a table-driven mapper, in Python and C#, that reads AQL result sets of medication orders and writes an idempotent FHIR transaction Bundle of MedicationRequest resources, with a report of every row rejected or degraded.

.NET12 min read

FHIR and openEHR: When to Use Which, and How They Coexist

HL7 FHIR was designed to exchange clinical data and openEHR to keep it for a lifetime. This article compares the two on the dimensions that affect architecture, shows the same blood pressure in each, and sets out a coexistence design for Azure with a tested mapping in Python and C# that reports what the FHIR resource could not carry.

.NET13 min read

RAG over FHIR Data on AWS HealthLake and Azure Health Data Services: Retrieval That Respects the Record

A FHIR record is a graph of coded, dated, status-bearing resources, not a document corpus. This article sets out a retrieval design for generative AI over FHIR data: FHIR search for exact questions, similarity search for notes, pinned allergies and medication, a hard partition by patient, and citations on every statement. Tested on synthetic data and mapped to AWS HealthLake and the Azure Health Data Services FHIR service.

Amazon S3 Vectors vs. OpenSearch Serverless vs. pgvector for RAG: Cost Floors, Query Bills and Tenant Isolation

All three AWS vector stores can now cost close to nothing at rest, but they bill and isolate tenants in very different ways. This comparison models Amazon S3 Vectors, OpenSearch Serverless (classic and next generation) and Aurora PostgreSQL with pgvector across three workload shapes, checks the S3 Vectors model against the worked examples on the AWS pricing page, and shows where the tenant boundary belongs in each.