Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Type System

InkGen’s type system maps FHIR types to implementation-specific types.

FHIR Primitive Types

FHIR TypeJavaScriptJavaNotes
stringstringStringText data
booleanbooleanBooleanTrue/false
integernumberintWhole numbers
decimalnumberBigDecimalPrecise decimals
dateDateLocalDateCalendar date
dateTimeDateZonedDateTimeWith timezone
codestringStringCoded value

FHIR Complex Types

FHIR TypeDescription
CodeableConceptCoding with text
CodingCode system reference
IdentifierBusiness identifier
QuantityNumeric value with units
PeriodStart and end time
RatioNumeric ratio

Custom Types

Profiles can define custom types that extend or constrain base types:

Profile: CustomQuantity
Parent: Quantity

* system 1..1 MS
* value 1..1 MS

Type Constraints

Cardinality, patterns, and value set bindings form the type constraint system:

* value[x] only Quantity or string
* code from MyValueSet (required)

For more on code generation, see Language Backends.