Skip to main content

Data types

Inside Clinia's systems, data is persisted and exchanged using a set of common data types. These data types can be simple primitive types or composite data types, which are more complex data structures with many attributes. This section defined what we call the well known types. They are the basis for all data contained inside Resources.

Primitive Data Types

Base64Binary

A collection of bytes representing a Base64 encoded chain of characters.

Boolean

Can has two possible values: true or false

Code

A simple chain of characters. What differiantes it from a Symbol is that the value stored in a Code is taken from a set of controlled strings defined elsewhere (see Value Set). Technically, a code is restricted to a string which has at least one character and no leading or trailing whitespace, and where there is no whitespace other than single spaces in the contents.

Date

A gegorian calendar date value without timezone information. It contains information on the year, the month and the day of a date. The accepted format is ISO 8601's date format: YYYY-MM-dd.

DateTime

A gegorian calendar date value with timezone information. It contains information on the year, the month and the day of a date and the hours, minutes and seconds of the time of the day. The accepted format is ISO 8601's datetime format: YYYY-MM-ddTHH:mm:ss+zz:zz.

Decimal

A rational number with a decimal representation. That number can be any value between -79,228,162,514,264,337,593,543,950,335 and 79,228,162,514,264,337,593,543,950,335. This type is ideal for storing monetary values.

Instant

A specific instant on the global timeline. It is defined by an integral number of "ticks" since the Unix epoch (typically described as January 1st 1970, midnight, UTC, ISO calendar), where a tick is equal to 100 nanoseconds. An Instant has no concept of timezone. The accepted format is ISO 8601's format: YYYY-MM-ddTHH:mm:ssZ

Integer

A simple whole number. That number can be any value between -9,223,372,036,854,775,808 and 9,223,372,036,854,775,807.

Markdown

A simple chain of formatted characters. This data type will preserve any formatting done to the value.

Struct

A Struct is used to store dynamic values, where the content of the value may not be known up front, or may be dynamic. The underlying data structure supporting this data type is a collection of key-value pairs where every key is unique. A Struct can contain complex dictionary-like objects with multiple level of nested sub-objects.

note

A typical use case where the Struct data type is useful is to store json-like values while making sure the format of the keys and values is preserved, independently of the serialization process used by the different systems handling the data.

Symbol

A simple chain of characters, what in many programming languages is known as a string.

Time

A specific time during the day. It contains information on hours, minutes and seconds of the time of the day. The accepted format is ISO 8601's time format: HH:mm:ss.

URI

A uniform resource identifier. The value should follow the RFC3986 specification.

URL

A uniform resource locator. The value should follow the RFC1738 specification.

XHtml

A chain of characters representing a XHTML fragment.

Composite Data Types

Address

An address expressed using postal conventions, it usually defines a physical location that can be visited.

FieldRequiredTypeDescription
unitOptionalSymbolSuite, door, appartment number.
streetNumberOptionalSymbolStreet number.
routeOptionalSymbolStreet name.
postalCodeRequiredSymbolPostal code.
neighborhoodOptionalSymbolNeighborhood.
localityOptionalSymbolLocality.
placeRequiredSymbolCity.
districtOptionalSymbolDistrict.
regionCodeRequiredSymbolISO 3166-2 region code.
countryCodeRequiredSymbolISO 3166 country code
Example
{
"unit": "1B",
"streetNumber": "5841",
"route": "av. De Lorimier",
"postalCode": "H2G2N8",
"district": "31st",
"neighborhood": "Maple Heights",
"locality": "Rosemont-La Petite-Patrie",
"place": "Montreal",
"regionCode": "QC",
"countryCode": "CA"
}

Coding

A representation of a defined concept using a code from a defined Code System. The meaning of a coding is defined by its code.

It is possible for user-defined code to exists outside code systems. This is why the system and version attributes are optional. In all other cases, the code system information should be supplied when manipulating the Coding data type.

FieldRequiredTypeDescription
systemOptionalSymbolCode system in which the code is defined.
versionOptionalSymbolVersion of the code system the code is defined in.
valueRequiredCodeCode value.
displayNameRequiredArray<Translation>Display names for the code.
Example
{
"system": "country",
"version": "1",
"value": "CA",
"displayName": [
{
"code": "en",
"value": "Canada"
},
{
"code": "fr",
"value": "Canada"
}
]
}

Composite

The composite data type is used to hold custom data structures within a single property. A composite data type contains children properties to form a complex object that is different from the known data types.

ContactPoint

A point of contact which can either be a phone, a fax, a pager, a url or an email.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Possible values are: phone, fax, pager, url, email
valueRequiredSymbolValue of the contact point. The format of the value will depend on the system
useOptionalSymbolPurpose of the contact point.
extensionOptionalSymbolExtension for phone numbers
Example
// Phone
{
"system": "phone",
"value": "5141234567",
"use": "reception",
"extensions": "123"
}

// Fax
{
"system": "fax",
"value": "5141234567",
"use": "main",
"extensions": null
}

