Skip to main content

Module utilities

Module utilities 

Source

Enums§

DataTransformError

Constants§

HOSTNAME_ID_MIN_LEN
The shortest tenant or project id.
HOSTNAME_ID_PATTERN
A valid tenant or project id: lowercase letters and digits, joined by single hyphens. It is subdomain safe, and never holds HOSTNAME_ID_SEPARATOR, so {tenant}--{project} splits back apart.
HOSTNAME_ID_SEPARATOR
Joins a tenant id and a project id into one subdomain label: {tenant}--{project}.

Functions§

generate_hostname_id
A random tenant or project id of len (default 26) letters and digits.
generate_id
haste_canonical
The Haste Health canonical URL naming resource_type/id.
parse_haste_canonical
The (resource type, id) a Haste Health canonical URL names, ignoring any |version. None for a canonical outside Haste Health’s namespace or not shaped type/id.
set_resource_id
Sets the ID of a FHIR resource.
set_resource_meta
Sets the metadata for a FHIR resource, including the versionId, lastUpdated, and Haste authoring extensions.
validate_hostname_id
Validates a tenant or project id: at least HOSTNAME_ID_MIN_LEN characters, matching HOSTNAME_ID_PATTERN.
validate_id
Validates a FHIR resource ID.
validate_project_id
Validates a project id, and that {tenant}--{id} is at most 55 characters: a DNS label, less the spare room.