Aleksandr Penskoi

Logo

Associate Professor
SE&CS Faculty, ITMO University, Russia

Senior Software Engineer
Health Samurai


GitHub · Leanpub · Telegram · Twitter · LinkedIn

@atomic-ehr/codegen

Code Generation Toolkit for FHIR SDKs in TypeScript, Python, and C#

@atomic-ehr/codegen is an extensible code generation toolkit for FHIR (Fast Healthcare Interoperability Resources). It transforms FHIR specifications into strongly typed code for several programming languages.

How it works

The generator is a three-stage pipeline:

  1. Input – FHIR packages from the FHIR registry, remote archives, or local StructureDefinitions. Tested with FHIR R4 Core, US Core, C-CDA, SQL on FHIR, and others.
  2. Intermediate representation – TypeSchema, a universal description of FHIR types. Tree shaking keeps only the resources and fields you need.
  3. Generation – built-in generators for TypeScript, Python (Pydantic), and C#, plus Mustache templates for any other language. A new language needs only this last stage.

Features

Technical details

Written in TypeScript. Published on npm as @atomic-ehr/codegen.

Articles

At the Health Samurai blog:

Updated 12 November 2026