Code
Indicates that the value is taken from a set of controlled strings defined elsewhere. 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.
This data type is intended to represent a finite set of controlled strings which represents a specific, discrete concept, element or idea.
Structure​
Attribute | Value | Description & Constraints |
---|---|---|
Type | string | |
Regex Pattern | ^[^\s]+( [^\s]+)*$ | 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. |
Specification​
- Schema
- Source
Loading ....
{
"$id": "https://raw.githubusercontent.com/bcgov/nr-pies/refs/heads/main/docs/spec/data/code.schema.json",
"$schema": "https://json-schema.org/draft-07/schema",
"title": "Code",
"description": "Code Data Type",
"type": "string",
"pattern": "^[^\\s]+( [^\\s]+)*$"
}
Implementation Notes​
This data structure is mainly meant to illustrate and restrict what is allowed to be encoded for an arbitrary code value. This is meant to only be used as a semantic reference point. This data structure is loosely inspired by the FHIR Code Type.