1.0Table of Contents

 

Welcome to HAPI FHIR!


1.0.0 Welcome to HAPI FHIR
1.0.0 Table of Contents
1.1.0 Changelog: 2022
1.1.1 Changelog
1.1.2 HAPI FHIR 6.3.0 (TBD)
1.1.3 HAPI FHIR 6.2.1 (Pre-Release)
1.1.4 HAPI FHIR 6.2.0 (Pre-Release)
1.1.5 HAPI FHIR 6.1.3 (Pre-Release)
1.1.6 HAPI FHIR 6.1.2 (Pre-Release)
1.1.7 HAPI FHIR 6.1.1 (Pre-Release)
1.1.8 HAPI FHIR 6.1.0 (Pre-Release)
1.1.9 HAPI FHIR 6.0.5 (Pre-Release)
1.1.10 HAPI FHIR 6.0.4 (Pre-Release)
1.1.11 HAPI FHIR 6.0.3 (Pre-Release)
1.1.12 HAPI FHIR 6.0.2 (Pre-Release)
1.1.13 HAPI FHIR 6.0.1 (Pre-Release)
1.1.14 HAPI FHIR 6.0.0 (Pre-Release)
1.1.15 HAPI FHIR 5.7.6 (Pre-Release)
1.1.16 HAPI FHIR 5.7.5 (Pre-Release)
1.1.17 HAPI FHIR 5.7.4 (Pre-Release)
1.1.18 HAPI FHIR 5.7.3 (Pre-Release)
1.1.19 HAPI FHIR 5.7.2 (Pre-Release)
1.1.20 HAPI FHIR 5.7.1 (Pre-Release)
1.1.21 HAPI FHIR 5.7.0 (Pre-Release)
1.1.22 HAPI FHIR 5.6.4 (Pre-Release)
1.1.23 HAPI FHIR 5.6.3 (Pre-Release)
1.1.24 HAPI FHIR 5.5.7 (Pre-Release)
1.1.25 HAPI FHIR 5.5.6 (Pre-Release)
1.1.26 HAPI FHIR 5.5.5 (Pre-Release)
1.1.27 HAPI FHIR 5.5.0 (Pre-Release) (Prerelease)
1.2.0 Changelog: 2021
1.2.1 Changelog
1.2.2 HAPI FHIR 5.6.2 (Pre-Release)
1.2.3 HAPI FHIR 5.6.1 (Pre-Release)
1.2.4 HAPI FHIR 5.6.0 (Pre-Release)
1.2.5 HAPI FHIR 5.5.4 (Pre-Release)
1.2.6 HAPI FHIR 5.5.3 (Pre-Release)
1.2.7 HAPI FHIR 5.5.2 (Pre-Release)
1.2.8 HAPI FHIR 5.5.1 (Pre-Release)
1.2.9 HAPI FHIR 5.4.2 (Pre-Release)
1.2.10 HAPI FHIR 5.4.1 (Pre-Release)
1.2.11 HAPI FHIR 5.4.0 (Pre-Release)
1.2.12 HAPI FHIR 5.3.3 (Pre-Release)
1.2.13 HAPI FHIR 5.3.2 (Pre-Release)
1.2.14 HAPI FHIR 5.3.1 (Pre-Release)
1.2.15 HAPI FHIR 5.3.0 (Pre-Release)
1.2.16 HAPI FHIR 5.2.1 (Pre-Release)
1.3.0 Changelog: 2020
1.3.1 Changelog
1.3.2 HAPI FHIR 5.2.0 (Pre-Release)
1.3.3 HAPI FHIR 5.1.0 (Pre-Release)
1.3.4 HAPI FHIR 5.0.2 (Pre-Release)
1.3.5 HAPI FHIR 5.0.1 (Pre-Release)
1.3.6 HAPI FHIR 5.0.0 (Pre-Release)
1.3.7 HAPI FHIR 4.2.0 (Pre-Release)
1.4.0 Changelog: 2019
1.4.1 Changelog
1.4.2 HAPI FHIR 4.1.0 (Pre-Release)
1.4.3 HAPI FHIR 4.0.3 (Pre-Release)
1.4.4 HAPI FHIR 4.0.0 (Pre-Release)
1.4.5 HAPI FHIR 3.8.0 (Pre-Release)
1.4.6 HAPI FHIR 3.7.0 (Pre-Release)
1.5.0 Changelog: 2018
1.5.1 Changelog
1.5.2 HAPI FHIR 3.6.0 (Pre-Release)
1.5.3 HAPI FHIR 3.5.0 (Pre-Release)
1.5.4 HAPI FHIR 3.4.0 (Pre-Release)
1.5.5 HAPI FHIR 3.3.0 (Pre-Release)
1.5.6 HAPI FHIR 3.2.0 (Pre-Release)
1.6.0 Changelog: 2017
1.6.1 Changelog
1.6.2 HAPI FHIR 3.1.0 (Pre-Release)
1.6.3 HAPI FHIR 3.0.0 (Pre-Release)
1.6.4 HAPI FHIR 2.5 (Pre-Release)
1.6.5 HAPI FHIR 2.4 (Pre-Release)
1.6.6 HAPI FHIR 2.3 (Pre-Release)
1.7.0 Changelog: 2016
1.7.1 Changelog
1.7.2 HAPI FHIR 2.2 (Pre-Release)
1.7.3 HAPI FHIR 2.1 (Pre-Release)
1.7.4 HAPI FHIR 2.0 (Pre-Release)
1.7.5 HAPI FHIR 1.6 (Pre-Release)
1.7.6 HAPI FHIR 1.5 (Pre-Release)
1.7.7 HAPI FHIR 1.4 (Pre-Release)
1.8.0 Changelog: 2015
1.8.1 Changelog
1.8.2 HAPI FHIR 1.3 (Pre-Release)
1.8.3 HAPI FHIR 1.2 (Pre-Release)
1.8.4 HAPI FHIR 1.1 (Pre-Release)
1.8.5 HAPI FHIR 1.0 (Pre-Release)
1.8.6 HAPI FHIR 0.9 (Pre-Release)
1.9.0 Changelog: 2014
1.9.1 Changelog
1.9.2 HAPI FHIR 0.8 (Pre-Release)
1.9.3 HAPI FHIR 0.7 (Pre-Release)
1.9.4 HAPI FHIR 0.6 (Pre-Release)
1.9.5 HAPI FHIR 0.5 (Pre-Release)
1.9.6 HAPI FHIR 0.4 (Pre-Release)
1.9.7 HAPI FHIR 0.3 (Pre-Release)
1.9.8 HAPI FHIR 0.2 (Pre-Release)
1.9.9 HAPI FHIR 0.1 (Pre-Release)
2.0.0 Getting Started
2.0.0 Introduction
2.0.1 Getting Started
2.0.2 JSON Encoding
2.1.0 FHIR and HAPI FHIR Versions
2.2.0 HAPI FHIR Modules
2.3.0 Downloading and Importing
2.3.1 Maven Users
2.3.2 Gradle Users
2.3.3 Snapshot Builds
2.3.4 Dependencies
2.4.0 FHIR R4B Support
3.0.0 Working With The FHIR Model
3.0.0 Working With Resources
3.0.1 Navigating Structures
3.0.2 Convenience Methods
3.0.3 Examples
3.1.0 Parsing and Serializing
3.1.1 Parsing (aka Deserializing)
3.1.2 Encoding (aka Serializing)
3.2.0 Resource References
3.2.1 References in Client Code
3.2.2 References in Server Code
3.2.3 Versioned References
3.3.0 Profiles and Extensions
3.3.1 Extensions
3.3.2 Sub-Extensions
3.3.3 Retrieving Extension Values
3.3.4 Custom Resource Structures
3.4.0 Version Converters
3.5.0 Custom Structures
3.5.1 Extending FHIR Resource Classes
3.5.2 Using Custom Types in a Client
3.5.3 Using Custom Types in a Server
3.5.4 Custom Composite Extension Classes
3.5.5 Custom Resource Structure
3.6.0 Narrative Generation
3.6.1 Automatic Narrative Generation
3.6.2 Built-in Narrative Templates
3.6.3 Creating your own Templates
3.7.0 Bundle Builder
3.7.1 Transaction Resource Create
3.7.2 Transaction Resource Updates
3.7.3 Transaction Patch
3.7.4 Customizing the Bundle
4.0.0 Client
4.0.0 Introduction
4.1.0 Get Started ⚡
4.2.0 Generic (Fluent) Client
4.2.1 Fluent Calls
4.2.2 Search
4.2.3 Create - Type
4.2.4 Read/VRead - Instance
4.2.5 Delete - Instance
4.2.6 Update - Instance
4.2.7 Patch - Instance
4.2.8 History - Server/Type/Instance
4.2.9 Transaction - Server
4.2.10 Capability Statement (metadata) - Server
4.2.11 Extended Operations
4.2.12 Built-In Operations - Process-Message
4.2.13 Additional Properties
4.2.14 ETags
4.3.0 Annotation Client
4.3.1 Configuring Encoding (JSON/XML)
4.4.0 Client Configuration
4.4.1 Performance
4.4.2 Configuring the HTTP Client
4.5.0 Client Examples
4.5.1 Transaction With Conditional Create
4.5.2 Fetch all Pages of a Bundle
4.5.3 Create Composition and Generate Document
5.0.0 Plain Server
5.0.0 REST Server Types
5.1.0 Plain Server Introduction
5.1.1 Defining Resource Providers
5.1.2 Deploying
5.1.3 Testing Using Jetty
5.1.4 Server Base URL (Web Address)
5.1.5 Capability Statement / Server Metadata
5.1.6 Controlling Response Contents / Encoding / Formatting
5.2.0 Get Started ⚡
5.3.0 Resource Providers and Plain Providers
5.3.1 Resource Providers
5.3.2 Plain Providers
5.3.3 Common Method Parameters
5.3.4 REST Exception/Error Handling
5.3.5 Server Lifecycle Methods
5.4.0 REST Operations: Overview
5.4.1 Instance Level - Read
5.4.2 Instance Level - VRead
5.4.3 Instance Level - Update
5.4.4 Instance Level - Delete
5.4.5 Instance Level - Patch
5.4.6 Type Level - Create
5.4.7 Type Level - Search
5.4.8 Type Level - Validate
5.4.9 System Level - Capabilities
5.4.10 System Level - Transaction
5.4.11 System Level - Search
5.4.12 History (Instance, Type, Server)
5.4.13 Exceptions
5.4.14 Tags
5.4.15 Handling _summary and _elements
5.4.16 Compartments
5.5.0 REST Operations: Search
5.5.1 Search with No Parameters
5.5.2 Search Parameters: String Introduction
5.5.3 Search Parameters: Token/Identifier
5.5.4 Search Parameters: Date (Simple)
5.5.5 Search Parameters: Date (Ranges)
5.5.6 Search Parameters: Quantity
5.5.7 Search Parameters: Resource Reference
5.5.8 Search Parameters: Filter
5.5.9 Chained Resource References
5.5.10 Search Parameters: Composite
5.5.11 Combining Multiple Parameters
5.5.12 Multi-Valued (AND/OR) Parameters
5.5.13 AND Relationship Query Parameters for Dates
5.5.14 Resource Includes (_include)
5.5.15 Reverse Resource Includes (_revinclude)
5.5.16 Named Queries (_query)
5.5.17 Sorting (_sort)
5.5.18 Limiting results ()
5.5.19 Paging
5.5.20 Adding Descriptions
5.6.0 REST Operations: Extended Operations
5.6.1 Type-Level Operations
5.6.2 Instance-Level Operations
5.6.3 Server-Level Operations
5.6.4 Using Search Parameter Types
5.6.5 Returning Multiple OUT Parameters
5.6.6 Accepting HTTP GET
5.6.7 Manually handing Request/Response
5.7.0 Paging Search Results
5.7.1 Bundle Providers
5.8.0 Web Testpage Overlay
5.8.1 Adding the Overlay
5.8.2 Customizing the Overlay
5.8.3 A Complete Example
5.8.4 Authentication
5.9.0 Multitenancy
5.9.1 URL Base Multitenancy
5.10.0 JAX-RS Support
5.10.1 JAX-RS Implementation specifics
5.10.2 A Complete Example
5.11.0 Customizing the CapabilityStatement
5.12.0 OpenAPI / Swagger
5.12.1 Enabling OpenAPI
5.12.2 Demonstration
6.0.0 JPA Server
6.0.0 Introduction
6.1.0 Get Started ⚡
6.2.0 Architecture
6.2.1 Schema
6.3.0 Database Support
6.3.1 Experimental Support
6.3.2 Deprecated Support
6.4.0 Database Schema
6.4.1 Background: Persistent IDs (PIDs)
6.4.2 HFJ_RESOURCE: Resource Master Table
6.4.3 HFJ_RES_VER: Resource Versions and Contents
6.4.4 HFJ_FORCED_ID: Client Assigned/Visible Resource IDs
6.4.5 HFJ_RES_LINK: Search Links
6.4.6 Background: Search Indexes
6.4.7 HFJ_SPIDX_DATE: Date Search Parameters
6.5.0 Configuration
6.5.1 Search Result Caching
6.5.2 Additional Information
6.5.3 Cascading Deletes
6.5.4 Version Conflicts
6.5.5 Controlling Delete with Expunge size
6.6.0 Search
6.7.0 Performance
6.7.1 History Counting
6.7.2 Bulk Loading
6.7.3 Disabling :text Indexing
6.7.4 Disable Upsert Existence Check
6.8.0 Upgrade Guide
6.8.1 Oracle Support
6.8.2 Database Migration
6.9.0 Diff Operation
6.9.1 Diff Instance
6.9.2 Diff Server
6.10.0 LastN Operation
6.10.1 Functional Overview and Parameters
6.10.2 Limitations
6.10.3 Deployment and Configuration
6.11.0 Lucene/Elasticsearch Indexing
6.11.1 Experimental Extended Lucene/Elasticsearch Indexing
6.12.0 Terminology
6.12.1 Versioning of Terminology
6.12.2 Terminology Schemas
7.0.0 JPA Server: MDM
7.0.0 MDM Getting Started
7.1.0 MDM Rules
7.2.0 MDM Enterprise Identifiers
7.3.0 MDM Operations
7.3.1 Querying The MDM
7.4.0 MDM Technical Details
7.4.1 Automatic Linking
7.4.2 HAPI MDM Technical Details
7.5.0 MDM Search Expansion
7.6.0 MDM Customizations
7.6.1 Interceptors
8.0.0 JPA Server: CQL
8.0.0 CQL Getting Started
8.1.0 CQL Measure
9.0.0 JPA Server: Partitioning and Multitenancy
9.0.0 Partitioning and Multitenancy
9.0.1 Architecture
9.0.2 Partitioning and Resource IDs
9.0.3 Partition Interceptors
9.0.4 Complete Example: Using Request Tenants
9.0.5 Limitations
9.1.0 Partition Interceptor Examples
9.1.1 Example: Partitioning based on Tenant ID
9.1.2 Example: Partitioning based on headers
9.1.3 Example: Using Resource Contents
9.1.4 Example: Always Read All Partitions
9.1.5 Example: Smile CDR SMART Scopes
9.2.0 Partitioning Management Operations
9.2.1 Creating a Partition
9.2.2 Updating a Partition
9.2.3 Deleting a Partition
9.2.4 Reading a Partition
9.2.5 Listing all Partitions
9.3.0 Enabling Partitioning in HAPI FHIR
10.0.0 JPA Server: Batch Processing
10.0.0 Batch Introduction
11.0.0 Interceptors
11.0.0 Interceptors Overview
11.0.1 Creating Interceptors
11.1.0 Client Interceptors
11.1.1 Registering Client Interceptors
11.2.0 Client Pointcuts
11.3.0 Built-In Client Interceptors
11.3.1 Logging: Logging Interceptor
11.3.2 Security: HTTP Basic Authorization
11.3.3 Security: HTTP Bearer Token Authorization
11.3.4 Misc: Add Headers to Request
11.3.5 Misc: Add Cookies to Request
11.3.6 Multitenancy: Add tenant ID to path
11.3.7 Performance: GZip Outgoing Request Bodies
11.3.8 Capture: Programmatically Capturing Request/Response Details
11.4.0 Server Interceptors
11.4.1 Example: Clearing Tags
11.5.0 Server Pointcuts
11.5.1 Storage / JPA Server Pointcuts
11.6.0 Built-In Server Interceptors
11.6.1 Logging: Logging Interceptor
11.6.2 Partitioning: Multitenant Request Partition
11.6.3 Response Customizing: Syntax Highlighting
11.6.4 Response Customizing: Exception Handling
11.6.5 Response Customizing: Evaluate FHIRPath
11.6.6 Response Customizing: Static CapabilityStatement
11.6.7 Validation: Request and Response Validation
11.6.8 Search: Allow Lenient Searching
11.6.9 Security: CORS
11.6.10 Security: Authorization
11.6.11 Security: Consent
11.6.12 Security: Search Narrowing
11.6.13 Security: Rejecting Unsupported HTTP Verbs
11.6.14 Server: OpenAPI / Swagger Support
11.6.15 Server: Interaction Blocking
11.6.16 Subscription: Subscription Debug Log Interceptor
11.6.17 Request Pre-Processing: Override Meta.source
11.6.18 Terminology: Map Response Terminology
11.6.19 Terminology: Populate Code Display Names
11.6.20 Utility: ResponseSizeCapturingInterceptor
11.6.21 JPA Server: Allow Cascading Deletes
11.6.22 JPA Server: Disable Referential Integrity for Some Paths
11.6.23 JPA Server: Retry on Version Conflicts
11.6.24 JPA Server: Validate Data Being Stored
11.6.25 Data Standardization
11.6.26 Validation: Address Validation
11.6.27 Validation: Field-Level Validation
12.0.0 Security
12.0.0 Introduction
12.0.1 Authentication vs Authorization
12.0.2 Authentication Interceptors
12.1.0 Authorization Interceptor
12.1.1 Authorizing Read Operations
12.1.2 Authorizing Write Operations
12.1.3 Authorizing Sub-Operations
12.1.4 Authorizing Patch Operations
12.1.5 Authorizing Multitenant Servers
12.1.6 Authorizing Bulk Export Operations
12.1.7 Advanced Compartment authorization
12.2.0 Consent Interceptor
12.3.0 Search Narrowing Interceptor
12.3.1 Constraining by ValueSet Membership
12.3.2 ResultSet Narrowing
12.4.0 CORS
12.4.1 HAPI FHIR CORS Interceptor
12.4.2 CORS Servlet Filter
13.0.0 Validation
13.0.0 Introduction
13.1.0 Parser Error Handler
13.2.0 Instance Validator
13.2.1 FHIR Conformance Concepts
13.2.2 FHIR Instance Validator
13.2.3 Running the Validator
13.2.4 Validating Using Packages
13.2.5 Migrating to HAPI FHIR 5.x
13.3.0 Validation Support Modules
13.3.1 Built-In Validation Support Classes
13.3.2 ValidationSupportChain
13.3.3 DefaultProfileValidationSupport
13.3.4 InMemoryTerminologyServerValidationSupport
13.3.5 PrePopulatedValidationSupport
13.3.6 NpmPackageValidationSupport
13.3.7 CachingValidationSupport
13.3.8 SnapshotGeneratingValidationSupport
13.3.9 CommonCodeSystemsTerminologyService
13.3.10 RemoteTerminologyServiceValidationSupport
13.3.11 UnknownCodeSystemWarningValidationSupport
13.3.12 Recipes
13.3.13 Recipe: Supplying Custom Definitions
13.3.14 Recipe: Using a Remote Terminology Server
13.4.0 Schema/Schematron Validator
13.4.1 Preparation
13.4.2 Validating a Resource
13.5.0 Repository Validating Interceptor
13.5.1 Benefits and Limitations
13.5.2 Using the Repository Validating Interceptor
13.5.3 Rules: Require Profile Declarations
13.5.4 Rules: Require Validation to Declared Profiles
13.5.5 Rules: Disallow Specific Profiles
13.5.6 Adding Validation Outcome to HTTP Response
13.6.0 Validation Examples
14.0.0 Android
14.0.0 Android Client
14.0.1 Performance
14.0.2 Examples
15.0.0 Tools
15.0.0 Command Line Interface (CLI) Tool
15.0.1 Server (run-server)
15.0.2 Upload Example Resources (upload-examples)
15.0.3 Upload Terminology
15.0.4 Migrate Database
15.0.5 Reindex Terminology
16.0.0 Contributing to HAPI FHIR
16.0.0 Hacking Guide
16.0.1 Understanding the HAPI FHIR Codebase
16.0.2 Getting the Sources
16.0.3 Building HAPI FHIR
16.0.4 Troubleshooting
16.0.5 Importing into Eclipse
17.0.0 Appendix
17.0.0 Logging
17.0.1 Configuring HAPI's Logging - SLF4j
17.0.2 Client Payload Logging
17.0.3 Server Request Logging
17.1.0 FAQ
17.1.1 Getting Help
17.1.2 Using HAPI FHIR
17.1.3 JPA Server
17.1.4 Contributing
17.2.0 JavaDocs