Semantics of `Void`

Hello everyone,
I have a quick question regarding Void and unintialised fields in OpenEHR specification. as I am working on custom serializer and deserializer. that first loads data in-memory to validate then serialize again.

  • Does the concept of Void apply universally to all values to indicate a missing state, or is it only used for object references (like a null pointer)?
  • for primitive data types(like Integer, Real, Double etc), what is their default state at construction time? Do they default to 0 / 0.0, or do they default to an unassigned Void state?

for languages like Java, C# they set primitives to defaults like 0, false. This would allow me also to know if:

  • when is_nullable: True for an prop of type Integer does it mean it can have Void state, or is it just null
  • Furthermore, this knowledge heavily impacts serialization and database storage. If primitives default to zero by spec definition, a serializer can safely drop fields like magnitude: 0 entirely to reduce disk space and traffic size, knowing the deserializer will naturally reconstruct the zero.

I am Sorry if this is a basic question, but I am looking for clarity based strictly on the openEHR specification itself, rather than just how current implementations happen to handle it (which are often influenced by host-language defaults like Java).

Those types should rely on your technology of preference since are not openEHR types, but assumed types that should be provided by the underlying programming language.

I would avoid using 0 / 0.0 as a default for primitive number types. In Java a wrapper classes can be used Integer instead of int. These act as primitive types but can be set to null (Void).

In databases the null (Void) is almost always available for primitive types.