Primitive Types

Overview

This section describes primitive types assumed by all openEHR models. These are types supported directly by most programing languages, and usually visible via either a class interface and/or a built-in raw value type. The following table lists the primitive types assumed by openEHR.

Type name
in openEHR
Description

Octet

a type whose value is an 8-bit value.

Character

a type whose value is a member of an 8-bit character-set (ISO: "repertoire").

Boolean

logical True/False values; usually physically represented as an integer, but need not be.

Integer

32-bit integers.

Integer64

64-bit integers.

Real

32-bit real numbers in any interoperable representation, including single-width IEEE floating point.

Double

64-bit real numbers, in any interoperable representation including double-precision IEEE floating point.

String

represents unicode-enabled strings.

The figure below illustrates these types. Simple inheritance relationships are shown which facilitate the type descriptions below. Actual inheritance from or subsitutability for an Any class is not assumed, and is shown only for convenience (e.g. to indicate that the '=' operator is available on any type). The type Ordered_numeric is on the other hand is used to indicate assumed substitutability of numeric types, and is intended to be mapped to an equivalent type in a real type system (e.g. in Java, java.lang.Number). Data-oriented implementation type systems such as XML-schema do not have such operations.

BASE foundation types.primitive types
Figure 1. base.foundation_types.primitive_types Package

Unicode

It is assumed in the openEHR specifications that Unicode is supported by the type String. Unicode is needed for all Asian, Arabic and other script languages, for both data values (particularly plain text and coded text) and for many predefined string attributes of the classes in the openEHR Reference Model. It encompasses all existing character sets. In openEHR, UTF-8 encoding is assumed.

Class Definitions

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/boolean.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/ordered.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/character.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/octet.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/string.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/uri.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/numeric.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/ordered_numeric.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/integer.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/integer64.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/real.adoc[]

Unresolved include directive in modules/foundation_types/pages/primitive_types.adoc - include::../UML/classes/double.adoc[]