FHIR Shorthand (FSH) is a domain-specific, text-based grammar for defining FHIR profiles, extensions, and implementation guides in a human-readable format. It serves as a source language that is compiled into formal StructureDefinition and ImplementationGuide resources, replacing the error-prone process of manually authoring complex JSON or XML conformance artifacts.
Glossary
FHIR Shorthand (FSH)

What is FHIR Shorthand (FSH)?
A concise, text-based authoring language designed to simplify the creation and maintenance of FHIR profiles, extensions, and implementation guides.
By using a declarative syntax with keywords like Profile, Extension, and Instance, FSH allows authors to express constraints, bindings, and slicing logic succinctly. The official SUSHI compiler translates .fsh files into valid FHIR definitions, enabling version control and diff-friendly workflows that are impractical with raw JSON structures.
Key Features of FHIR Shorthand
FHIR Shorthand (FSH) is a text-based grammar for defining FHIR artifacts. It compiles into formal StructureDefinitions and Implementation Guides, enabling version-controlled, collaborative profile development.
Declarative Profile Authoring
Define FHIR profiles and extensions using a concise, human-readable syntax. FSH allows authors to specify constraints, cardinality, and terminology bindings directly on elements without manually editing complex XML or JSON StructureDefinitions.
- Differential approach: Only specify the changes from a base resource
- Element path syntax: Use dot-notation like
name.familyto target nested elements - Compiled output: FSH compiles to valid FHIR Shorthand via SUSHI, the reference compiler
Invariant and Rule Definition
Embed formal constraints and validation logic directly within profile definitions. FSH supports FHIRPath expressions to define co-occurrence rules, conditional required fields, and cross-element validation.
- Invariant keyword: Define named rules with severity levels (error/warning)
- Context specification: Target specific elements or the entire resource
- Natural language descriptions: Pair machine-readable logic with human-readable explanations for implementation guidance
Instance and Example Generation
Create sample FHIR resources for testing and documentation using the Instance keyword. These instances serve as realistic test data that conform to defined profiles, accelerating implementation validation.
- Assignment syntax: Set element values using a clean
key = valueformat - Reference resolution: Define inter-resource links that compile into valid FHIR references
- Usage markers: Tag instances as
#exampleor#definitionto control their role in the Implementation Guide
ValueSet and CodeSystem Definition
Author terminology artifacts natively in FSH without switching to external tooling. Define custom code systems and compose value sets using inclusion and exclusion rules.
- Hierarchical codes: Define codes with parent-child relationships using indentation
- Intensional and extensional: Compose value sets by enumerating codes or by filtering code system properties
- External imports: Reference codes from established terminologies like SNOMED CT and LOINC
Implementation Guide Assembly
Orchestrate a complete FHIR Implementation Guide from a single configuration file. FSH specifies the canonical URL, dependencies, pages, and artifact groupings that SUSHI compiles into a publishable IG.
- Dependency management: Declare external IGs like US Core as dependencies
- Page generation: Author narrative content in Markdown that integrates with generated artifacts
- Parameterized builds: Define IG-wide parameters for consistent artifact naming and versioning
Alias and Mixin Reusability
Reduce repetition and improve maintainability through aliases and mixins. Aliases assign short names to long URLs, while mixins define reusable sets of rules that can be applied across multiple profiles.
- Alias syntax:
Alias: SCT = http://snomed.info/sctfor cleaner terminology references - Mixin composition: Define a common constraint pattern once and insert it into multiple profiles
- RuleSet insertion: Apply predefined rule blocks to ensure consistent profiling patterns across an IG
Frequently Asked Questions
Clear, technical answers to the most common questions about using FHIR Shorthand (FSH) to author and maintain FHIR implementation guides.
FHIR Shorthand (FSH) is a concise, text-based domain-specific language designed by HL7 for authoring FHIR profiles, extensions, and implementation guides. Instead of manually editing complex JSON or XML StructureDefinitions, authors write human-readable .fsh files using a declarative syntax. The FSH compiler, SUSHI, then compiles these files into the formal, computable FHIR definitions required by servers and validators. FSH works by defining logical entities: Alias for URLs, Profile for constrained resources, Extension for custom elements, Instance for example data, and ValueSet/CodeSystem for terminology. Rules like * status 1..1 or * component ^slicing.discriminator.type = #pattern apply constraints directly to FHIR elements using a path-based grammar, dramatically reducing the verbosity and error-proneness of hand-coding JSON.
FSH vs. FHIR Mapping Language vs. StructureDefinition
Comparing the three primary methods for defining FHIR profiles, extensions, and data transformation rules.
| Feature | FHIR Shorthand (FSH) | FHIR Mapping Language | StructureDefinition |
|---|---|---|---|
Primary Purpose | Authoring FHIR profiles, extensions, and implementation guides | Defining transformations from legacy formats to FHIR resources | The formal, machine-readable definition of a FHIR profile or extension |
Authoring Format | Concise, text-based domain-specific language | Text-based domain-specific language with map syntax | JSON or XML document conforming to the StructureDefinition resource |
Human Readability | |||
Compilation Required | |||
Defines Element Constraints | |||
Defines Data Transformations | |||
Output Artifact | StructureDefinition, ImplementationGuide, and other FHIR resource instances | StructureMap resource instance | N/A (is the final artifact itself) |
Typical Author | Profile author, implementation guide editor | Interoperability engineer, integration specialist | Software application consuming or generating the definition |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Essential concepts for understanding how FHIR Shorthand (FSH) fits into the broader FHIR authoring, profiling, and implementation guide publication workflow.
FHIR Profile
A constrained subset of a base FHIR resource tailored to specific requirements. In FSH, profiles are declared with the Profile keyword and refined using rules. Common rule types:
- Cardinality rules:
* status 1..1to make an element required - Binding rules:
* valueCode from http://example.org/ValueSet (required) - Must Support flags:
* subject MS - Slicing:
* component ^slicing.discriminator.type = #patternFSH profiles compile into StructureDefinition resources with both differential and snapshot views.
FHIR Extension
A mechanism for adding custom data elements to standard resources. In FSH, extensions are authored using the Extension keyword and can be simple (single value) or complex (nested sub-extensions). Key concepts:
- Extensions are defined on a specific context (resource type or element path)
- Use
* value[x] only CodeableConceptto constrain the value type - Modifier extensions use
* ^modifierExtension = true - Extensions compile into standalone StructureDefinitions with
type: ExtensionFSH makes extension authoring declarative rather than hand-editing complex JSON differentials.
FHIR Mapping Language
A domain-specific language for defining transformation rules that convert legacy healthcare data formats (HL7 v2, CDA) into FHIR resources. While distinct from FSH, both are text-based authoring tools in the FHIR ecosystem. The Mapping Language focuses on:
- Element-by-element mapping from source to target
- Nested structures for complex transformations
- Conditional logic for context-dependent mapping
- Integration with StructureMap resources for executable transforms Together with FSH, these languages form a complete text-based toolchain for FHIR interoperability engineering.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us