Inferensys

Glossary

FHIR Shorthand (FSH)

A domain-specific language designed for defining FHIR artifacts like profiles, extensions, and implementation guides in a concise, human-readable text format that compiles to FHIR JSON.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
DEFINITION

What is FHIR Shorthand (FSH)?

A domain-specific language for defining FHIR artifacts like profiles, extensions, and implementation guides in a concise, human-readable text format that compiles to FHIR JSON.

FHIR Shorthand (FSH) is a domain-specific language designed to author FHIR StructureDefinitions, ValueSets, and ImplementationGuides using a compact, human-readable syntax. It replaces verbose JSON or XML authoring with a declarative text format that compiles directly into valid FHIR artifacts, dramatically reducing the complexity of profiling and constraining FHIR resources for specific healthcare use cases.

FSH introduces intuitive keywords like Profile, Extension, and ValueSet alongside assignment rules and cardinality constraints. The SUSHI compiler processes .fsh files and generates the corresponding FHIR JSON, enabling version-controlled, diff-friendly authoring workflows. This approach accelerates the development of US Core, mCODE, and other critical interoperability specifications by allowing authors to focus on clinical intent rather than syntactic boilerplate.

FSH LANGUAGE CAPABILITIES

Key Features of FHIR Shorthand

FHIR Shorthand (FSH) is a domain-specific language that enables authors to define FHIR artifacts like profiles, extensions, and implementation guides using concise, human-readable text that compiles to FHIR JSON.

01

Human-Readable Syntax

FSH replaces verbose JSON StructureDefinitions with an intuitive, text-based syntax. Authors define profiles using familiar constructs like differential tables and rule statements, dramatically reducing the cognitive load of authoring complex FHIR artifacts. A single line of FSH can replace dozens of lines of JSON, making the authoring process accessible to clinicians and domain experts who are not JSON programmers.

02

Compiles to FHIR JSON

The SUSHI compiler transforms FSH source files into valid FHIR JSON artifacts, including StructureDefinitions, ValueSets, CodeSystems, and ImplementationGuides. This compilation step ensures that all authored content conforms to the FHIR specification and produces artifacts that can be consumed by any FHIR-compliant tool, validator, or server. The compiler performs rigorous error checking and provides clear diagnostic messages.

03

Profile and Extension Authoring

FSH excels at defining constrained profiles and custom extensions on base FHIR resources. Authors can:

  • Constrain cardinality (e.g., making an optional element required)
  • Bind elements to specific ValueSets
  • Define slicing rules for repeated elements
  • Create inline or standalone extensions
  • Apply Must Support flags This makes FSH the primary tool for building Implementation Guides.
04

Instance and Example Generation

Beyond profiles, FSH can define concrete instances of FHIR resources for use as examples in Implementation Guides. Authors declare instances using the Instance: keyword and assign values to elements using the same concise rule syntax. This ensures that example data remains consistent with the profiles it illustrates and can be automatically validated during compilation.

05

Terminology and ValueSet Management

FSH provides first-class support for defining ValueSets and CodeSystems directly in source code. Authors can declare code systems with hierarchical concepts, define value sets with inclusion and exclusion rules, and create concept maps for terminology translation. This centralizes all IG artifacts in a single, version-controlled text format rather than scattered JSON files.

06

Modular and Reusable Design

FSH supports project-level organization through multiple .fsh files and configuration files. Authors can define reusable Aliases for long URLs, create RuleSets that encapsulate common constraint patterns for reuse across multiple profiles, and organize artifacts logically across files. This modularity enables team collaboration and maintainable, large-scale Implementation Guide development.

FHIR SHORTHAND (FSH) FAQ

Frequently Asked Questions

Clear, technical answers to the most common questions about using FHIR Shorthand to author and maintain FHIR implementation guides.

FHIR Shorthand (FSH) is a domain-specific language designed for defining FHIR artifacts—such as profiles, extensions, and implementation guides—in a concise, human-readable text format. FSH files (.fsh) are compiled by SUSHI, an open-source reference compiler, into valid FHIR JSON StructureDefinitions, ValueSets, and other conformance resources. The language replaces the error-prone process of hand-authoring thousands of lines of JSON or XML with a declarative syntax that supports differential constraints, slicing, and inheritance. For example, a profile on the Patient resource can be authored in a few dozen lines of FSH, with the compiler automatically generating the complete StructureDefinition JSON, including the snapshot and differential views. This approach dramatically reduces maintenance burden and enables version-controlled, collaborative authoring of complex implementation guides.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.