// Pager
{
"system": "pager",
"value": "5141234567",
"use": "work",
"extensions": null
}

// Email
{
"system": "email",
"value": "support@clinia.com",
"use": "info",
"extensions": null
}

// Url
{
"system": "url",
"value": "https://booking.clinia.com",
"use": "booking",
"extensions": null
}

EmailContactPoint

An email point of contact.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Will always be set to email
valueRequiredSymbolEmail address.
useOptionalSymbolPurpose of the contact point.
Example
{
"system": "email",
"value": "support@clinia.com",
"use": "info"
}

FaxContactPoint

A fax point of contact.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Will always be set to fax
valueRequiredSymbolFax number.
useOptionalSymbolPurpose of the contact point.
Example
{
"system": "fax",
"value": "5141234567",
"use": "main"
}

GeoBoundingBox

A bounded geographic area.

FieldRequiredTypeDescription
northEastRequiredGeoPointThe geo point located at the north-east corner.
southWestRequiredGeoPointThe geo point located at the south-westcorner.
Example
{
"northEast": {
"latitude": 45.70479,
"longitude": -73.474295
},
"southWest": {
"latitude": 45.417321,
"longitude": -73.972206
}
}

GeoPoint

A geographic location represented as a latitude/longitude pair.

FieldRequiredTypeDescription
longitudeRequiredDecimalLongitude
latitudeRequiredDecimalLatitude
Example
{
"latitude": 45.5017,
"longitude": -73.5673
}

GeoShape

A complex polygonial geographic area represented as a collection of latitude/longitude pairs. A polygon should start and end with the same coordinates in order to form a closed off shape.

FieldRequiredTypeDescription
coordinatesRequiredArray\<GeoPoint>Coordinates defining the outer limit of the polygon.
Example
{
"coordinates": [
{
"latitude": 42.9278655,
"longitude": -72.2834516
},
{
"latitude": 42.9279676,
"longitude": -72.2762632
},
{
"latitude": 42.9250217,
"longitude": -72.2831726
},
{
"latitude": 42.9278655,
"longitude": -72.2834641
}
]
}

HumanName

A name of a human.

FieldRequiredTypeDescription
fistNameRequiredSymbolFirst name.
middleNameOptionalSymbolMiddle name.
lastNameRequiredSymbolLast name.
Example
{
"firstname": "Jacques",
"middleName": "Omer",
"lastName": "Plante"
}

Identifier

A numeric or alphanumeric chain of characters that is associated with a single object or entity within a given system. The value should be unique within the defined system and have a consistent meaning wherever it appears. Identifiers can also be represented as a simple string, by concatening the system and the value like so: system:value

FieldRequiredTypeDescription
systemRequiredSymbolSystem within which the value exists.
useRequiredSymbolPurpose of the identifier
valueRequiredSymbolValue of the identifier
Example
// clinia:c107efd9-6d61-4c0e-a5f2-9487e9a30902
{
"system": "clinia",
"use": "secondary",
"value": "c107efd9-6d61-4c0e-a5f2-9487e9a30902"
}

PhoneContactPoint

A phone point of contact.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Will always be set to phone
valueRequiredSymbolPhone number.
useOptionalSymbolPurpose of the contact point.
Example
{
"system": "phone",
"value": "5141234567",
"use": "reception"
}

PagerContactPoint

A pager point of contact.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Will always be set to pager
valueRequiredSymbolPager number.
useOptionalSymbolPurpose of the contact point.
Example
{
"system": "pager",
"value": "5141234567",
"use": "work"
}

Reference

Defines a relationship between resources. References are always defined and represented in one direction - from one resource (source) to another (target). The source resource is implicit and will depend on where the reference data type is used. The target resource is what is defined by the content of the data type.

FieldRequiredTypeDescription
referenceTypeRequiredSymbolType of the target resource.
idRequiredSymbolIdentifier of the target resource.
Example
{
"referenceType": "practitioner",
"id": "32d21cc1-569a-4b81-bd69-c75e0700a6e3"
}

TimeSlot

Defines a time interval within a day.

FieldRequiredTypeDescription
startRequiredTimeStart time of the interval.
endRequiredTimeEnd time of the interval.
dayRequiredIntegerDay of the week. Possible values range from 1 (Monday) to 7 (Sunday)
Example
{
"start": "08:00:00",
"end": "17:00:00",
"day": 1
}

Translation

Represent a pair of ISO 639-1 language code and chain of characters. The value of a Translation can be either a Symbol, a Markdown or a XHtml.

FieldRequiredTypeDescription
codeRequiredCodeISO 639-1 language code
valueRequiredSymbol | Markdown | XHtmlValue of the translation.
Example
{
"code": "en",
"value": "My english label"
}

UrlContactPoint

A url point of contact, like a website.

FieldRequiredTypeDescription
systemRequiredSymbolType of contact point. Will always be set to url
valueRequiredSymbolUrl.
useOptionalSymbolPurpose of the contact point.
Example
{
"system": "url",
"value": "https://booking.clinia.com",
"use": "booking"
}